Both the source code have errors.They will not compile

exit() .
There must be one argument to exit function
like exit(EXIT_SUCCESS) OR exit(EXIT_FAILURE) or exit(any_number) where any_number is between [0,255]

you are also missing header file
please include <stdlib.h> at the top

Last edited by teacher; 12Apr2011 at 17:57..