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?
Answer Posted / 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 |
Post New Answer View All Answers
What is a buffer in c?
What is the difference between union and anonymous union?
Why cant I open a file by its explicit path?
Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?
What are lookup tables in c?
List the difference between a "copy constructor" and a "assignment operator"?
What is the benefit of using an enum rather than a #define constant?
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
What does c mean in basketball?
What is signed and unsigned?
Can the sizeof operator be used to tell the size of an array passed to a function?
write a progrmm in c language take user interface generate table using for loop?
What are the 3 types of structures?
What do you mean by invalid pointer arithmetic?
How do I convert a string to all upper or lower case?