Create misc.c

Added the new code. It is after the comment Project 2..