c and c++ test code