Home / Expert Answers / Computer Science / note-make-sure-you-read-through-the-power-points-in-the-unix-linux-module-of-the-content-section-if-pa674

(Solved): NOTE: Make sure you read through the power-points in the Unix/Linux module of the Content section.If ...



NOTE: Make sure you read through the power-points in the Unix/Linux module of the Content section.

If you are not currently in your CS100 folder, navigate to that folder.

Make a new directory called: Homework1 (remember to use the mkdir command)

Use vi or emacs to create a new code file named hello.c

Either of these commands will work (please review the Unix/Linux module power point on using vi and emacs)

  • vi hello.c
  • emacs hello.c

Type in this code:

This is your basic Hello World program for C

If you are using emacs, save the file by using the command CTL-C CTL-S and exit by using the command: CTL-X CTL-C

if you are using vi, save and exit from navigation mode by using the command :wq (that's colon then wq, then enter)

Now we will compile that file with the command line C compiler: gcc

type in the command:

gcc -g -Wall hello.c -o hello

(hit enter)

Assuming you didn't make any mistakes compilation should be successful

IF you used emacs - do this extra step - type in the command: rm *~ then hit enter. This will delete a file emacs created.

Run the ls command to get a listing of your directory

You should only have two files... What are the two files you have in your directory:

_____ _______



We have an Answer from Expert

View Expert Answer

Expert Answer



The steps to create a new directory called `Homework1` and a C file called `hello.c` in the `CS100` folder:

1. Navigate to the `CS100` folder.
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe