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 text and binary i/o?

997


can we have joblib in a proc ?

2231


Can we change the value of constant variable in c?

1005


What is the use of linkage in c language?

1011


What do you mean by scope of a variable in c?

972


What is the difference between array and structure in c?

1085


What do you mean by invalid pointer arithmetic?

1003


#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }

1129


What is the benefit of using an enum rather than a #define constant?

1172


What is function definition in c?

1018


In which language linux is written?

1167


What is the difference between null pointer and wild pointer?

1136


What are local static variables? How can you use them?

1081


writ a program to compare using strcmp VIVA and viva with its output.

1976


Why is c called c not d or e?

1048