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

Why are pointers not used in c++?

0 Answers  


What is a storage class? Mention the storage classes in c++.

0 Answers  


What are proxy objects in c++?

0 Answers  


Can we use this pointer inside static member function?

0 Answers  


What is meant by const_cast?

0 Answers  






What are static and dynamic type checking?

0 Answers  


Which field is used in c++?

0 Answers  


What is object file? How can you access object file?

0 Answers  


what is software cycle? What is a mission critical system ? What is the important aspect of a real-time system ? Explain the difference between microkernel and macro kernel. Give an example of microkernel.Why paging is used ? Which is the best page replacement algo and Why ? What is software life cycle ? How much time is spent usually in each phases and why Which one do U want to work if selected in Honeywell ? Which are the different types of testing ? What is a distributed system ? Some questions about CSP. Which languages do U know ? What are the differences between Pascal and C. questions from Compiler construction and Lisp. Which are the different computer architecture? What is the requirement in MIMD ? What is the difference between RISC and CISC processors ? Difference between loosely coupled and tightly coupled systems ? What is an open system?

0 Answers   Honeywell,


What is a storage class?

0 Answers  


What is extern c++?

0 Answers  


How a pointer differs from a reference?

0 Answers  


Categories