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
What does the characters “r” and “w” mean when writing programs that will make use of files?
How many main () function we can have in a project?
When should I declare a function?
What are data structures in c and how to use them?
What are the key features in c programming language?
When should a far pointer be used?
hi send me sample aptitude papers of cts?
What are the advantages and disadvantages of pointers?
By using C language input a date into it and if it is right?
Explain what does a function declared as pascal do differently?
How many header files are in c?
Write a program to swap two numbers without using third variable in c?
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
program to convert a integer to string in c language'
What is the difference between ‘g’ and “g” in C?