Data type declaration instruction
in c language
Data type declaration instruction in c language -
Hello friends,
today I will tell you how we can write Data type declaration instruction in c language.
Objective
- What is instruction ?
- Data type deceleration instruction
Instruction
Program statement are called instruction.
Instruction are commands.
Type of instruction
- Data type declaration instruction
- input output instruction
- Arithmetic instruction
- Control instruction
Data type declaration instruction
In c language, there are some important keywords is known as data type.
Primitive data type
- int
- char
- float
- double
- void
We know that 32 keywords are in ca language (we learn about this in previous part then please see the previous all part then read this part to understand better.)
Declaration statements
- int a,b=5;
- float k;
- char ch, m;
- double d1;
Whenever compiler see this type of statement in our program then it understand that it is data type instruction in which the first word is always be data type. In one instruction we can not write more than one data type.
example: In first line we write int, the compiler understand now we make variable (in previous part we also learn that what is variable then please see previous part) when we make any program, the first thing is how much data is controlled by us. The data is stored in variable so, we have to know decide how much variable we need. By data type deceleration, we decide how many variable we have to make.
Example: in first line, we make two variable a and b.
float k;
In this instruction we use float data type instruction which is different to int data type instruction.
Data type space in memory
int 2 bits
char 1 bit
double 1 bits
float 4 bits
- We study docs based architecture not window based architecture
Important point
- The variable is formed with the help of int then it store integer constant
- The variable is formed with the help of float and double then it store real constant
- The variable is formed with the help of char then it store character constant.
hope this help you to learn c language I do my best way through i can understand you.
please comment and share to your friends
also follow me to get latest update on c language
part 4 is here please clink on this link (https://grapsvs.blogspot.com/2020/04/identifiers-in-c-language.html)
0 Comments
Please do not enter any spam link in the comment box and please follo me.