Try using a combination of scanf and strcmp. That way, you can use strcmp or whatever you want to run through a database and execute the appropriate action. For example:
C Code:
#include <stdio.h>
#include <string.h>
#include <memory.h>
#include <stdlib.h> //only needed for system() in this program
void main(void)
{
char nounBuffer[32];
char verbBuffer[32];
while(strcmp(verbBuffer,"exit") != 0)
{
printf("What do you want to do? ");
scanf("%31s %31s",verbBuffer,nounBuffer);
//Here is where you need to compare the verb string to the
//verbs you can handle, like "eat" or "drink", etc.
//When you're done, continue here:
//clear buffers
memset(nounBuffer,NULL,32);
memset(verbBuffer,NULL,32);
system("cls"); //clears the screen, remove if you want
}
}