consider the following program sigment
int n,sum=1;
switch(n) {
case 2:sum=sum+2;
case 3:sum*=2;
break;
default:sum=0;}
if n=2, what is the value of sum
a.0
b.6
c.3
d.none
Answer Posted / sivasankar.a
the answer is d)none because there in no break statement
Is This Answer Correct ? | 1 Yes | 7 No |
Post New Answer View All Answers
What is meant by inheritance?
Why void is used in c?
What does void main () mean?
a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if
the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters
why use "return" statement a) on executing the return statement it immediately transfers the control back to the calling program b) it returns the value present in the parentheses return, to the calling program c) a & b d) none of the above
Explain the difference between call by value and call by reference in c language?
What is an lvalue in c?
What is meant by operator precedence?
What is a rvalue?
Which is better between malloc and calloc?
Can the size of an array be declared at runtime?
What standard functions are available to manipulate strings?
typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?
Explain what is gets() function?