Data Type In C
Data types in C
Data types simply refers to the type and size of data associated with variables and functions.
Data type can be either fundamental (provided in C compiler), or derived (derived from fundamental data types).
These data type are different storage capacity.
There are 2 different type of data types:-
- Primary data type
- Derived data type
- Primary data types:-
These are fundamental data types in C namely integer(int
), floating point(float
), character(char
) andvoid
. - Derived data types:-
Derived data types are nothing but primary datatypes but a little twisted or grouped together like array, stucture, union and pointer.
x
is declared as int
. it means x can hold only integer values.
Every variable which is used in the program must be declared as what
data-type it is.
No comments: