#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
What is the general form of function in c?
What is getch () for?
What is c variable?
How can you find the day of the week given the date?
typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)
What are the string functions? List some string functions available in c.
A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler
what do u mean by Direct access files? then can u explain about Direct Access Files?
any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above
Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result
What is substring in c?
How will you write a code for accessing the length of an array without assigning it to another variable?
Are global variables static in c?
write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3