Home / Programming Questions / Ruby MCQs / Page 11

Ruby MCQs with answers Page - 11

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

V

Vinay Kumar • 8.45K Points
Tutor III

Q. String is a sequence of _________ characters.

(A) one
(B) many
(C) Both A and B
(D) None of the above

V

Vinay Kumar • 8.45K Points
Tutor III

Q. String may consists of ..........

(A) Number
(B) letter
(C) Special character
(D) All of the above

V

Vinay Kumar • 8.45K Points
Tutor III

Q. String are

(A) mutable
(B) unmutable
(C) Both A and B
(D) None of the above

V

Vinay Kumar • 8.45K Points
Tutor III

Q. Double quotes and single quotes will interpolates ?

(A) TRUE
(B) FALSE
(C) double quotes will interpolates
(D) Single quotes will interpolates

V

Vinay Kumar • 8.45K Points
Tutor III

Q. What will be output for the following code?

Code:
str1 = "LFC" puts 'str1: #{str1}'
(A) str1: LFC
(B) str1: #{str1}
(C) str1: {LFC}
(D) str1: #{LFC}

V

Vinay Kumar • 8.45K Points
Tutor III

Q. what will be output for the following code?

Code:
str1 = LFC puts "str1: #{str1}"
(A) str1: LFC
(B) str1: #{str1}
(C) str1: {LFC}
(D) str1: #{LFC}

V

Vinay Kumar • 8.45K Points
Tutor III

Q. In ruby, User can access the string elements by using the__________?

(A) {}
(B) []
(C) ()
(D) All of the above

Y

Yami Thakur • 9.05K Points
Tutor III

Q. Ruby arrays are ____________

(A) unordered
(B) ordered
(C) Both A and B
(D) None of the above

Login

Forgot username? click here

Forgot password? Click here

Don't have account? Register here.