How to get the current address. Actually first i leave some empty space to write the offset address.
After writing data from buffer, i have to calculate the offset address and have to write back the offset address..
i will give you the picture, how i have to write dat file.
see atachment..