[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

fseek() fails and returns -1



Hi All,

 

 

 

I have two files on CD

 

1.upg.bin ( 1MB )

 

2.main.bin ( 3.06MB )

 

 

 

Compiler : SPARC compiler

 

 

 

 I am able to read first file but when I tried to read second file contents are Zero

 

 

 

I am able to open second file successfully but when I call the following fseek() routine   it returns nonzero.

 

 

 

fseek (fp,0,SEEK_END)   // fseek returns non zero

 

 

 

size=ftell(fp) // size is ZERO

 

 

 

I want to know what are the reasons that could cause fseek () to fail.

 

 

 

Warm regards

 

Prakash


Reply to: