Mutiple code fragment written in C language