Thread: file io

  1. #16
    Registered User
    Join Date
    Sep 2006
    can you please explain the :
    fseek functions arguments?
    exit functions argument?
    $ gcc new.c?
    $ ./a.exe?
    thank you
    Last edited by Abda92; 09-18-2006 at 09:56 PM.

  2. #17
    Registered User
    Join Date
    Jun 2004
    277 || man fseek

    #include <stdio.h>
    int fseek( FILE *stream, long offset, int origin );

    The function fseek() sets the file position data for the given stream. The origin value should have one of the following values (defined in stdio.h):

    Name Explanation

    SEEK_SET Seek from the start of the file

    SEEK_CUR Seek from the current location

    SEEK_END Seek from the end of the file

    fseek() returns zero upon success, non-zero on failure. You can use fseek() to move beyond a file, but not before the beginning. Using fseek() clears the EOF flag associated with that stream.

  3. #18
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    > fseek functions arguments?
    > exit functions argument?
    Why don't you use the same resource which told you about the printf() arguments or strcat() arguments?

    > $ gcc new.c?
    > $ ./a.exe?
    Take a wild guess - what do you think it could possibly mean?
    - do my laundry
    - reboot my computer
    - search the web
    - compile and run the program.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A development process
    By Noir in forum C Programming
    Replies: 37
    Last Post: 07-10-2011, 10:39 PM
  2. Formatting the contents of a text file
    By dagorsul in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2008, 12:36 PM
  3. Can we have vector of vector?
    By ketu1 in forum C++ Programming
    Replies: 24
    Last Post: 01-03-2008, 05:02 AM
  4. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 03:30 PM
  5. File IO with .Net SDK and platform SDK
    By AtomRiot in forum Windows Programming
    Replies: 5
    Last Post: 12-14-2004, 10:18 AM