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
How can my program discover the complete pathname to the executable from which it was invoked?
How do I create a directory? How do I remove a directory (and its contents)?
Explain how can you restore a redirected standard stream?
Which is better malloc or calloc?
Why is it usually a bad idea to use gets()? Suggest a workaround.
how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions
Can we declare function inside main?
What math functions are available for integers? For floating point?
Can you subtract pointers from each other? Why would you?
application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above
What do you mean by recursion in c?
all c language question
Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result
Write a program to check palindrome number in c programming?
What are the string functions? List some string functions available in c.