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 / vijay r15
error
Becoz
j=0: j=400: // in these : should be replaced by ;
In case 3; // in this ; should be replaced by :
After correcting this the op is 500 becoz there is no break statement
Ans 500
Dbtfull guys mail to raj.vijay55@gmail.com
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Do you know what are the properties of union in c?
What is meant by keywords in c?
How do I swap bytes?
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
What is the purpose of scanf() and printf() functions?
When should structures be passed by values or by references?
Between macros and functions,which is better to use and why?
How we can insert comments in a c program?
Is c is a high level language?
Can a variable be both const and volatile?
What is the use of gets and puts?
Explain what are the standard predefined macros?
Difference between malloc() and calloc() function?
Can you please explain the difference between exit() and _exit() function?
The statement, int(*x[]) () what does in indicate?