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 are the types of functions in c?
Multiply an Integer Number by 2 Without Using Multiplication Operator
Define the scope of static variables.
Explain the advantages of using macro in c language?
How to explain the final year project as a fresher please answer with sample project
Difference between macros and inline functions? Can a function be forced as inline?
What is structure and union in c?
When should a type cast not be used?
What is || operator and how does it function in a program?
A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(
Explain how can I manipulate strings of multibyte characters?
which is an algorithm for sorting in a growing Lexicographic order
Explain that why C is procedural?
What are keywords in c with examples?
What is a program flowchart and how does it help in writing a program?