C Instruction

Now we have written one simple C program in previous C session. In today's session we shall see the instructions that we give to C. This is important to understand before we start with C programming in full flow manner.

There are basically three types of C instruction:
  • Type Declaration Instructions
  • Arithmetic Instructions
  • Control instructions

Type Declaration instruction is used to declare the type of variables used in a C program.
Arithmetic instruction is used to perform arithmetic operations between constants and variables
Control instruction is used to control the execution of various sequence in a C program.

Control instruction will not be discussed in this session as it will be discussed differently. Click here to see those sessions. However, I would recommend that you should follow the flow.

Type Declaration Instruction

  • Type Declaration instruction is used to declare the type of variables used in a C program.
  • Before we use any variable in the program, it is must for us to declare it at the beginning of main() function.

Arithmetic instruction and operators

  • A C arithmetic instruction consists of a variable name on left hand side of the "=" and constant on right hand sign of "=". 
  • "=" is called assignment operator. 
  • + - * / % are arithmetic operator.
Please see the video below to understand today's session effectively.

No comments:

Post a Comment