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 |
Is exit(status) truly equivalent to returning the same status from main?
void main() { int i=5; printf("%d",i+++++i); }
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database
2 Answers TCS, Unisys, Webyog,
Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
how to use virual function in real time example
How to print "I Love My India" without using semi colon?
What is c token?
write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1
What are register variables in c?
what is the output of the program?? #include<stdio.h> main ( ) { int a=010,sum=0,tracker: for(tracker=0;tracker<=a;tracker++) sum+=tracker; printf(ā %d\nā,sum); } what is the difference between a=10 and a=010??
What is Heap?
What is meant by global static? why we have to use static variable instead of Global variable