I know that cd is a shell built-in ,and I can run it by using system().
cd
system()
But is that possible to run the cd command by the
You're better off using int chdir(const char *path); found in unistd.h.
int chdir(const char *path);
unistd.h