21.
How do you create a vector containing the first 5 prime numbers in R using a while loop?

22.
In R, what is the purpose of the ifelse() function?

23.
How is the for loop different from the while loop in R?

24.
What does the Sys.sleep(2) function do in R?

27.
In R, how do you create a switch statement with a default case?

28.
How do you create a loop that prints the squares of numbers from 1 to 10 in R?

29.
In R, what is the purpose of the next statement in a loop?

Read More Section(Control Structures in R Programming)

Each Section contains maximum 100 MCQs question on Control Structures in R Programming. To get more questions visit other sections.