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 |
How to add two numbers with using function?
c program to manipulate x=1!+2!+3!+...+n! using recursion
Determine if a number is a power of 2 at O(1).
What language is c written?
44.what is the difference between strcpy() and memcpy() function? 45.what is output of the following statetment? 46.Printf(“%x”, -1<<4); ? 47.will the program compile? int i; scanf(“%d”,i); printf(“%d”,i); 48.write a string copy function routine? 49.swap two integer variables without using a third temporary variable? 50.how do you redirect stdout value from a program to a file? 51.write a program that finds the factorial of a number using recursion?
how to TOGGLE Nth bit of variable in a MACRO
What is dynamic memory allocation?
how to add our own function in c library please give details.?
What is conio h in c?
Which programming language is best for getting job 2020?
how will you write a program on linked lists using JAVA programming???????????
What are preprocessor directives in c?