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
What is a void * in c?
What happens if you free a pointer twice?
Is javascript written in c?
What is the difference between declaring a variable by constant keyword and #define ing that variable?
ATM machine and railway reservation class/object diagram
What is pointer & why it is used?
What is volatile variable in c?
What is the use of typedef in c?
Why is c not oop?
Explain the use of fflush() function?
write a program to print data of 5 five students with structures?
how could explain about job profile
What is variable and explain rules to declare variable in c?
what does static variable mean?
What are the features of the c language?