ECS 30 Lecture Notes - Lecture 1: Exit Status, Newline, Gnu Compiler Collection
Document Summary
It will either be void to prevent arguments or the main will accept arguments. An integer value is returned to the os to signify what happened. The body of a function is ({ }) Statements are indented by tabs to improve readability. The compiler we will be using is for this class is a gcc. This creates an executable file with the extension . out. The file command in unix gives the information about the file. /(file name) will execute the file if it is an executable. The line echo 0 will show the exit status, which allows the programmer to see it. An exit with 0 is means the program ran smoothly, while other numbers correspond to an error. This program calls the printf() function which prints a string represented through (" ") The \n is a newline character that forces a newline. The first line is a header which provides the definition of printf().