TheThis article is a good one for the state pattern as previously state :
[http://www.codeproject.com/Kb/architecture/StatePatternBy_Sarath._(though it is C++, not specifically C).aspx][1]
IIf you can put your hands on the book "head first design pattern""Head First Design Patterns", the explanation and example are very clear.