User Tools

Site Tools


notes:c4eng:fall2024:projects:abc0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
notes:c4eng:fall2024:projects:abc0 [2024/08/29 14:20] – [Clone lab46 semester repo on your system] skephartnotes:c4eng:fall2024:projects:abc0 [2024/08/29 21:51] (current) – [Create and execute hello.c] skephart
Line 30: Line 30:
 Hit "ESCAPE" key to exit INSERT mode. After you've finished, type ":wq", which can be seen in the bottom left, to save and exit the vim then press enter. Double check that it was saved by returning to the vim before closing the cmd program. Hit "ESCAPE" key to exit INSERT mode. After you've finished, type ":wq", which can be seen in the bottom left, to save and exit the vim then press enter. Double check that it was saved by returning to the vim before closing the cmd program.
 ====Create and execute hello.c==== ====Create and execute hello.c====
 +Inside of a directory of your choice, create a textfile named "hello.c" using the command "vim hello.c". Once inside this textfile press "i" in order to enter insert mode, after entering insert mode, enter this string of commands into you text file - 
 +
 +#include<stdio.h>
 +#include<stdlib.h>
 +int main()
 +{
 +        fprintf(stdout,"Hello,World!\n");
 +        return(0);
 +}
 +
 +After entering this code press the escape key in order to exit insert mode. After exiting insert mode type ":wq" and press enter in order to save and quit the text.file. After saving and quitting out of the textfile, type in the command “gcc -o hello hello.c” and press enter in order to compile the textfile. If you receive errors simpling read through them and fix the problems listed in the text file (you can re enter the textfile using the command "vim hello.c" and you can save and exit the same way as before). If you receive no errors, then you can type in the command "./hello" and press enter. If you have done everything correctly, there should be a message appear in between two of your command lines that says "Hello,World!".
 ====Locate journal and customize title and intro==== ====Locate journal and customize title and intro====
 Near the top left corner of the wiki page, in a gray box below the logo, you will find a link titled "Journal" which you can click and be directed to a page. Fill in the necessary information with your name, hobbies, and write down in the journal both the day of your entry and what you did in class or out of class for that day. You can do this by clicking the "Edit" button located at the bottom right corner of each section. Be sure to delete the filler text in each section before beginning to input your own words. Near the top left corner of the wiki page, in a gray box below the logo, you will find a link titled "Journal" which you can click and be directed to a page. Fill in the necessary information with your name, hobbies, and write down in the journal both the day of your entry and what you did in class or out of class for that day. You can do this by clicking the "Edit" button located at the bottom right corner of each section. Be sure to delete the filler text in each section before beginning to input your own words.
notes/c4eng/fall2024/projects/abc0.1724941214.txt.gz · Last modified: 2024/08/29 14:20 by skephart