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 / sivasankar.a
the answer is d)none because there in no break statement
| Is This Answer Correct ? | 1 Yes | 7 No |
Post New Answer View All Answers
Explain what is the difference between functions getch() and getche()?
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
Why does everyone say not to use gets?
Is the exit() function same as the return statement? Explain.
in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above
Explain how can you avoid including a header more than once?
Are there namespaces in c?
How do I round numbers?
Is it possible to pass an entire structure to functions?
What is wrong with this program statement?
Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)
What is stack in c?
Discuss the function of conditional operator, size of operator and comma operator with examples.
What is sizeof in c?
please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics