#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
Linked list is a Linear or non linear explain if linear how it working as a non linear data structures
What is maximum size of array in c?
Why string is used in c?
difference between Low, Middle, High Level languages in c ?
hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell
What is variable declaration and definition in c?
What the different types of arrays in c?
What are shell structures used for?
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
What is pointers in c with example?
How can I make sure that my program is the only one accessing a file?
Why do we use null pointer?
Explain what are compound statements?
What should malloc() do?
provide an example of the Group by clause, when would you use this clause