for(i=0;i=printf("Hello");i++);
printf("Hello");
how many times how will be printed?????????
Answer Posted / vignesh1988i
here the basic thing we must understand is that :
printf(); is a function. this printf() always returns the
number of character it processes inside " ".......here it
will return 4 according to me... this will will be assigned
to i and everytime 'i' will be a non zero value always and
also a semicolon is placed after for statement , so compiler
takes that has the next line and PRINTS "HELLO" INFINITELY
since 'i' value is always non zero or always TRUE...
and there is no way for the second printf() to get printed
according to me.........
thank u
| Is This Answer Correct ? | 18 Yes | 5 No |
Post New Answer View All Answers
how to find anagram without using string functions using only loops in c programming
Explain spaghetti programming?
Is c weakly typed?
Explain what are its uses in c programming?
Describe static function with its usage?
The statement, int(*x[]) () what does in indicate?
What are loops c?
What is 02d in c?
What is the deal on sprintf_s return value?
1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.
what is the function of pragma directive in c?
How can I avoid the abort, retry, fail messages?
What is modeling?
What is variable and explain rules to declare variable in c?
I came across some code that puts a (void) cast before each call to printf. Why?