The structure of statements in a computer language is called Syntax.
- Tokens
- Semicolons
- Comments
- Single line comment
- Multi line comment
- Identifiers
- Keywords
- Whitespace
A C program consists of various tokens and a token is either a keyword, an identifier, a constant, a string literal, or a symbol.
In a C program, the semicolon is a statement terminator. i.e, each individual statement must be ended with a semicolon. It indicates the end of one logical entity.
Example :
It will terminate the statement after print the Hello.
Comments are ignored by the compiler. It is like helping texts.
There are two types of comments.
Example of single line comment:
Example of multi line comment:
Identifier is a name used to identify a variable, function, or any other user defined item. An identifier starts with a letter A to Z, a to z, or an underscore '_' followed by zero or more letters, underscores, and digits (0 to 9).
C is a case-sensitive programming language.
C does not allow punctuation character such as @, $ and % in identifier.
Example :
Keywords are the reserved words by the compiler. There are 32 keywords in C.
We will discuss keywords in brief details in other blog post.
Whitespace is the term used in C to describe blanks, tabs, newline characters and comments. Whitespace separates one part of a statement from another.
0 Comments