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
How can you return multiple values from a function?
What is the difference between struct and union in C?
What is c programming structure?
What is a class c rental property?
#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }
What is function prototype in c with example?
What is meant by gets in c?
Are negative numbers true in c?
7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.
How can I read data from data files with particular formats?
What is a nested loop?
Explain what will the preprocessor do for a program?
Explain how can you restore a redirected standard stream?
What is a struct c#?
What is structure in c definition?