Answer Posted / maria
1) For checking modulo use
num1&(num2-1)
instead:
num1%num2
2) For multiplying or dividing by 2 use left and right shift
accordingly.
3) In loop use, if code allows it, decrement,like this:
for(int i = MAX_VALUE ; i > 0 ; i--)
instead:
for(int i = 0 ; i < MAX_VALUE; i++)
| Is This Answer Correct ? | 7 Yes | 7 No |
Post New Answer View All Answers
What is the most useful programming language?
What are abstract data types in c++?
What is the basic of c++?
What is protected inheritance?
How to access a variable of the structure?
What is a multimap c++?
Why use of template is better than a base class?
What is the basic structure of a c++ program?
Explain virtual destructor?
Is swift faster than go?
Who made c++?
What are exceptions c++?
What are activex and ole?
Is there structure in c++?
What are literals in C++?