how to write driver code in c