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

Which are low level languages?

0 Answers  


What is getch() function?

0 Answers  


What is function prototype in c language?

0 Answers  


# define prod(a,b)=a*b main() { int x=2; int y=3; printf("%d",prod(x+2,y-10)); } the output of the program is a.8 b.6 c.7 d.none

7 Answers   Microsoft, TCS,


What do you mean by command line argument?

0 Answers   TCS,






in one file global variable int i; is declared as static. In another file it is extern int i=100; Is this valid ?

2 Answers   NetApp,


what is the basis for selection of arrays or pointers as data structure in a program

0 Answers   TCS,


exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above

0 Answers  


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database

2 Answers   TCS, Unisys, Webyog,


Write a program in C to convert date displayed in gregorian to julian date

0 Answers   HCL, Wipro,


Explain how do you search data in a data file using random access method?

0 Answers  


is assignment operator is arithmatic or not

3 Answers   Infosys,


Categories