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


Please Help Members By Posting Answers For Below Questions

What does. int *x[](); means ?

639


Create a simple code fragment that will swap the values of two variables num1 and num2.

814


hi send me sample aptitude papers of cts?

1654


Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

606


What are the types of data structures in c?

604






What is the use of extern in c?

650


What is a null pointer in c?

598


Why c is procedure oriented?

574


what value is returned to operating system after program execution?

1607


What is pass by reference in functions?

326


How to explain the final year project as a fresher please answer with sample project

472


Differentiate between full, complete & perfect binary trees.

674


What does the function toupper() do?

658


hi, which software companys will take,if d candidate's % is jst 55%?

1666


What are the advantages of using Unions?

642