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

the answer is 500 as break is not mentioned it goes to case
5 from case4 so value of j=500

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how can I make sure that my program is the only one accessing a file?

618


List the difference between a "copy constructor" and a "assignment operator"?

578


`write a program to display the recomended action depends on a color of trafic light using nested if statments

1629


What is scope rule in c?

603


What are the three constants used in c?

542






What is the size of empty structure in c?

589


What is null pointer constant?

592


What is page thrashing?

649


i want to know the procedure of qualcomm for getting a job through offcampus

1930


What is bubble sort in c?

631


What is a volatile keyword in c?

634


What is function prototype?

607


What is LINKED LIST? How can you access the last element in a linked list?

629


The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 ā€¦). Records the times. c). Do an analysis of the differences in times and submit it in class.

1626


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

2002