some codes in C