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
Differentiate between static and dynamic modeling.
Badboy is defined who has ALL the following properties: Does not have a girlfriend and is not married. He is not more than 23 years old. The middle name should be "Singh" The last name should have more than 4 characters. The character 'a' should appear in the last name at least two times. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers
How pointer is different from array?
Why we use conio h in c?
Are bit fields portable?
Write a c program to build a heap method using Pointer to function and pointer to structure ?
Is this program statement valid? INT = 10.50;
Describe the difference between = and == symbols in c programming?
All technical questions
What is null pointer in c?
What is 'bus error'?
Differentiate abs() function from fabs() function.
if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0
Why we not create function inside function.
Write a program to reverse a given number in c?