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

Answer Posted / moolshankershukla

#include
main()
{
int i=1,j=2;
switch(i)
{
case 1: printf("GOOD");
break;
case j: printf("BAD");
break;
}
}
given above program is wrong only we can one changes and
will be run .

correct program is:

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

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What happens if you free a pointer twice?

613


What is structure and union in c?

605


how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?

1507


Why is c so powerful?

691


what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9

1433






why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above

647


Which of these functions is safer to use : fgets(), gets()? Why?

637


What are structural members?

576


Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?

602


Is boolean a datatype in c?

552


How do you list a file’s date and time?

637


what are the 10 different models of writing an addition program in C language?

1443


When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?

592


Synonymous with pointer array a) character array b) ragged array c) multiple array d) none

622


What are the different properties of variable number of arguments?

669