πŸ“Š Ruby
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}
πŸ’¬ Discuss
βœ… Correct Answer: (B) str1: #{str1}

Explanation: Cannot Interpolate so output is str1: #{str1}.

Explanation by: Vinay Kumar
Cannot Interpolate so output is str1: #{str1}.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
175
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Vinay Kumar
Publisher
πŸ“ˆ
95%
Success Rate