#include
main()
{
int i=1,j=2;
switch(i)
{
case 1: printf("GOOD");
break;
case j: printf("BAD");
break;
}
}
Answer Posted / moolshankershukla
#include
main()
{
int i=1,j=2;
switch(i)
{
case 1: printf("GOOD");
break;
case j: printf("BAD");
break;
}
}
given above program is wrong only we can one changes and
will be run .
correct program is:
#include
main()
{
int i=1,j=2;
switch(i)
{
case 1: printf("GOOD");
break;
case 2: printf("BAD");
break;
}
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Where static variables are stored in c?
Why is it that not all header files are declared in every C program?
What are the types of operators in c?
How do you declare a variable that will hold string values?
What are the 4 types of programming language?
What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?
What is file in c preprocessor?
Find MAXIMUM of three distinct integers using a single C statement
Write a factorial program using C.
What is volatile keyword in c?
how to find binary of number?
Why is struct padding needed?
Why malloc is faster than calloc?
Why is c platform dependent?
What is wrong with this statement? Myname = 'robin';