Which loop runs at least once, regardless of the condition?

Which loop runs at least once, regardless of the condition?

a) for loop
b) while loop
c) repeat loop
d) None of the above

Answer:

c) repeat loop

Explanation:

The repeat loop runs indefinitely until a break statement is encountered, so it executes at least once.

Reference:

R Programming – Loops MCQ Questions and Answers

Scroll to Top