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 / aswini
as there is no semicolon,uit will execute all the case
statements and j will be assigned as 500.
hence it will print 500..
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
find out largest elemant of diagonalmatrix
What do you mean by dynamic memory allocation in c?
How will you declare an array of three function pointers where each function receives two ints and returns a float?
Why C language is a procedural language?
What is a built-in function in C?
how can f be used for both float and double arguments in printf? Are not they different types?
how to find binary of number?
Is c procedural or object oriented?
Write a program to swap two numbers without using the third variable?
What is the explanation for modular programming?
how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....
What is malloc return c?
Differentiate abs() function from fabs() function.
Differentiate Source Codes from Object Codes
Explain 'bit masking'?