C -- simple functions