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
Describe private, protected and public – the differences and give examples.
What you know about structures in C++?
Explain the concept of memory leak?
What does flush do c++?
What is protected inheritance?
What is a breakpoint?
Is it possible for a member function to delete the pointer, named this?
What is purpose of abstract class?
What is ctime c++?
Eplain extern keyword?
Do you know the use of vtable?
Why do we need runtime polymorphism in c++?
What is cin clear () in c++?
Explain terminate() and unexpected() function?
Explain bubble sorting.