πŸ“Š Ruby
Q. What will be the output of the given code?
Code:
a=1
b=1
while a&&b
puts a+b
end
  • (A) 2
  • (B) 2 2 2 2 2
  • (C) Infinite Loop
  • (D) Syntax Error
πŸ’¬ Discuss
βœ… Correct Answer: (C) Infinite Loop

Explanation: Infinite loop is the correct answer.

Explanation by: Vinay Kumar
Infinite loop is the correct answer.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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