# what is the function of fputs()?

74 views
in General
closed
what is the function of fputs()?

(a) read a line from a file

(b) read a character from a file

(c) write a character to a file

(d) write a line to a file

by (30.1k points)
selected

The correct option is (d) write a line to a file

Easy explanation - The fputs()  is used to write a line to a file. fputs()  syntax can be written as

int fputs(const char *str, FILE *stream);