Friday, July 10, 2015

C Basic Syntax

C Basic Syntax
This chapter will give details about all the basic syntax about C programming language including tokens, keywords, identifiers, etc.  You have seen a basic structure of C program, so it will be easy to understand other basic building blocks of the C programming language.
Tokens in C
A C program consists of various tokens and a token is either a keyword, an identifier, a constant, a string literal, or a symbol. For example, the following C statement consists of five tokens:
printf("Hello, World! \n");
The individual tokens are:
printf ( "Hello, World! \n" ) ; Semicolons ;
In C program, the semicolon is a statement terminator. That is, each individual statement must be ended with a semicolon. It indicates the end of one logical entity.
For example, following are two different statements:
printf("Hello, World! \n"); return 0; 

No comments:

Post a Comment