This seems quite simple: first seek to the required start offset and then write the data content for the required length; this can be done via the pair of lseek(2) and write(2) system calls. Of course, we will have to invoke this pair of system calls three times. So, we write some code to actually perform this task; see the (relevant snippets) of the code here (ch18/sgio_simple.c):
#define A_HOLE_LEN 10#define A_START_OFF A_HOLE_LEN#define A_LEN ...