I am writing a CGI enter in C to obtain an submitted file through HTTP multipart/form-data.

How's that Apache handles file uploads? How do i obtain the data?

You could utilize a recognised CGI library, for example cgic, that has cgiFormFileName way of handling submitted files.