Some sample C and C++ codes for people preparing for interviews.