#include
main()
{
int i=1,j=2;
switch(i)
{
case 1: printf("GOOD");
break;
case j: printf("BAD");
break;
}
}

Answer Posted / shruti

nopes we cannot use 'j'... because single qutoes ' ' are
used only for character value.. i.e if it was
char i
switch(i)
then we cud have used it like that..


hence in our case,
it will give a compiler error...

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a built-in function in C?

795


find out largest elemant of diagonalmatrix

1649


Explain the difference between ++u and u++?

640


Using which language Test cases are added in .ptu file of RTRT unit testing???

3598


What is wrong in this statement?

606






Explain what are preprocessor directives?

627


How can I send mail from within a c program?

581


what is a NULL Pointer? Whether it is same as an uninitialized pointer?

758


What will be your course of action for a push operation?

667


an expression contains relational operators, assignment operators, and arithmatic operstors. In the absence of parentheses, they will be evaluated in which of the following order a) assignment, relational, arithematic b) arithematic, relational, assignment c) relational, arithematic, assignment d) assignment, arithematic, relational

811


Explain what is the use of a semicolon (;) at the end of every program statement?

734


What happens if you free a pointer twice?

610


What are the different types of data structures in c?

604


What is the purpose of the statement: strcat (S2, S1)?

642


How many bytes is a struct in c?

724