Solved

fseek

Posted on 1998-05-11
2
312 Views
Last Modified: 2010-04-15
does fseek fail(return nozero), if it goes past the end of the file?
jesse.laeuchli@usa.net
0
Comment
Question by:laeuchli
2 Comments
 
LVL 2

Expert Comment

by:seedy
ID: 1250655
Seeking pas t end of file will succeed.  So, fseek will not return nonzero to indicate error.
0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 10 total points
ID: 1250656
The documentation (in VC) on fseek says:

"You can use fseek to reposition the pointer anywhere in a file. The pointer can also be positioned BEYOND THE END OF THE FILE. fseek clears the end-of-file indicator and negates the effect of any prior ungetc calls against stream."

However, it is not clear what will be written to / read from the file after an fseek past eof.

0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question