What is the use of truncate() method in file?
A. truncates the file’s size
B. deletes the content of the file
C. deletes the file’s size
D. None of the mentioned
Answer:A
What is the use of truncate() method in file?
A. truncates the file’s size B. deletes the content of the file C. deletes the file’s size D. None of the mentioned
Explanation: The method truncate() truncates the file’s size. Following is the syntax for truncate() method: