testing inheritance and data encapsulation in pure C