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 / ashutosh tiwari

compiler error!
after case 3 there is semicolon & j=400 also ended with
semicolon

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is variable declaration and definition in c?

496


what is different between auto and local static? why should we use local static?

638


What is the most efficient way to count the number of bits which are set in an integer?

587


What is the use of ?

617


What is string in c language?

617






What is the difference between near, far and huge pointers?

627


Explain the binary height balanced tree?

718


Why is sprintf unsafe?

613


What is function prototype in c language?

606


Explain how can a program be made to print the name of a source file where an error occurs?

682


When do we get logical errors?

633


What is memcpy() function?

617


List the variables are used for writing doubly linked list program.

1615


What is the difference between the expression “++a” and “a++”?

648


What is modeling?

642