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 / krishna
answer is c 3
Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Explain about the functions strcat() and strcmp()?
Explain what are linked list?
What are header files in c programming?
How many loops are there in c?
What is a pragma?
Write the control statements in C language
What is the size of array float a(10)?
Do you know the difference between malloc() and calloc() function?
In a byte, what is the maximum decimal number that you can accommodate?
I heard that you have to include stdio.h before calling printf. Why?
What is union in c?
What are examples of structures?
Explain what does a function declared as pascal do differently?
How can I insert or delete a line (or record) in the middle of a file?
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?