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


Please Help Members By Posting Answers For Below Questions

Why main is used in c?

590


the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?

567


What is scope rule in c?

608


7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.

2222


Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol

667






What is a lvalue

665


What is #include in c?

601


Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop

1718


What is the use of f in c?

560


Why n++ execute faster than n+1 ?

1852


Should I learn c before c++?

619


What is c language and why we use it?

625


What is volatile variable in c?

659


What is %lu in c?

688


What is FIFO?

677