Hi, Katarina(aa?), and welcome to chatbots.org!
Depending on both your experience level, and whether you want to work with AIML or not, there are a lot of options available to you. As my experience is pretty much with AIML and ChatScript, I’m only able to give suggestions along those lines, but perhaps someone else may be able to add some additional information that may prove useful.
For now, however, I recommend that you visit http://www.alicebot.org/downloads/programs.html and look through the list. In particular, you may find Program N (now called AIMLPad), which is written by Gary Dubuque, who is one of our members, helpful. There are others on the list that are written in various flavors of C, that may be to your liking, too.
As for ChatScript, I believe that’s also written in C, and the download includes the source files, so you can customize it to fit your particular needs. You can find it available for download at http://chatscript.sourceforge.net/