Result of the following program is
main()
{
int i=0;
for(i=0;i<20;i++)
{
switch(i)
case 0:i+=5;
case 1:i+=2;
case 5:i+=5;
default i+=4;
break;}
printf("%d,",i);
}
}
a)0,5,9,13,17
b)5,9,13,17
c)12,17,22
d)16,21
e)syntax error

Answer Posted / jai

Answer is e), since opening and closing flower braces do
not match in numbers and default do not have colon
following it. Assuming switch(i) has an opening flower
brace and default has colon after it "switch(i) {, ...
default: i+= 4;"answer would be d).
All cases will be fall-through including default:

Is This Answer Correct ?    27 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.

670


general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only

589


What is the mean of function?

650


HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????

2272


How can I invoke another program or command and trap its output?

619






What is an array? What the different types of arrays in c?

661


What is the explanation for modular programming?

688


What is signed and unsigned?

646


The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration

636


how to make a scientific calculater ?

1566


What is the purpose of 'register' keyword in c language?

630


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

4991


a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler

614


process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,

1893


What are data types in c language?

587