Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

how to find anagram without using string functions using only loops in c programming

3194


Explain spaghetti programming?

1258


Is c weakly typed?

1028


Explain what are its uses in c programming?

1064


Describe static function with its usage?

1210


The statement, int(*x[]) () what does in indicate?

1149


What are loops c?

1056


What is 02d in c?

1077


What is the deal on sprintf_s return value?

1138


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.

2817


what is the function of pragma directive in c?

1123


How can I avoid the abort, retry, fail messages?

1138


What is modeling?

1054


What is variable and explain rules to declare variable in c?

1094


I came across some code that puts a (void) cast before each call to printf. Why?

1220