Q. What happens if you open a file in 'w' mode that already exists?

  • (A) It reads the file
  • (B) It appends to the file
  • (C) It deletes the existing file content
  • (D) It raises an error
πŸ’¬ Discuss
βœ… Correct Answer: (C) It deletes the existing file content
Explanation: Opening in 'w' mode erases existing contents of the file.
Explanation by: Mr. Dubey
Opening in 'w' mode erases existing contents of the file.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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