1.

Why ++n Executes Faster Than N+1?

Answer»

The expression ++n requires a single machine INSTRUCTION such as INR to carry out the increment operation. In case of n+1, apart from INR, other instructions are required to load the VALUE of n. That is why ++n is FASTER.

The expression ++n requires a single machine instruction such as INR to carry out the increment operation. In case of n+1, apart from INR, other instructions are required to load the value of n. That is why ++n is faster.



Discussion

No Comment Found