#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
What is malloc return c?
What is the difference between NULL and NUL?
Explain what will be the outcome of the following conditional statement if the value of variable s is 10?
What is difference between class and structure?
What do you mean by scope of a variable in c?
Explain 'far' and 'near' pointers in c.
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'); }
What is the benefit of using an enum rather than a #define constant?
is it possible to create your own header files?
Tell us something about keyword 'auto'.
How do you sort filenames in a directory?
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles
How can I trap or ignore keyboard interrupts like control-c?
What does 2n 4c mean?
What is a structure member in c?