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
int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer
What does a function declared as pascal do differently?
Explain how do you print an address?
What is the difference between struct and typedef struct in c?
What is LINKED LIST? How can you access the last element in a linked list?
Differentiate call by value and call by reference?
What was noalias and what ever happened to it?
What is the code in while loop that returns the output of given code?
Explain null pointer.
In C language, a variable name cannot contain?
write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare. You will then tabulate this information in another file.
How can I rethow can I return a sequence of random numbers which dont repeat at all?
What is #include called?
What is the need of structure in c?
Explain goto?