#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
What is the most efficient way to count the number of bits which are set in an integer?
What does %p mean?
What are types of preprocessor in c?
What does nil mean in c?
Explain what does it mean when a pointer is used in an if statement?
What are categories used for in c?
What is oops c?
Can a local variable be volatile in c?
write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34
Is it better to use a macro or a function?
Where local variables are stored in c?
program to convert a integer to string in c language'
What is union and structure?
Explain what are its uses in c programming?
Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?