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


Please Help Members By Posting Answers For Below Questions

Why c is faster than c++?

637


What is the difference between struct and typedef struct in c?

661


How can you draw circles in C?

631


Write a program to swap two numbers without using third variable?

817


What is a lookup table in c?

629






What is dynamic memory allocation?

812


Is null equal to 0 in sql?

657


Why is it that not all header files are declared in every C program?

687


When should a type cast not be used?

627


write a progrmm in c language take user interface generate table using for loop?

1576


How is = symbol different from == symbol in c programming?

618


What are pragmas and what are they good for?

580


Why dont c comments nest?

625


regarding pointers concept

1579


What is the explanation for prototype function in c?

573