Bird
0
0

Which of these is a reason to use file handling in Ruby?

easy📝 Conceptual Q2 of 15
Ruby - File IO
Which of these is a reason to use file handling in Ruby?
ATo change Ruby syntax rules
BTo speed up program execution
CTo store user data permanently
DTo automatically debug code
Step-by-Step Solution
Solution:
  1. Step 1: Identify file handling use cases

    File handling is used to save data permanently outside the program.
  2. Step 2: Match reason with options

    Only To store user data permanently matches this use case correctly.
  3. Final Answer:

    To store user data permanently -> Option C
  4. Quick Check:

    File handling use = Permanent data storage [OK]
Quick Trick: File handling stores data beyond program runtime [OK]
Common Mistakes:
  • Confusing file handling with performance improvement
  • Thinking it changes language syntax

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Ruby Quizzes