Question: 1. (C Programming) A process can only register no-argument exit functions using the atexit() function. Make a C program that uses atexit() to register a
1. (C Programming) A process can only register no-argument exit functions using the atexit() function. Make a C program that uses atexit() to register a function foo() so that foo() will be called to outoput "aaa" or "bbb" when the program exits. Which string foo() will ouput is determined by the status of the program. For example, if the program is in status A when exiting, foo() ouputs "aaa"; if the program is in status B when exiting, foo() outputs "bbb".
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
