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 the modulus operator?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
Explain goto?
what is the mean of c languages.
Where is volatile variable stored?
What is a list in c?
Is double link list a linear data structure? If Yes, Why?If No, Why?
writw a program to insert an element in the begning of a doubly linked list
What language is c written?
WHAT IS RTGS N MINIMUM AMT TO B TRANSFERD N WHAT R THE CHARGES ON MINIMUM AMT N IN WHICH BANK WE CAN DO IT?
Do you have any idea about the use of "auto" keyword?
What is false about the following A compound statement is a.A set of simple statments b.Demarcated on either side by curly brackets c.Can be used in place of simple statement d.A C function is not a compound statement.