finding size of a file - Programmers Heaven

Howdy, Stranger!

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

Categories

finding size of a file

aarti_gehaniaarti_gehani Posts: 15Member
hi....
can any1 tell me the command to find the size of file in C
and
initializing a char to zero value?

Comments

  • psychofox19psychofox19 Posts: 41Member
    I'm not sure about the size of the file but for the char value yo could just assign it as '' (2 single quotes) as I don't think a normal char accepts NULL as a value.
  • AsmGuru62AsmGuru62 Posts: 6,519Member
    [code]
    FILE* pFile = fopen ("", "rb");
    fseek (pFile, 0, SEEK_END);
    long lFileSize = ftell (pFile);
    [/code]
  • aarti_gehaniaarti_gehani Posts: 15Member
    thanx...
    but when i used these codes in one of the programs it shows me the following error:
    Debug assertion failed.
    it shows some file fseek.c
    can you plz explain me what is this???
Sign In or Register to comment.