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
What is the difference between #include and #include 'file' ?
What are the types of data types and explain?
Explain what are run-time errors?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
Write the Program to reverse a string using pointers.
largest Of three Number using without if condition?
What are the different types of control structures?
Explain how can I pad a string to a known length?
Why c is called object oriented language?
Explain what does the format %10.2 mean when included in a printf statement?
Why can arithmetic operations not be performed on void pointers?
Differentiate between null and void pointers.
Describe the modifier in c?
What is register variable in c language?
What is pointer to pointer in c with example?