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 / prashanth
the answer is 500 as break is not mentioned it goes to case
5 from case4 so value of j=500
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
What is the benefit of using #define to declare a constant?
What are the advantages of using linked list for tree construction?
What is c preprocessor mean?
What is file in c preprocessor?
what type of questions arrive in interview over c programming?
Explain about block scope in c?
how can I convert a string to a number?
Why pointers are used?
What is difference between constant pointer and constant variable?
Do you know the difference between exit() and _exit() function in c?
Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.
Create a simple code fragment that will swap the values of two variables num1 and num2.
How is = symbol different from == symbol in c programming?
What is console in c language?
What is a pragma?