#include
main()
{
int i=1,j=2;
switch(i)
{
case 1: printf("GOOD");
break;
case j: printf("BAD");
break;
}
}
Answer Posted / surenda pal singh chouhan
Compiler Error: Constant expression required in function
main.
Explanation:
The case statement can have only constant expressions (this
implies that we cannot use variable names directly so an
error).
Note:
Enumerated types can be used in case statements.
| Is This Answer Correct ? | 10 Yes | 2 No |
Post New Answer View All Answers
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM
What is difference between class and structure?
What are the primitive data types in c?
What is an identifier?
How can I prevent another program from modifying part of a file that I am modifying?
What is table lookup in c?
Explain can the sizeof operator be used to tell the size of an array passed to a function?
What is new line escape sequence?
What is the use of putchar function?
I just typed in this program, and it is acting strangely. Can you see anything wrong with it?
Can the size of an array be declared at runtime?
What is volatile, register definition in C
What is a node in c?
What is the easiest sorting method to use?