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


Please Help Members By Posting Answers For Below Questions

What does the characters “r” and “w” mean when writing programs that will make use of files?

859


How many main () function we can have in a project?

615


When should I declare a function?

623


What are data structures in c and how to use them?

681


What are the key features in c programming language?

618






When should a far pointer be used?

605


hi send me sample aptitude papers of cts?

1654


What are the advantages and disadvantages of pointers?

579


By using C language input a date into it and if it is right?

575


Explain what does a function declared as pascal do differently?

642


How many header files are in c?

554


Write a program to swap two numbers without using third variable in c?

619


the process of defining something in terms of itself is called (or) in C it is possible for the functions to call themselves. A function called a) nested function b) void function c) recursive function d) indifinite function

763


program to convert a integer to string in c language'

1987


What is the difference between ‘g’ and “g” in C?

2575