In this video we're going to step through the process of writing code in Emacs, compiling it, and running it. We're going to walk through assignment four which is to write, compile and run a program that prints Hello World. So here I am in the practice programming environment. And if I do ls, which you may remember shows me the contents of the directory I'll see a README. I'm going to emacs the README, and it's going to open up, and it says that basically what I just said, we're going to write a program that will print Hello World. And so to do this I'm going to open a file called hello.c, so I hit Ctrl+ X, Ctrl + F, prompt me for the file, going to type hello.c. I need to put my header files at the top, I need to #include them. So I'm going to #include standard io.h for print F. I'm going to #include standard lib.h for exit success, and then I'm going to write main. Which returns an int and for now takes no parameters. Later on we'll learn how to have it take command line arguments in course four. And we want to print Hello World so I'm going to write printf Hello World, and I want it to have a new line at the end. So I'm going to put \n, close my parentheses, put a ;, I'm going to put return EXIT SUCCESS. I'm going to close my curly braces, and then I'm going to save this file with Ctrl +X, Ctrl+ S. And then what I'm going to do is, is I'm going to suspend Emacs so I can go back to my command prompt. So if I hit Ctrl+ Z I get back to my shell and I can type commands. We can also compile inside of Emacs, we'll show you that later when you learn about mink files and then you don't have to go in and out of Emacs. Sometimes you want to suspend Emacs anyways. So I'm going to do gcc -o hello, just going to tell it to make a program called hello. I want to give it all of the flags that we give it so that will be very picky about if I wrote good code, and I want to compile hello.c. Now gcc didn't print anything, Ttat's good, that means it succeeded. If I do ls I will see this hello there it's green, which means it's executable, so we can actually run it. So of I type ./hello, it will run and print out Hello World. So now I would add hello.c to git, I'm going to remove hello, I don't really like adding binaries to git usually. I'm going to commit and it's going to prompt me for a message and I'm going to say that I wrote hello world. Save that and quit, and then I'm going to push and going to grade. Now I'm going to just note that we did all this with Emacs suspended. We didn't actually quit Emacs, it's still there, so if I type fg, we'll be back in Emacs where we were. If you're doing this and you suspend Emacs don't start a whole bunch of copies of Emacs for other things. So if I wanted to keep editing my code I could do that here, but I finished this assignment. And I've passed it and now we would move on to the next assignment. Which is going to involve writing some code that prints out squares.