for(i=0;i=printf("Hello");i++);
printf("Hello");
how many times how will be printed?????????
Answer Posted / kalyan chukka
Here in the loop it given as i=0;i=printf("Hello");
So Printf function returns how many no of charecters it
printed so it takes 5 so loop is
for (i=0;i=5;i++) so loop will be this
in the above loop first i=0 and then we assign i=5 so loop
will become for(i=5;i++) it becomes infinite loop hello
printed infineite loop.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is call by reference in functions?
Which is best book for data structures in c?
I heard that you have to include stdio.h before calling printf. Why?
What the advantages of using Unions?
What are the types of type qualifiers in c?
What is a floating point in c?
Explain setjmp()?
Give me the code of in-order recursive and non-recursive.
What is double pointer?
When should you not use a type cast?
What is a good way to implement complex numbers in c?
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles
What is time null in c?
What is a macro?
Why string is used in c?