Vidyalelo
R Programming · Q12

Control Structures in R Programming

Programming · R Programming · question 12

Q12

In R, what does the if (condition) code_block else code_block statement do?

A.
Executes code_block if the condition is true, otherwise executes the else block
Answer
B.
Executes code_block if the condition is false, otherwise executes the else block
C.
Executes code_block if the condition is true, otherwise does nothing
D.
Executes code_block if the condition is false, otherwise does nothing

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board