In C, the ________ function is used to write a string to a file.
- write()
- fputstring()
- fwrite()
- fputs()
The correct option is fputs(). This function is used to write a string to a file in C, providing a convenient way to output a sequence of characters to the specified file.
Loading...
Related Quiz
- What is a potential risk of using the gets() function for reading strings in C?
- The memory consumed by an array declared as float arr[10][20]; is ________.
- When you declare an array, what does the number inside the square brackets represent?
- You are developing a library of mathematical functions. How can you design the library to allow users to apply custom operations on data without modifying the library code?
- What is the advantage of using pointers to structures instead of directly using structures?