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
Do you know null pointer?
main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }
I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.
How can I find out if there are characters available for reading?
What is a pointer in c?
Write a program to swap two numbers without using a temporary variable?
how can I convert a string to a number?
why we wont use '&' sing in aceesing the string using scanf
How do you redirect a standard stream?
How do you initialize pointer variables?
Give the rules for variable declaration?
What is variables in c?
How can I read data from data files with particular formats?
What are the features of c language?
What is atoi and atof in c?