

InterviewSolution
Saved Bookmarks
1. |
What is the use of truncate() method in file?(a) truncates the file size(b) deletes the content of the file(c) deletes the file size(d) none of the mentioned |
Answer» The correct answer is (a) truncates the file size The best explanation: The method truncate() truncates the file size. Following is the syntax for truncate() method: fileObject.truncate( [ size ]) Parameters size — If this optional argument is present, the file is truncated to (at most) that size. |
|