>> SPEAKER 1: Let's take a look at the simplest of programs and see.
I've already opened gedit and saved my file as hello zero.c.
Let's now recreate it.
Include standardio.h int main void open curly brace and, in advance,
closed curly brace, then an indentation, printf, quote, unquote
"hello, world" backslash n close close parenthesis semicolon.
>> All right.
So what are the salient characteristics of
this particular program?
Well, let's start with line one.
In line one, we have a sharp include statement followed by standard io.h.
Well, sharp include simply tells the compiler go include the contents of
the following file right there in my own file.
What file is that?
Well, it's a file called standard io.h.
And inside of that file are so-called declarations of functions that we
might find of interest.
In this case, printf happens to be the function that is declared in that
separate file.
>> Now in line three, we have some additional, new
syntax, int, main, void.
Well, int refers to the so-called return type of main,
what value it returns.
For the most part, we can turn a blind eye to this for now.
But take on faith that main is by default and implicitly going to
return, so to speak, a value of zero.
But more on that another time.
>> Meanwhile, the name of this function is, indeed, main.
And that's the default name for any program written in C. And then
finally, inside of the parentheses here, we have void, which simply says
that this program takes no command line arguments.
But let's take a closer look at those another day, as well.
>> Finally, the most interesting line, of course, is line five.
And that's where we define the essence of this program, which is to print to
the screen, that is, display hello world.
Printf is a function.
And again, that function is declared in that other file called standard
io.h that someone else implemented long ago.
And printf appears to take one argument, so to speak.
Because there is a quoted string, a sequence of characters, in between
that pair of parentheses, that implies that printf, indeed, does take one
argument, and that argument is going to influence its behavior.
>> In this case, it's going to instruct printf exactly what to
print on the screen.
The semicolon, meanwhile, at the end of this line simply says, that's it
for this statement.
I'm all done.
The fact that on line six we have the closing curly brace means, indeed,
this program is complete.
And there we have it, hello world.