Introducing statements and blocks
Before we begin to explore the details of statements, let's return to the various uses of punctuation that we encountered in our Hello, world! program. Here is the program for reference; comments have been removed so that we can concentrate on the details of the code:
#include<stdio.h>
int main() {
printf( "Hello, world!\n" );
return 0;
}
First, I'd like to draw your attention to the paired punctuation – the punctuation that occurs with a beginning mark and an ending mark. Going through it line by line, we can see the following pairs – <
and >
, (
and )
(which occur on two lines), {
and }
, and "
and "
. We can also see some other punctuation that may or not be familiar to you. These are #
, .
, ;
, \
, <space>
, and <newline>
. These punctuation marks are significant in the C language.
When we look closely at our "Hello, world!\n...