What is the result of the expression 5 %% 2 in R?

What is the result of the expression 5 %% 2 in R?

a) 1
b) 0
c) 2
d) 5

Answer:

a) 1

Explanation:

The %% operator returns the remainder of the division, so 5 %% 2 equals 1.

Reference:

R Programming – Operators MCQ Questions and Answers

Scroll to Top