Examveda

What is the purpose of the ios::trunc flag in C++ file handling?

A. Truncates the file if it exists and opens it in write mode

B. Opens the file in trunc mode

C. Opens the file in read mode

D. Opens the file in append mode

Answer: Option A


Join The Discussion

Related Questions on File Handling in C plus plus