What does the fseek function do in a C program?
- Sets the file position indicator to the beginning
- Moves the file position indicator to the end
- Positions the file pointer to a specified location
- Closes the file
The correct option is c. Positions the file pointer to a specified location. The fseek() function in C is used to set the file position indicator to a specific location within the file, allowing random access and manipulation of file contents.
Loading...
Related Quiz
- A two-dimensional array can be visualized as a ________.
- What potential issue should be considered when using recursion in C programs?
- You are writing a C program where you need to maintain a counter that persists across multiple function calls. Which type of variable would you use?
- To split a string into tokens in C, the function ________ is used.
-
What is the difference between #include "filename" and #include
in C?