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 the heap?
What is meant by operator precedence?
what type of questions arrive in interview over c programming?
How can I read a binary data file properly?
What is a function in c?
What is the equivalent code of the following statement in WHILE LOOP format?
What is ## preprocessor operator in c?
What is the c value paradox and how is it explained?
Is c++ based on c?
Can you please compare array with pointer?
Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
the process of defining something in terms of itself is called (or) in C it is possible for the functions to call themselves. A function called a) nested function b) void function c) recursive function d) indifinite function
List the difference between a 'copy constructor' and a 'assignment operator' in C?
Why is sprintf unsafe?
simple program of graphics and their output display