#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
What is main return c?
What are the advantages of the functions?
State two uses of pointers in C?
what are the facialities provided by you after the selection of the student.
What is double pointer in c?
What is zero based addressing?
What is an endless loop?
How was c created?
Why do we use int main?
Explain how do you search data in a data file using random access method?
What are the features of the c language?
What is echo in c programming?
Write a progarm to find the length of string using switch case?
How does normalization of huge pointer works?
Is c is a low level language?