void main()
{
int a=1;
while(a++<=1)
while(a++<=2);
}
Answer Posted / 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 |
Post New Answer View All Answers
What are local static variables? How can you use them?
What is union and structure?
What is the time and space complexities of merge sort and when is it preferred over quick sort?
What is pragma in c?
Explain pointers in c programming?
What is a c token and types of c tokens?
Should a function contain a return statement if it does not return a value?
What is define c?
can we implement multi-threads in c.
Explain the use of function toupper() with and example code?
What is the difference between declaring a variable and defining a variable?
Do pointers take up memory?
Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?
In a byte, what is the maximum decimal number that you can accommodate?
What are dangling pointers? How are dangling pointers different from memory leaks?