#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


Please Help Members By Posting Answers For Below Questions

Subtract Two Number Without Using Subtraction Operator

357


Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)

815


Where in memory are my variables stored?

637


int far *near * p; means

3121


explain what is an endless loop?

611






What is nested structure?

573


An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above

658


What are the __date__ and __time__ preprocessor commands?

574


What is restrict keyword in c?

645


What is structure in c language?

619


what is reason of your company position's in india no. 1.

1777


Tell me when would you use a pointer to a function?

609


When should a type cast not be used?

627


What is the explanation for the dangling pointer in c?

682


What is the difference between malloc() and calloc() function in c language?

604