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
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.
Give me the code of in-order recursive and non-recursive.
Can we change the value of #define in c?
What is && in c programming?
formula to convert 2500mmh2o into m3/hr
What are all different types of pointers in c?
What are c preprocessors?
What is void main () in c?
What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?
Do you know the use of 'auto' keyword?
What would happen to X in this expression: X += 15; (assuming the value of X is 5)
How can I check whether a file exists? I want to warn the user if a requested input file is missing.
Is c is a high level language?
Explain how can I right-justify a string?
What is the importance of c in your views?