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


Please Help Members By Posting Answers For Below Questions

Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.

1008


A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM

1691


What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

718


What are near, far and huge pointers?

639


Explain the difference between null pointer and void pointer.

657






write a c program to print the next of a particular no without using the arithmetic operator or looping statements?

3171


Where does the name "C" come from, anyway?

632


Do pointers need to be initialized?

554


writ a program to compare using strcmp VIVA and viva with its output.

1512


What is mean by data types in c?

542


Write a program to reverse a string.

628


Why C language is a procedural language?

612


where are auto variables stored? What are the characteristics of an auto variable?

580


What are the primitive data types in c?

563


How can I discover how many arguments a function was actually called with?

626