Basic DataTypes Of C language
Each and every Variables in C is associated with DataTypes. For specifying type of data, that variables store their values in which type. Like in "Integer", "Float", "Character", etc.
In this Blog, we're going to see Basic datatypes and its specific size and range to store value
- int (%d - format specifier)
- Integer is used to store positive, negative and a whole numbers.
example: -52, 0 , 123 ,3, etc..
> signed (-32,768 to +32,767)- Range
> unsigned (0 to 65,535)
> short (-32,768 to +32,767)
> long (-232 to +232)
- float (%f - format specifier)
- Float is used to store decimal and exponential values.
example: 3.14, 0.6666...,9.054054..., etc..
> double
> long
- Char (%c - format specifier)
- Character is used to store a single character or value in quotes.
example: "a", '#'."@','6',etc..
> signed (-128 to +127)
> unsigned (0 to 255)
Source Code to get the Sizes Of DataTypes:
(a simple method/short code)
.png)
0 Comments