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
Which is the best website to learn c programming?
What is difference between %d and %i in c?
How are pointers declared in c?
what is use of malloc and calloc?
What is a #include preprocessor?
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
How do I convert a string to all upper or lower case?
What is the function of multilevel pointer in c?
define string ?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
Explain enumerated types.
What are the restrictions of a modulus operator?
What is strcmp in c?
What is difference between scanf and gets?
Does c have circular shift operators?