Geography, asked by vardanaadeshkumar, 4 months ago

Which is a valid way to call function fseek for a file pointer fp?​

Answers

Answered by abose
0

Answer:

The fseek() function is used to set the file pointer to the specified offset. It is used to write data into file at desired location.

Syntax:

int fseek(FILE *stream, long int offset, int whence)

Answered by krishna210398
0

Answer:

The fseek() function seeks in an open file. This function moves the file pointer from its current position to a new position, forward or backward, specified by the number of bytes.

Explanation:

fseek(fptr, 0, SEEK_SET); to reset the pointer to the start of the file. You cannot do that for stdin . If you need to be able to reset the pointer, pass the file as an argument to the program and use fopen to open the file and read its contents

#spj2

Similar questions