Question: You will develop a program in C that demonstrates the use of the environ global variable, and the getenv(), exit(), and atexit() functions as described
You will develop a program in C that demonstrates the use of the environ global variable, and the getenv(), exit(), and atexit() functions as described in Chapter 2 of the Robbins slides. The program will use these functions to display information about the environment variables that are set in the operating system and also to display a specific message each time the program ends.
Exit Handler.The program shall contain an exit handler function that displays the message shown below (including the 26 asterisks) as the last output from the program no matter what entries are provided on the command line. (Be sure to register the exit handler function as the first executable statements in the main() function.)
* * * * * * * * * * * * * * * * * * * * * * * * * * Environment Variable Display Program (by First_name Last_name)
Command Line.The program shall only accept each of the options shown below as valid entries on the command line.
a.out a.out
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
