fp A file pointer. The specified file pointer must refer to a file currently opened for writing or updating. buffer The address of contiguous storage from which the output data is taken. nbytes The maximum number of bytes involved in the write operation.