Which of the following techniques is the best option for dividing an integer by 2 and why?

Technique 1:

x = x >> 1;

Technique 2:

x = x / 2;

Here x is an integer.

22 Answers
22

Leave a Reply

Your email address will not be published. Required fields are marked *