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 / pratik chopra

Yes this can be made generic;
Approach: 7*x=(8-1)*x= 8*x-1*x=x<<3-x

If 6*x=(4+2)x=4*x+2*x=x<<2+x<<1
If 13*x=(16-2-1)x=(x<<4-x<<1-x)

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In which language linux is written?

1191


Are there constructors in c?

984


If you know then define #pragma?

1064


What are pointers?

1062


What is the c value paradox and how is it explained?

1008


What is merge sort in c?

1013


What is function pointer c?

1056


How do I round numbers?

976


Is using exit() the same as using return?

1280


Write a program to print "hello world" without using a semicolon?

1025


Explain indirection?

1076


How can I copy just a portion of a string?

1287


Can the curly brackets { } be used to enclose a single line of code?

1134


Explain the difference between null pointer and void pointer.

1049


What’s the special use of UNIONS?

1121