a multiple inheritance style example code written in c