ex8.c : Has some bugs. Will correct them later.