I need help im trying to make a little program that just changes the current directory but i get a segmentation fault.
Code:#include <stdio.h> #include <unistd.h> int main() { char *path; printf("Which directory do you want to go to?:"); scanf("%s",&path); chdir(path); printf("yay it worked!\n"); return 0; }