which is the easy way to divide any integer by 2?

Answers were Sorted based on User's Feedback



which is the easy way to divide any integer by 2?..

Answer / rahul

int i = 10;
i = i >> 1;

Is This Answer Correct ?    15 Yes 0 No

which is the easy way to divide any integer by 2?..

Answer / saranya

if s=10
s=s>>1

Is This Answer Correct ?    5 Yes 1 No

Post New Answer

More C++ General Interview Questions

How to give an alternate name to a namespace?

0 Answers  


Explain the operation of overloading of an assignment operator.

0 Answers  


What is linked list in c++?

0 Answers  


what is a reference variable in C++?

0 Answers  


How much do coding jobs pay?

0 Answers  






Define private, protected and public access control.

0 Answers  


How the memory management in vectors are being done. What happens when the heap memory is full, and how do you handle it ?

0 Answers   Yahoo,


What are the various compound assignment operators in c++?

0 Answers  


Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?

0 Answers  


What are the advantages of using a pointer?

0 Answers  


what kind of projects are suitable for c and c++

0 Answers  


What is the role of C++ shorthand's?

0 Answers   TCS,


Categories