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 / bharath kumar
Hello,
The answer is b.
a=0+1=1
a=1+1=2
a=2+1=3
a=3+1=4
a=4+1=5
While a variable is storing the 5 result a is nither less
then are equal to 5 hence the application will come out of
the loop.So while loop had run 5 times.
| Is This Answer Correct ? | 28 Yes | 4 No |
Post New Answer View All Answers
What is the difference between functions abs() and fabs()?
Why is it that not all header files are declared in every C program?
What are c preprocessors?
What are the primitive data types in c?
What is the basic structure of c?
What is 2 d array in c?
What is the benefit of using #define to declare a constant?
where are auto variables stored? What are the characteristics of an auto variable?
What does the error message "DGROUP exceeds 64K" mean?
write a c program to find the sum of five entered numbers using an array named number
Write a program that accept anumber in words
what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)
What is the explanation for prototype function in c?
Did c have any year 2000 problems?
How do I swap bytes?