The output of pwd is the sameCode:#include <stdio.h> int main(){ int j =0; for( ; j < 3 ; j++){ int pid= fork(); if(pid ==0 ){ if(j==0)execlp("pwd", NULL); else if(j == 1) execlp("cd", "..", NULL); else execlp("pwd", NULL); } else{ wait(0); } } return 0; }
how can i go to higher level directory?