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 C language what is a 'dangling pointer'?
Explain what is the difference between far and near ?
which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +
write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.
What is a scope resolution operator in c?
Do string constants represent numerical values?
What is #include called?
please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................
How will you find a duplicate number in a array without negating the nos ?
int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;
What is an identifier?
What are the different types of control structures in programming?
How was c created?
What is a structure and why it is used?
Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.