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 the difference between scanf and fscanf?
Can you write the algorithm for Queue?
How do you generate random numbers in C?
Can you please explain the difference between syntax vs logical error?
What is a stream water?
What is the most efficient way to store flag values?
For what purpose null pointer used?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
What is enumerated data type in c?
Explain what is the purpose of "extern" keyword in a function declaration?
Explain what is the difference between a free-standing and a hosted environment?
What is a global variable in c?
Tell me what is the purpose of 'register' keyword in c language?
How can you return multiple values from a function?
What does c in a circle mean?