what is the output of the program and explain why??
#include<stdio.h>
void main ( )
{
int k=4,j=0:
switch (k)
{
case 3;
j=300;
case 4:
j=400:
case 5:
j=500;
}
printf (ā%d\nā,j);
}
Answer Posted / amik
the answer will b 500 becoz...when first k = 4 is
executing...the value of j is 400 den thr is no break
statement...so it will continue..nd at the end of the
switch..j will contain or retain.. the value 500
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Array is an lvalue or not?
What is scope rule in c?
What are keywords in c with examples?
What is return type in c?
How can you tell whether two strings are the same?
What is malloc() function?
What is the maximum no. of arguments that can be given in a command line in C.?
Can static variables be declared in a header file?
When should you use a type cast?
What is %g in c?
What the different types of arrays in c?
Explain what is wrong with this statement? Myname = ?robin?;
How can you draw circles in C?
in any language the sound structure of that language depends on its a) character set, input/output function, its control structures b) character set, library functions, input/output functions its control structures c) character set, library functions, control sturctures d) character set, operators, its control structures
Is anything faster than c?