Ruby Basic MCQ

11. On which platform ruby runs on ?

A. Windows
B. Mac OS
C. Unix
D. All of the above

View Answer

12. Ruby was written in?

A. C
B. C++
C. Java
D. Objective C

View Answer

13. Which will be output for the followinf code?

puts "Hello, Ruby!";

A. Hello, Ruby
B. Hello Ruby!
C. Hello, Ruby!
D. Hello Ruby

View Answer

14. Which of the following is not a Reserved Words in Ruby?

A. begin
B. ensure
C. retry
D. pass

View Answer

15. Which statement is used to declares code to be called before the program is run?

A. Start
B. Begin
C. Here
D. End

View Answer

16. Block comment conceals several lines from the interpreter with?

A. =begin and =end
B. =start and =end
C. =here and =end
D. =begin and =ending

View Answer

17. Which of the following is a Reserved Words in Ruby?

A. do
B. or
C. in
D. All of the above

View Answer

18. Which of the following features does the 2.0 version of ruby supports?

A. New literals
B. Security fixes
C. Method keyword arguments
D. All of the above

View Answer

19. What is the extension used for saving the ruby file?

A. .rb extension
B. .ruby extension
C. .rrb extension
D. .rbb extension

View Answer

20. Ruby 2.7.1 version release date?

A. 31-03-2019
B. 31-01-2020
C. 31-03-2020
D. 31-04-2019

View Answer


* You must be logged in to add comment.