How can I get the last byte of a file? Using C

How can I have my program find the last byte of a file and then get the byte number of it?

Comments

  • : How can I have my program find the last byte of a file and then get the byte number of it?
    :

    using FILE, seek to the end of the file, use ftell() to get the size of the file, use seek() to back up one byte then use fread() to read one byte.

  • : : How can I have my program find the last byte of a file and then get the byte number of it?
    : :
    :
    : using FILE, seek to the end of the file, use ftell() to get the size of the file, use seek() to back up one byte then use fread() to read one byte.
    :
    :
    Ok, thanks
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories