What is the use of truncate() method in file?

What is the use of truncate() method in file? Correct Answer truncates the file size

The method truncate() truncates the file size. Following is the syntax for truncate() method: fileObject.truncate( ) Parameters size — If this optional argument is present, the file is truncated to (at most) that size.

Related Questions

What is the purpose of the truncate() method in file handling?
truncate needs the ___ of the file as an argument but ftruncate works with _______