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 / prashanth
the answer is 500 as break is not mentioned it goes to case
5 from case4 so value of j=500
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
How can I generate floating-point random numbers?
How can I find out how much free space is available on disk?
why return type of main is not necessary in linux
What oops means?
.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }
Why is c so powerful?
How reliable are floating-point comparisons?
What is the use of getch ()?
How can I write a function that takes a format string and a variable number of arguments?
Why is void main used?
Is register a keyword in c?
Why doesnt the call scanf work?
What is the use of ?
Explain how does flowchart help in writing a program?
What is hashing in c language?