Home / Programming Questions / Ruby MCQs / Page 6

Ruby MCQs with answers Page - 6

Dear candidates you will find MCQ questions of Ruby here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question

Q. Which of the following is not type of operator in ruby?

(A) Arithmetic Operators
(B) Comparison Operators
(C) Similar operator
(D) Parallel Assignment

Q. Which operator is used to find exponent in ruby?

(A) *
(B) **
(C) ^
(D) %

Q. eql? Operator is used for?

(A) Used to test equality within a when clause of a case statement.
(B) if the receiver and argument have both the same type and equal values.
(C) if the receiver and argument have the same object id.
(D) All of the above

Q. equal? Operator is used for?

(A) Used to test equality within a when clause of a case statement.
(B) if the receiver and argument have both the same type and equal values.
(C) if the receiver and argument have the same object id.
(D) All of the above

Q. Which of the following is not a type of Bitwise Operators?

(A) <<
(B) ^
(C) ~
(D) None of the above

Q. Guess the operator : If Condition is true ? Then value X : Otherwise value Y?

(A) Range Operators
(B) Ternary Operator
(C) Parallel Operator
(D) Arithmetic operator

Q. In range operator ... is used for ?

(A) Creates a range from start point to end point inclusive.
(B) Creates a range from start point to end point exclusive.
(C) Creates a range from start point inclusive to end point exclusive.
(D) Creates a range from start point exclusive to end point inclusive.

Q. .......... used for Creates a range from start point to end point exclusive.

(A) define
(B) define?
(C) defined?
(D) defined

Login

Forgot username? click here

Forgot password? Click here

Don't have account? Register here.