fseek
Example: fseek | Input-Output Functions |
Sets the current position in a file to a new location.
int fseek( FILE *file_pointer, long offset, int origin);
file_pointer | A pointer to a file. |
offset | The offset within the file, in bytes. |
origin | The starting point. Use one of the following values: SEEK_SET (0) Beginning of file. SEEK_CUR (1) Current position of the file pointer. SEEK_END (2) End of file. |
For fseek details, refer to your C language documentation.
Return Values
If successful, the function returns 0. Otherwise it returns non-zero.