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
What is variable and explain rules to declare variable in c?
Write a C program to count the number of email on text
Write a program with dynamically allocation of variable.
What is array of structure in c programming?
What is strcpy() function?
the question is that what you have been doing all these periods (one year gap)
Are c and c++ the same?
What is d scanf?
Explain the array representation of a binary tree in C.
What are reserved words with a programming language?
What are the 4 types of functions?
How many types of functions are there in c?
Explain the difference between call by value and call by reference in c language?
What is a nested loop?
the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters