Your hello1.c program successfully compiled and you now have an a.out file in the same directory. It's time to run it! Let's get started:
- In a Terminal, command line, or console window (depending on your OS), navigate to the directory that holds a.out.
- At the command prompt, usually indicated by a $ in the first column, enter ./a.out.
- You should see Hello, world!.
- If you see that, we can now verify the output of your program.
- Note that the command prompt, $, is not on the same line as Hello, world!. This means you correctly entered \n in the output stream. If not, you need to re-edit hello1.c and make sure \n occurs immediately preceding the second ", recompile it, and rerun a.out.
- If Hello, world! is on a line by itself with a command prompt before and after it – woohoo! You did it!
It's always important to remember to do a little dance, and make a little joy, get down tonight! when you've successfully completed something. Programming can be very frustrating, so remembering to celebrate even your small successes will make your life a little bit more joyful through all the frustration. Too many programmers forget this incremental and regular step of celebrating with joy!