On Mon, Sep 06, 2004 at 01:47:58PM +0100, Ankit Jain wrote: > "fread and fwrite return the number of items > successfully read " > well i am reading 32 complex neumbers... No, you're reading 32*16 == 512 elements (i.e. complex numbers) each 16 bytes in size. Try: if(fread(in,sizeof(complex),32,fp) != 32) HTH Claudio