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

Give a fast way to multiply a number by 7

Answer Posted / rupesh

There is a problem with
x=(x<<3)-x;
Suppose that x is stored in 8 bit format.
If x = 64, i.e. 2^6, then this won't work.
In general, if x is n-bit, and value of x > 2^(n-3), then
this won't work.

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.

2003


Give me the code of in-order recursive and non-recursive.

1378


Can we change the value of #define in c?

1001


What is && in c programming?

1166


formula to convert 2500mmh2o into m3/hr

1000


What are all different types of pointers in c?

1012


What are c preprocessors?

1198


What is void main () in c?

1214


What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?

1473


Do you know the use of 'auto' keyword?

1204


What would happen to X in this expression: X += 15; (assuming the value of X is 5)

1952


How can I check whether a file exists? I want to warn the user if a requested input file is missing.

1150


Is c is a high level language?

1194


Explain how can I right-justify a string?

1046


What is the importance of c in your views?

1176