I
iceman
Hi all,
How do I truncate the file size.Is it possible to do this using
fopen ,fseek and fwrite.
Suppose I have a file of 30 KB if I want to reduce the size to
15KB,Howcan I do this without overwriting the the file[ie opening the
file for writing again and writing 15kb]
Itried this but it didnt work.
fseek(iofile,-150,SEEK_END);//150 is a random number
fwrite(numbers, sizeof(char),0,iofile);
Regards,
Jegan
How do I truncate the file size.Is it possible to do this using
fopen ,fseek and fwrite.
Suppose I have a file of 30 KB if I want to reduce the size to
15KB,Howcan I do this without overwriting the the file[ie opening the
file for writing again and writing 15kb]
Itried this but it didnt work.
fseek(iofile,-150,SEEK_END);//150 is a random number
fwrite(numbers, sizeof(char),0,iofile);
Regards,
Jegan