#include <unistd.h> int chdir(const char *new_directory);
This function changes the current directory to new_directory. If a drive letter is specified, the current directory for that drive is changed and the current disk is set to that drive, else the current directory for the current drive is changed.
Zero if the new directory exists, else nonzero and errno set if error.
not ANSI, POSIX
if (chdir("/tmp")) perror("/tmp");
Go to the first, previous, next, last section, table of contents.