What is the difference between chdir and the cd command?
How does one use chdir in a script?

Also can someone explain the following synopsis

#include <unistd.h>
int chdir (const char *path) ;