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 / sathish

400

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is a function method?give example?

1918


What is the difference between printf and scanf )?

598


How many levels of indirection in pointers can you have in a single declaration?

598


Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?

602


What is an arrays?

658






Write a code to generate divisors of an integer?

645


What is scanf_s in c?

635


What is a structural principle?

645


Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......

1748


What is a pragma?

672


Write a program to reverse a string.

644


What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }

1962


c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above

741


What does calloc stand for?

653


Explain what is the purpose of "extern" keyword in a function declaration?

625