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
How can I write a function that takes a format string and a variable number of arguments?
List the different types of c tokens?
What is the use of define in c?
What do the functions atoi(), itoa() and gcvt() do?
What is the process of writing the null pointer?
If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
Write a program to reverse a linked list in c.
What is the difference between break and continue?
What is far pointer in c?
In a header file whether functions are declared or defined?
What are the functions to open and close the file in c language?
What does c mean in standard form?
Explain modulus operator. What are the restrictions of a modulus operator?
Explain the concept and use of type void.