In Linux
Make your shell handle relative paths assuming the executablefile always exists in /bin directory.
Use getenv(“PATH”) to retrieve PATH environment variable and usestrtok() to extract each system path. Display each system path lineby line.
Expert Answer
An answer will be send to you shortly. . . . .