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
Write a program that accept anumber in words
Why is this loop always executing once?
How reliable are floating-point comparisons?
How can I handle floating-point exceptions gracefully?
Why cant I open a file by its explicit path?
How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?
the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?
State the difference between realloc and free.
hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .
What is the difference between break and continue?
Can main () be called recursively?
Apart from dennis ritchie who the other person who contributed in design of c language.
Explain which function in c can be used to append a string to another string?
When should a type cast not be used?
"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above