#include
main()
{
int i=1,j=2;
switch(i)
{
case 1: printf("GOOD");
break;
case j: printf("BAD");
break;
}
}
Answer Posted / suresh reddy
Compiler Error: Constant expression required in function
main
instead of using j u we can use case 'j' .
this is correct answer
Is This Answer Correct ? | 5 Yes | 5 No |
Post New Answer View All Answers
What is the difference between text and binary modes?
What is the use of a static variable in c?
Does c have circular shift operators?
What is an array in c?
What is array of pointers to string?
Do you know the use of 'auto' keyword?
Explain what is the difference between #include and #include 'file' ?
Describe the modifier in c?
explain what is fifo?
When would you use a pointer to a function?
What is #line used for?
Write a program for Overriding.
In a switch statement, explain what will happen if a break statement is omitted?
What are the 4 types of organizational structures?
How do you sort filenames in a directory?