1

What is the output of the following R code: for (i in 1:5) { if (i %% 2 == 0) { print(i) } }

Correct Answer: 2, 4

Make the most of this question

This page focuses on one R Programming MCQs question from Programming. After checking the answer, return to the topic list to practice more or run a timed set.

R Programming MCQs MCQ: What is the output of the following R code: for (i in 1:5) { if (i %% 2 == 0) { print(i) } } | Extra Education