simple code  written in c