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 is call by value in c?
Explain the use of keyword 'register' with respect to variables.
What is the difference between ++a and a++?
i got 75% in all semester am i eligible for your company
Why doesnt that code work?
Can we change the value of constant variable in c?
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.
Can a program have two main functions?
#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); }
What is static memory allocation? Explain
When should a type cast not be used?
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
Write a program to generate the Fibinocci Series
Explain what is the difference between a free-standing and a hosted environment?
diff between exptected result and requirement?