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 / guest

6

Is This Answer Correct ?    19 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you draw circles in C?

615


Define recursion in c.

693


List the variables are used for writing doubly linked list program.

1615


How to Throw some light on the splay trees?

615


Explain the use of 'auto' keyword in c programming?

675






What is use of bit field?

762


How do you define CONSTANT in C?

644


Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.

1562


Should I learn c before c++?

593


What is an identifier?

618


Can you apply link and association interchangeably?

665


Write a code to determine the total number of stops an elevator would take to serve N number of people.

722


writ a program to compare using strcmp VIVA and viva with its output.

1514


Is it valid to address one element beyond the end of an array?

668


differentiate built-in functions and user – defined functions.

613