AI code, varies with each type of game. For a chess game, the AI is used for moving the coin. For an RPG game the AI is in the the enemies movement. Let us know what kind of game you are trying to develop so that we can help you accordingly
But, we can give you a lot of help on idea of coding and help in solve your problems. and asking for the complete readymade code is a bit hard for us, you can better search for some open source games available for c.