But, does SEEK_SET set the pointer to the beginning of the file. Will I get a 1GB in such a case.

I was thinking of something like this:
long int size;
file *f;
int *buff[102400];
if(size<1024000000)
{
fwrite(buff, 1, 102400, file);
size+=102400;
}
Please suggest. Thanks!