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 is class and object in c?
Why is %d used in c?
In C language, a variable name cannot contain?
What is extern keyword in c?
What type of function is main ()?
any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above
a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list
How can I find out the size of a file, prior to reading it in?
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?
a=10;b= 5;c=3;d=3; if(a printf(%d %d %d %d a,b,c,d) else printf("%d %d %d %d a,b,c,d);
Explain the difference between malloc() and calloc() in c?
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }
explain what is an endless loop?
What is anagram in c?
What are the 5 elements of structure?