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 / mahesh
b is answer
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain how can you determine the size of an allocated portion of memory?
What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?
List the difference between a "copy constructor" and a "assignment operator"?
the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b
Why & is used in c?
What are the different types of control structures in programming?
What is derived datatype in c?
What is the purpose of clrscr () printf () and getch ()?
process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,
For what purpose null pointer used?
How does sizeof know array size?
What is the use of clrscr?
how is the examination pattern?
Why is it usually a bad idea to use gets()? Suggest a workaround.
Describe wild pointers in c?