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

Answer Posted / subha raman

yeah..itz mainly syntax error..
there shud not be any declaration of variables..in
case "j"..it must be "case 2"only..

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is malloc return c?

598


What is the difference between NULL and NUL?

728


Explain what will be the outcome of the following conditional statement if the value of variable s is 10?

744


What is difference between class and structure?

570


What do you mean by scope of a variable in c?

544






Explain 'far' and 'near' pointers in c.

706


What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }

700


What is the benefit of using an enum rather than a #define constant?

657


is it possible to create your own header files?

638


Tell us something about keyword 'auto'.

666


How do you sort filenames in a directory?

714


A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles

647


How can I trap or ignore keyboard interrupts like control-c?

620


What does 2n 4c mean?

719


What is a structure member in c?

548