a=0;
while(a<5)
printf("%d\n",a++);
how many times does the loop occurs?
a.infinite
b.5
c.4
d.6
Answer Posted / deepu_ashu
as the value of "a" increases after printing the value.
so it will print the value
0
1
2
3
4
but after printing the value 4 ,it becomes 5 for the next iteration.
so the condition becomes false.
the loop will not execute any more.
Is This Answer Correct ? | 12 Yes | 1 No |
Post New Answer View All Answers
what are # pragma staments?
Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.
What is the use of typedef in structure in c?
Can we declare variables anywhere in c?
Is malloc memset faster than calloc?
Can you please compare array with pointer?
What is switch in c?
Suggesting that there can be 62 seconds in a minute?
What will the preprocessor do for a program?
Why isn't it being handled properly?
Explain the use of bit fieild.
What do header files do?
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
Why do we use stdio h and conio h?
What are structures and unions? State differencves between them.