You need to use Oracle ProC which comes with Oracle (well, it does with ours, but I don't do the purchasing!) Oracle ProC is a massive product which allows full integration of Oracle a 'C' and is far too detailed to be dealt with here.
Alternatively....
You could use system calls to run SQL in a shell. This leaves the problem of accessing the output of the commands. See a recent thread about running DOS commands within 'C' for more on this.