f1()
{
f(3);}
f(int t)
{
switch(t);
{
case 2: c=3;
case 3: c=4;
case 4: c=5;
case 5: c=6;
default: c=0;}
value of c?
Answers were Sorted based on User's Feedback
Answer / ningappa
The above code returns a compiler error:
1.In C functions cannot be made inline.
2.A semi-colon is not expected after switch.
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / madhu
As t = 3,it goes to case 3.But there is no break in that
case so it proceeds further down to default and c becomes 0.
| Is This Answer Correct ? | 7 Yes | 1 No |
Answer / poornima
Initially, switch statement is ended with semicolon.so
cases will not be alone without switch.It is compilation
error.
If semicolon is not there in switch statement answer is
zero.
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / shruti
Yeah value of c becomes 0 at the end of the program..
| Is This Answer Correct ? | 3 Yes | 1 No |
What is null pointer constant?
Meaning of () in c
Why can't I perform arithmetic on a void* pointer?
What is nested structure in c?
input may any number except 1,output will always 1.. conditions only one variable should be declare,don't use operators,expressions,array,structure
program to print upper & lower triangle of a matrix
Is an array parameter is always "by reference" ?
I heard that you have to include stdio.h before calling printf. Why?
can any one provide me the notes of data structure for ignou cs-62 paper
What is the difference between ++a and a++?
GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
print 1-50 with two loop & two print Statement