small c codes used to implement bigger programs using malloc