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
In which language linux is written?
Are there constructors in c?
If you know then define #pragma?
What are pointers?
What is the c value paradox and how is it explained?
What is merge sort in c?
What is function pointer c?
How do I round numbers?
Is using exit() the same as using return?
Write a program to print "hello world" without using a semicolon?
Explain indirection?
How can I copy just a portion of a string?
Can the curly brackets { } be used to enclose a single line of code?
Explain the difference between null pointer and void pointer.
What’s the special use of UNIONS?