#include
main()
{
int i=1,j=2;
switch(i)
{
case 1: printf("GOOD");
break;
case j: printf("BAD");
break;
}
}

Answer Posted / shruti

nopes we cannot use 'j'... because single qutoes ' ' are
used only for character value.. i.e if it was
char i
switch(i)
then we cud have used it like that..


hence in our case,
it will give a compiler error...

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does %d do?

700


Why we not create function inside function.

1735


What are the types of functions in c?

558


What is a static function in c?

607


What are linker error?

604






What is %d used for?

574


What is structure in c language?

606


Explain the binary height balanced tree?

708


Explain is it better to bitshift a value than to multiply by 2?

696


Explain what does the function toupper() do?

621


Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.

2637


What is the difference between array and structure in c?

559


what is the format specifier for printing a pointer value?

603


What is typedef struct in c?

571


Give basis knowledge of web designing ...

1561