#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

1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

3143


in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none

602


what are # pragma staments?

1628


How can a number be converted to a string?

604


Can you explain what keyboard debouncing is, and where and why we us it? please give some examples

1657






What are the applications of c language?

624


What does *p++ do? What does it point to?

616


Tell me what is null pointer in c?

615


What is a function in c?

571


What are the advantages of Macro over function?

1200


Give me the code of in-order recursive and non-recursive.

886


What is structure and union in c?

601


Give the rules for variable declaration?

677


What is structure pointer in c?

571


If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above

622