Home / Programming MCQs / Ruby MCQs / Question

V

Vinay Kumar • 8.55K 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}
Explanation by: Vinay Kumar
Cannot Interpolate so output is str1: #{str1}.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.