Today we started edX coding with C. I started by making a folder called unit1, then a folder within unit1 called hello. In here I made a file named hello.c. I edited this file by writing a code that is meant to display a message. After writing the code, checked my directory by typing ls to make sure I was in my hello folder, and then typed make hello. This executed the code, creating a new file in the hello folder called hello. I checked to make sure this worked by typing ls, and hello* and hello.c came up. Hello had an asterisk meaning it can be executed. I then typed ./hello, running the executable hello file, and displaying the message "hello, world." I then changed the hello.c file code so make it say "Hi Abby!" I saved the code. I typed make code in the directory in order to change the executable file, then typed ./hello to run the code. It displayed "Hi Abby!" The purpose of this lesson was to begin to learn how computers work using C. I mistook on
Comments
Post a Comment