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 volatile keyword in c?
Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?
How can I rethow can I return a sequence of random numbers which dont repeat at all?
regarding pointers concept
In a switch statement, explain what will happen if a break statement is omitted?
What is the default value of local and global variables in c?
Explain how can I open a file so that other programs can update it at the same time?
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
Why is c called c not d or e?
Explain enumerated types in c language?
What are the modifiers available in c programming language?
Is array name a pointer?
When should you not use a type cast?
What are the different types of objects used in c?
What is a loop?