compile hw1.3.cThe computer will then give you warnings and errors:
hw1.3.c:4: warning: return-type defaults to `int' hw1.3.c: In function `main': hw1.3.c:7: syntax error before `printf' hw1.3.c:8: warning: control reaches end of non-void functionIn order to get your program to run, you must get rid of the errors. You should also get rid of the warnings. Programming snobs generally look down upon code that generates warnings.
So in this example, you'd want to fix the warning that reads, "hw1.3.c:4: warning: return-type defaults to `int'". The "4:" indicates that the warning is on line 4. So go back to Emacs, type Alt-G, then type 4 and hit return. That takes you to line 4. Fix that problem and then try to compile again. (When you fix one problem, that often causes several warnings and errors to vanish. Therefore, you can try to re-compile even if you've only fixed one error or warning.)
If the computer gives you no warnings or errors, then it's time to execute your program. Just type in "a.out" and your program runs:
% compile hw1.3.c % a.out Hello world. %