What will be the output of the following R function? [code]paste("Everybody", "is", “a” , "warrior")[/code]

Vy Bùi

New member
What will be the output of the following R function?
Code:
paste("Everybody", "is", “a” , "warrior")
A. “Everybody", "is", “a” , "warrior”
B. Everybody is a warrior
C. Everybody", "is", “a” , "warrior
D. “Everybody is a warrior”
 
Answer: d
Explanation: Both paste() and cat() print out text to the console by combining multiple character vectors together, it is impossible for those functions to know in advance how many character vectors will be passed to the function by the user.
 

Tìm kiếm

Back
Top