Data Types In C Language
What
is Data Type in C?
·
Data types are used to specify what
type of data we are going to use in our C Program.
·
Data types are the specifications
provided with the variable or function name.
·
The Data type is collection of
facts, figures and numbers.
·
For accepting different type of
data in the variable we have to specify data type.
Different
Data Types in C.
·
Data types are categorized in 3
types:
o
Primary or Fundamental Data Types
o
Derived Data Types
o
User Defined Data Types.
·
Primary Data Type are given below:
o
Primary data type are built in data
types which are described below:
No.
|
Data Type
|
Keyword
|
Size
|
Range
|
Use
|
1
|
Integer
|
int
|
2 Bytes
|
-32,768
to 32,767
|
It is use for Numeric type of data.
|
2
|
Character
|
char
|
1 Byte
|
-128 to
127
|
It is use for Character type of data.
|
3
|
Float
|
float
|
4 Byte
|
It is use for using decimal type of data.
|
|
4
|
Double
|
double
|
8 Byte
|
It is use for Double type of data.
|
|
5
|
Void
|
void
|
0
|
0
|
It is use to represent nothing.
|
o
There are few qualifiers which we
can use to increase the range of variables data type or to decrease it.
o
Those are short, long, unsigned and signed.
o We have to
use different format specifiers when we try to print and accept variables in printf() and scanf() function respectively.
·
Derived Data Types:
o
Array
o
Pointer
·
User Defined Data Types:
o
Structure
o
Union
o
Enumeration
· Detail information about topic Derived Data Type and User Defined Data Types will be available on different post.
· Detail information about topic Derived Data Type and User Defined Data Types will be available on different post.
·
You can click on Those Topics to get to those post.
•If
you have any query on any topic please let us know through comment section we
will solve your queries.
•You
can also refer to my C Language Tutorial video Series on Youtube
by
clicking on link given below:
Comments
Post a Comment