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 difference between structural,object based,object orientd programming languages?
What are the two types of structure?
How can I send mail from within a c program?
What is a memory leak? How to avoid it?
Without using main fn and semicolon,print remainder for a given number in C language
What is the ANSI C Standard?
write an interactive program to generate the divisors of a given integer.
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
Explain how do you print an address?
What are # preprocessor operator in c?
What is an object?
CAN WE DEFINE ANY FUNCTION WITHIN A FUNCTION.