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

What is call by value in c?

653


Explain the use of keyword 'register' with respect to variables.

701


What is the difference between ++a and a++?

816


i got 75% in all semester am i eligible for your company

1837


Why doesnt that code work?

685






Can we change the value of constant variable in c?

667


Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.

3794


Can a program have two main functions?

691


#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }

712


What is static memory allocation? Explain

713


When should a type cast not be used?

705


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

825


Write a program to generate the Fibinocci Series

759


Explain what is the difference between a free-standing and a hosted environment?

744


diff between exptected result and requirement?

1685