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 are structure passing and returning implemented?

982


Explain what are global variables and explain how do you declare them?

1083


Sir i need notes for structure,functions,pointers in c language can you help me please

2349


Which control loop is recommended if you have to execute set of statements for fixed number of times?

1297


write a program to find the given number is prime or not

4654


Is javascript based on c?

994


What is class and object in c?

1044


Explain union.

1112


What is array within structure?

1057


Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

1033


How can I read and write comma-delimited text?

1007


What is printf () in c?

1010


Explain the use of 'auto' keyword

1071


What is a structure and why it is used?

1134


Function calling procedures? and their differences? Why should one go for Call by Reference?

1040