πŸ“Š Ruby
Q. What will be output for the following code?
Code:
str = ""Hello Ruby!""
putc str
  • (A) Hello Ruby!
  • (B) H
  • (C) R
  • (D) Hello
πŸ’¬ Discuss
βœ… Correct Answer: (B) H

Explanation: The output of the following code is just the character H.The putc statement can be used to output one character at a time.

Explanation by: Mr. Dubey
The output of the following code is just the character H.The putc statement can be used to output one character at a time.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
125
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
87%
Success Rate