Which of the following system call is used for truncating a file?

Which of the following system call is used for truncating a file?
A. truncate
B. ftruncate
C. trunk
D. truncate and ftruncate
 
Answer: d
Explanation: The truncate and ftruncate calls can truncate a file to any length. These calls are often used in combination with lseek to overwrite a certain segment of a file.
 

Tìm kiếm

Back
Top