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
What is the difference between declaring a variable by constant keyword and #define ing that variable?
Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
How will you find a duplicate number in a array without negating the nos ?
What is pointer to pointer in c?
In which layer of the network datastructure format change is done
What is the purpose of realloc()?
An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above
What should malloc() do? Return a null pointer or a pointer to 0 bytes?
What are the different file extensions involved when programming in C?
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
any "C" function by default returns an a) int value b) float value c) char value d) a & b
What is the explanation for modular programming?
Does c have circular shift operators?
What is a list in c?
What is string in c language?