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

6

Is This Answer Correct ?    19 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to swap two numbers without using a temporary variable?

826


Is there anything like an ifdef for typedefs?

871


Differentiate between null and void pointers.

845


Is main a keyword in c?

816


What do you mean by c?

767






Explain heap and queue.

778


What are the advantages of using linked list for tree construction?

825


i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none

803


What is array of pointers to string?

767


Explain void pointer?

774


Write a program that accept anumber in words

1453


What is line in c preprocessor?

778


Is main is user defined function?

831


What is the difference between a string and an array?

890


How do you override a defined macro?

873