Friday 7 October 2016

C Language Data Type

A block diagram can represent a system working model .Here I am going to show you block diagram of computer which is also  follows by many types of machines.
Block diagram of computer


If we consider image above then we will get that most of the machines follow this approach for example  mixture grinder takes input in the form of  (some fruits and vegetables) after processing it  produces lassi, sauce, Soup etc.


As you can observe clearly that what are the different types of input of Mixture grinder? So my question is now for you that

What are the different types of input we provide to computer?

What is your answer if it data then what is actually data?

If your answer is Data then congratulations, you are right. Then what is explanation of data?
Data is raw fact figure which has no meaning by its own but has capacity to change into meaningful information.


Overall picture of computer input is follows

Data Type of computer

So for, you have a clear idea that what type of inputs are given to computer. Now consider C language data type

C language data type




Type
Storage size
Value range
char
1 byte
-128 to 127 or 0 to 255
unsigned char
1 byte
0 to 255
signed char
1 byte
-128 to 127
int
2 or 4 bytes
-32,768 to 32,767 or -2,147,483,648 to 2,147,483,647
unsigned int
2 or 4 bytes
0 to 65,535 or 0 to 4,294,967,295
short
2 bytes
-32,768 to 32,767
unsigned short
2 bytes
0 to 65,535
long
4 bytes
-2,147,483,648 to 2,147,483,647
unsigned long
4 bytes
0 to 4,294,967,295

I hope it will clear that what is type of c language.

Format specifier


Format specifier
Type of value
%d
Integer
%f
Float
%lf
Double
%c
Single character
%s
String
%u
Unsigned int
%ld
Long int
%lf
Long double
Download PDF

Next Chapter


No comments:

Post a Comment