Please tell me related websites for that code.
http://sourceforge.net/projects/cagi/
http://sourceforge.net/projects/quivr/
There seems to be a bunch of AGI C libraries to choose from. I would go with whatever one seems to be used the most.
goto http://www.voip-info.org/wiki/view/Asterisk+AGI#C, download & read the documentation for the packages there
A short ref at OpenTK.de on Asterisk Gateway Interface (AGI)
And, a A Primer to AGI with lots of references (though, not very C specific).
There is also a 2003 book The Hitchhiker's Guide to Asterisk (html ref), pdf.
I actually wrote a full-fledged Asterisk 1.6+ compatible C AGI library for Asterisk. I know that this is a shameless plug, however, the other C libraries for Asterisk out there are very outdated and buggy.
You can check out my project code here (on the hosting page at Github): WildPBX C AGI. Here is some example code (so you can see what the syntax is like) wpbx-helloworld.c.