#include
main()
{
int i=1,j=2;
switch(i)
{
case 1: printf("GOOD");
break;
case j: printf("BAD");
break;
}
}
Answer Posted / subha raman
yeah..itz mainly syntax error..
there shud not be any declaration of variables..in
case "j"..it must be "case 2"only..
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
Do pointers store the address of value or the actual value of a variable?
How is = symbol different from == symbol in c programming?
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
provide an example of the Group by clause, when would you use this clause
what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?
What is #include cctype?
Write a C program linear.c that creates a sequence of
processes with a given length. By
sequence it is meant that each created process has exactly
one child.
Let's look at some example outputs for the program.
Here the entire process sequence consists of process 18181:
Sara@dell:~/OSSS$ ./linear 1
Creating process sequence of length 1.
18181 begins the sequence.
An example for a sequence of length three:
Sara@dell:~/OSSS$ ./linear 3
Creating process sequence of length 3.
18233 begins the sequence.
18234 is child of 18233
18235 is child of 18234
........ this is coad .... BUt i could not compleate it .....:(
#include
What is the value of h?
The file stdio.h, what does it contain?
What are header files and what are its uses in C programming?
What is optimization in c?
Is register a keyword in c?
What is malloc() function?
What is the concatenation operator?
Can variables be declared anywhere in c?