void main()
{
int a=1;
while(a++<=1)
while(a++<=2);
}

Answers were Sorted based on User's Feedback



void main() { int a=1; while(a++<=1) while(a++<=2); }..

Answer / sabir

this program execute at one both while are working becouse
a++ increase value after while statement that by both are
execute at once

Is This Answer Correct ?    13 Yes 1 No

void main() { int a=1; while(a++<=1) while(a++<=2); }..

Answer / madhavi

1<=1, a=2 (true)(first while)
2<=2,a=3 (true)(second while)
3<=3,a=4 (false)(second while)

4<=1,a=5 (false)(first while)

the loops are in nesting ,the second while is the loop body
of the first while loop

Is This Answer Correct ?    5 Yes 0 No

void main() { int a=1; while(a++<=1) while(a++<=2); }..

Answer / venkatapradeep774

ans:5...i need an explaination for this tat how it will be 5.

Is This Answer Correct ?    2 Yes 1 No

void main() { int a=1; while(a++<=1) while(a++<=2); }..

Answer / dheerendra

it gives error,
because any loop can't be terminated by ';'

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More C Interview Questions

What is the difference between malloc() and calloc()?

3 Answers  


What is scanf_s in c?

0 Answers  


write a C program : To find out the number of identical words in two files . the file name should be taken as command line argument .

1 Answers   Subex,


What is the output for the below program? void main() { float me=1.1; double you=1.1; if(me==you) printf("love c"); else printf("know c"); }

7 Answers  


what is the definition of storage classes?

3 Answers   Wipro,






Are enumerations really portable?

0 Answers  


What is realloc in c?

0 Answers  


Explain what standard functions are available to manipulate strings?

0 Answers  


what is the difference between #include<stdio.h> and #include"stdio.h" ?

6 Answers   TCS,


Who invented b language?

0 Answers  


what is difference between #include<stdio.h> and #include"stdio.h"

4 Answers  


What is a far pointer in c?

0 Answers  


Categories