Robotics & Artificial Intelligence

The statement 5 % 4 will return …………… .

  1. 0
  2. 1
  3. 2
  4. 3

Getting Started

2 Likes

Answer

1

Reason — The modulus operator (%) returns the remainder after division of two numbers. When 5 is divided by 4, the remainder obtained is 1, hence the result is 1.

Answered By

3 Likes


Related Questions