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 does. int *x[](); means ?
Create a simple code fragment that will swap the values of two variables num1 and num2.
hi send me sample aptitude papers of cts?
Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What are the types of data structures in c?
What is the use of extern in c?
What is a null pointer in c?
Why c is procedure oriented?
what value is returned to operating system after program execution?
What is pass by reference in functions?
How to explain the final year project as a fresher please answer with sample project
Differentiate between full, complete & perfect binary trees.
What does the function toupper() do?
hi, which software companys will take,if d candidate's % is jst 55%?
What are the advantages of using Unions?