The fputs() function is used for writing into the file. Here is its syntax:
int fputs (const char *string, FILE *file_pointer)
Here, string represents the character array containing the data to be written into the file. The file_pointer phrase represents the file pointer that is pointing at the file.