THE CODE MUST BE IN C ONLY.  Every shell needs to support a number of built-in commands, which are functions in the shell itself, not external programs. Shells directly make system calls to execute built-in commands, instead of forking a child process to handle them.
Add a new built-in exit command that exits from your shell with the exit() system call. Also add support for signal handling and terminal control (Ctrl-C, Ctrl-Z). You do not want those signals to terminate your shell. Instead, you need to handle them and terminate processes that your shell started if any. Be aware that forked processes will inherit the signal handlers of the original process.