551 views

3 Answers

Best answer
3 votes
3 votes
We know a do-while loop runs for at least one time.So here after running for one time , it checks the argument of while() which is 0 and hence the loop condition becomes false and terminates.

So "Inside while loop" is printed only once after that "After while loop" is printed.

Hence D) is the correct option.
selected by

Related questions

3 votes
3 votes
2 answers
1
Sankaranarayanan P.N asked Oct 27, 2016
393 views
What will be the output of the following C program fragment?int n =1; switch(n) { case 1: printf("One"); case 2: printf("Two"); case 3: case 4: case 5: default: printf("W...
2 votes
2 votes
1 answer
2
Sankaranarayanan P.N asked Oct 27, 2016
315 views
int add(int a) { static int count = 0; count = count + a; return(count); } main() { int a, b; for(a=0; a<=4; a++) b=add(a); }What is the value of b at the end of executio...
1 votes
1 votes
1 answer
3
Sankaranarayanan P.N asked Sep 28, 2016
1,158 views
What will be the value of f after the execution of following programvoid main() { char a; float f = 10; for(a=1; a<=5; a++) { f-=.2; printf("\nf = %g", f); } }A) 5.0B) 9C...
2 votes
2 votes
1 answer
4