Multiple choice softskills creativity

Which one is faster among the following?

  1. i=i+1

  2. i=1*1

  3. i++

  4. i=i^2

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In many low-level environments and older compilers, simple addition (i=i+1) or increment (i++) is faster than multiplication or exponentiation. However, modern compilers optimize these to be identical. The stored answer 'i=i+1' is a traditional choice for basic arithmetic speed.