You need to understand some of HTTP
You could make your C program a web server using some HTTP server library like e.g. libonion, mongoose (as commented by oysteijo), libmicrohttpd etc... (in C++ consider also Wt). Then your application would provide a web page.
You could make your C program a web client using some HTTP client library like libcurl. Then your application would e.g. fill a web form located elsewhere. (your C program could also e.g. be database client and some other Web server would access the same database and display the data).
You could also consider making your C program a CGI or FastCgi application (interacting with a web server like Lighttpd or Apache...)