03rd
Feb
Ruby MCQ

Ruby MCQ

  • Admin
  • 03rd Feb, 2023
  • 1039 Followers

Take Ruby MCQ Quiz & Online Test to Test your Knowledge

We have listed below the best Ruby MCQ Questions that check your basic knowledge of Ruby Programming Language. This Ruby MCQ Test contains 20 Multiple Choice Questions. You have to select the right answer to the question. You can also download the Ruby MCQ Pdf from the given link between the Quiz.

Ruby MCQ Questions

1) Is Ruby a strongly typed language?

  • A. Yes
  • B.No

2) Ruby is an object oriented general purpose programming language.

  • A. False
  • B.True

3) ........... syntax matches with the Ruby’s syntax.

  • A. Java
  • B.PHP
  • C.Perl
  • D.None of above

4) Which of the following is the file extension used for saving the ruby file?

  • A. .rb
  • B..ruby
  • C..rrb
  • D.None of above

5) Which of the following datatypes are valid in Ruby?

  • A. String
  • B.Boolean
  • C.Numbers
  • D.All of the Above
Download Free : Ruby MCQ PDF

6) What are the sequence of ruby strings?

  • A. 8-bit bytes
  • B.10-bit bytes
  • C.16-bit bytes
  • D.None of above

7) Which of the following are valid floating point literal in ruby?

  • A. 0.2
  • B.0.5
  • C.1.0
  • D.None of above

8) What does the .upcase method do?

  • A. Convert the string to lowercase
  • B.Convert the string to uppercase
  • C.Convert only lowercase string to uppercase and vice-versa
  • D.None of above

9) Which of the following type of comments are valid in ruby?

  • A. Single Line
  • B.Multiple Line
  • C.Both Single & Multiple Line
  • D.None of above

10) Which of the following symbol is used for commenting in ruby?

  • A. *
  • B./
  • C.#
  • D.$

11) Which of the following is valid conditional statement in ruby?

  • A. els
  • B.else
  • C.if else
  • D.None of above

12) The == ‘is equal to’ is known as relational operator in ruby?

  • A. True
  • B.False

13) What does the 1…10 indicate?

  • A. Inclusive range
  • B.Exclusive range
  • C.Both inclusive and exclusive range
  • D.None of above

14) What is ruby?

  • A. Markup language
  • B.Scripting language
  • C.Procedural language
  • D.Stylesheet language

15) Ruby was developed in ............ by ......................

  • A. 1991, Brendan Eich
  • B.1992, Tim Berners-Lee
  • C.1993, Yukihiro Matsumoto
  • D.1994, Brendan Eich

16) Ruby runs on which platform?

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

17) Which is not a Reserved Words in Ruby?

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

18) Ruby was written in which language?

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

19) Which of the following option is supported by Ruby?

  • A. Dynamic Type System
  • B.Multiple Programming Paradigms
  • C.Automatic Memory Management
  • D.All of the Above

20) 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

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

01st
Jun
Kotlin MCQ
01st
Jan
Docker MCQ
01st
Sep
LISP MCQ
01st
Mar
Robotics MCQ