segregated c and c++ code