#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 is the purpose of 'register' keyword in c language?

612


why we wont use '&' sing in aceesing the string using scanf

1773


What are the types of unary operators?

647


What are the two types of functions in c?

551


If errno contains a nonzero number, is there an error?

787






What are the different types of control structures?

572


What is cohesion and coupling in c?

577


Why should I use standard library functions instead of writing my own?

663


What is the usage of the pointer in c?

596


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

604


Why is sizeof () an operator and not a function?

567


How many data structures are there in c?

603


Explain what is the concatenation operator?

615


Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?

658


Explain zero based addressing.

595