Cela dépend du serveur web, mais aussi du(des) langages utilisés/ disponibles sur ce serveur web.
Par exemple, si c'est apache2 + php, il est possible d'appeler un programme C ( ou n'importe quel programme ) à partir du php avec la commande shell_exec ( http://php.net/manual/fr/function.shell-exec.php ) . Cependant, ce n'est pas propre et pas safe.
Un autre moyen est de passer par les cgi, mais je ne sais pas si on peut appeler le programme cgi à l'interieur d'une page.
Il existe surement d'autres moyens, dépendant du serveur et du langage serverside associé ( python, ruby , autre ? ) mais je ne les connais pas dans ce cas.