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...

value = 0xabcd;
for (loop = 1; (value >> 1) & 1 | loop & 1; loop++) {
foo();
if (loop & 1)
value >>= 1;
}

how many times is foo() executed?

Answer Posted / sbay

Shouldn't it be || though?
for (loop = 1; (value >> 1) & 1 || loop & 1; loop++)

????

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between void main and main in c?

1156


Do array subscripts always start with zero?

1299


Is it acceptable to declare/define a variable in a c header?

1125


What is the purpose of 'register' keyword in c language?

1027


How can I find the modification date and time of a file?

1083


What is use of integral promotions in c?

1148


What are the primitive data types in c?

1075


How do you search data in a data file using random access method?

1304


a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if

1143


Why doesnt long int work?

1038


How can I get back to the interactive keyboard if stdin is redirected?

1188


develop algorithms to add polynomials (i) in one variable

2169


When was c language developed?

1196


please give me some tips for the placement in the TCS.

2113


What is the use of gets and puts?

1030