Data Types in C

When we are reading something, we know that it is a alphabet, it is a number, it is a decimal number etc. For the compiler to know what type of data we are dealing with, we must specify the data type. Following are the primary data types that can be used in C.

ExampleData Type NameData Type
123, -23Integersint
12.5, 3.4E-38Floating Pointfloat
aCharacterschar
1.7E-308Double Precision Floatdouble

When I say primary, there are some secondary/derived data types also. We will look into those data types later. Also there are some variations of primary data types. To know more about, those data types, we need to know what is actually happening internally. My next post will explain how computers store data.

0 comments:

Post a Comment

 
Template designed using TrixTG