Some word has special meaning in C program. Most used special words are explained below
Every single command of C program is a statement. For example printf(“hello world”); is a statement. A C program is a set of statements. all statement ends with semicolon.
Expression is mathematical statement. For example a+b; is a statement but it is mathematical statement. So it is better to call it as expression.
All expression is a statement but reverse is not true.
Comment is an information about a statement. Compiler ignore a comment and executes rest of code.A command start with //. For example you want to add “this line will print ‘hello world’” for printf(“Hello world”); statement as comment. You should do it as follows:
There is another style for comment. In this style comment starts with /* and ends with */
What is the difference between these two style?
Answer: Only one line can be made as comment by // while all lines between /* and */ have been made as comment.
printf("Hello world"); //this line will print 'hello world'
For example only line1 will be a comment of the following style
while all lines will be a comment of the following style
Let you write a c program containing 100 lines. When someone will read your code he/she will be confused about some lines. You can add some comment in your code so that other programmer can understand your code easily.
Keyword is a reserved word in compiler which has special meaning. For example, integer means a whole number but compiler recognize a whole number by int keyword. You can write water as WATER or Water and so on but if you are said to write molecular formula of water you have to write H2O . H2O or h2O or others format will not represent water. In the same manner you have to write the keyword of C programming exactly. A list of some keyword:
|int||integer or whole number|
There are a lot of keyword.We mentioned only three to avoid complexity.We will discuss all step by step. Don’t worry, you don’t have to memories all. all keyword are English like language and you will be familiar subconsciously while coding.