Basic data types



There are basically 5 data types :
1.Character:- It can be declared using "char".It takes 1 Byte(8 bits) of memory space. These types of variables are generally used to hold values defined by the ASCII character set i.e. any single character. Its minimal range is from -127 to 127.

2.Integer:- It can be declared using "int". It takes 2 Bytes(16 bits) of memory space. These types of variables are generally used to hold numerical values. It doesn't support the digits after decimal. Its minimal range is -32,767 to 32,767.

3.Floating point:- It can be declared using "float". It takes 4 Bytes(32 bits) of memory space. These types of variables are generally used to hold numerical values. It supports upto 6 digits after decimal. Its minimal range is from 1E-37 to +37.

4.Double:- It can be declared using "double". It takes 8 Bytes(64 bits) of memory space. These types of variables are generally used to hold numerical values. It supports upto 10 digits after decimal. it is used basically for scientific calculations Its minimal range is from 1E-37 to +37.

5.Void:- These types of variables are either explicitly declares a function as returning no value or creates generic pointers.

We can modify these basic data types by using some keywords:-
1.signed
2.unsigned
3.long
4.short

Comments

Popular posts from this blog

Components of C language

Decision making using if statement

How to make payment for final certificate, migration, provisional for the students of last semester of ptu?