M

Mr. Dubey • 52.77K Points
Coach

Q. How do you open a file in Ruby in write mode, creating it if it does not exist?

  • (A) File.create("filename.txt", "w")
  • (B) File.write("filename.txt", "w")
  • (C) File.open("filename.txt", "w")
  • (D) File.new("filename.txt", "w")
  • Correct Answer - Option(C)
  • Views: 61
  • Filed under category Ruby

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics