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 is const and volatile in c?
difference between Low, Middle, High Level languages in c ?
Is struct oop?
Explain null pointer.
How can my program discover the complete pathname to the executable from which it was invoked?
application attempts to perform an operation?
Why is c called c not d or e?
What is structure padding in c?
What is a node in c?
what are bit fields? What is the use of bit fields in a structure declaration?
Explain union.
When should the register modifier be used? Does it really help?
Is it valid to address one element beyond the end of an array?
The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none
Is anything faster than c?