#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 a built-in function in C?
find out largest elemant of diagonalmatrix
Explain the difference between ++u and u++?
Using which language Test cases are added in .ptu file of RTRT unit testing???
What is wrong in this statement?
Explain what are preprocessor directives?
How can I send mail from within a c program?
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
What will be your course of action for a push operation?
an expression contains relational operators, assignment operators, and arithmatic operstors. In the absence of parentheses, they will be evaluated in which of the following order a) assignment, relational, arithematic b) arithematic, relational, assignment c) relational, arithematic, assignment d) assignment, arithematic, relational
Explain what is the use of a semicolon (;) at the end of every program statement?
What happens if you free a pointer twice?
What are the different types of data structures in c?
What is the purpose of the statement: strcat (S2, S1)?
How many bytes is a struct in c?