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
Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"
Explain how do I determine whether a character is numeric, alphabetic, and so on?
What is the purpose of clrscr () printf () and getch ()?
What is the scope of an external variable in c?
to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?
Why flag is used in c?
Why we use break in c?
What are the advantages and disadvantages of c language?
How is a structure member accessed?
Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.
Which header file is essential for using strcmp function?
What is nested structure in c?
Hai what is the different types of versions and their differences
What is difference between static and global variable in c?
what are bit fields? What is the use of bit fields in a structure declaration?