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 / krishna
answer is c 3
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Do you know the difference between malloc() and calloc() function?
what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9
What are structure members?
What is stack in c?
Why & is used in scanf in c?
What does sizeof function do?
What is 'bus error'?
How can type-insensitive macros be created?
the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none
Explain what is output redirection?
What is function in c with example?
What is cohesion in c?
What is the benefit of using const for declaring constants?
What is the purpose of 'register' keyword in c language?
Explain how do you print only part of a string?