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
Why should I prototype a function?
What's the difference between constant char *p and char * constant p?
How to compare array with pointer in c?
What math functions are available for integers? For floating point?
Explain the Difference between the New and Malloc keyword.
Can you please explain the scope of static variables?
What is the value of h?
Can you subtract pointers from each other? Why would you?
Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures
Explain why c is faster than c++?
What is the meaning of c in c language?
code for find determinent of amatrix
Where are c variables stored in memory?
How do we make a global variable accessible across files? Explain the extern keyword?