πŸ“Š Ruby
Q. What will be the output of the given code?
Code:
boolean_var = 3**2 != 2**3 || true
puts boolean_var
  • (A) TRUE
  • (B) FALSE
  • (C) 1
  • (D) 0
πŸ’¬ Discuss
βœ… Correct Answer: (A) TRUE

Explanation: 2**3=8 and 3**2=9 both the values are not equal is true and true or true will evaluate to true hence the overall expression will evaluate to true.

Explanation by: Vinay Kumar
2**3=8 and 3**2=9 both the values are not equal is true and true or true will evaluate to true hence the overall expression will evaluate to true.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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