Question: I am programming in C using VIM and terminal under Ubuntu Linux. My instructions say pwd should display the current working directory on stdout pwd

I am programming in C using VIM and terminal under Ubuntu Linux.

My instructions say pwd should display the current working directory on stdout pwd prints the correct current working directory on a single line followed by a newline pwd with any parameters issues perror() with errno=EINVAL and is ignored

This is what I have so far. I need you to change this so it follows all of these instructions and works correctly. I cant figure it out.

// add if statements here for the other internal commands if (strcmp(myArgv[0], "pwd") == 0) { char cwd[1024]; getcwd(cwd, 1024); printf("%s ", cwd);

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!