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 are structure passing and returning implemented?
Explain what are global variables and explain how do you declare them?
Sir i need notes for structure,functions,pointers in c language can you help me please
Which control loop is recommended if you have to execute set of statements for fixed number of times?
write a program to find the given number is prime or not
Is javascript based on c?
What is class and object in c?
Explain union.
What is array within structure?
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
How can I read and write comma-delimited text?
What is printf () in c?
Explain the use of 'auto' keyword
What is a structure and why it is used?
Function calling procedures? and their differences? Why should one go for Call by Reference?