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
What is the ANSI C Standard?
Explain threaded binary trees?
Why main function is special give two reasons?
What is ponter?
why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above
What is the right type to use for boolean values in c? Is there a standard type?
Can we access array using pointer in c language?
what is the syallabus of computer science students in group- 1?
What are the primitive data types in c?
How can I implement a delay, or time a users response, with sub-second resolution?
What is the difference between break and continue?
Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.
Explain what is the difference between null and nul?
What is difference between structure and union in c?
What is a static variable in c?