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 the size of structure in c?
Is there sort function in c?
Is calloc better than malloc?
What is the difference between declaring a variable and defining a variable?
State the difference between realloc and free.
When is a null pointer used?
Why we use void main in c?
What are the back slash character constants or escape sequence charactersavailable in c?
1) write a program to generate 1st n fibonacci prime numbers using Nested if 2) write a program to generate twin prime numbers from m to n using nested if 3) write a program to check whether a given integer is a strong number or not using nested if 4) Write a program to generate prime factors of a given integer using nested if 5)write a program to generate prime numbers from m to n using nested if 6)write a program to generate perfect numbers from m to n using nested if 7)write a program to generate the pallindromes from m to n using neste if 8)write a program to generate armstrong numbers from m to n using nested if 9)write a program to generate strong numbers from m to n using nested if
What is the difference between procedural and declarative language?
What's the best way of making my program efficient?
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?
What is volatile c?
What is #error and use of it?
How was c created?