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 / mahesh

b is answer

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values

1263


How is a structure member accessed?

592


Is it possible to have a function as a parameter in another function?

604


What are variables c?

626


Is flag a keyword in c?

684






How can I implement sets or arrays of bits?

611


What is the difference between Printf(..) and sprint(...) ?

792


How do you determine a file’s attributes?

607


Explain 'bit masking'?

661


How can you draw circles in C?

633


What’s a signal? Explain what do I use signals for?

616


define string ?

673


Is c is a low level language?

568


Define Array of pointers.

638


What are the types of pointers?

608