C PROGRAMMINGDATA STRUCTURES

data types in C

What are data types in C

Data types

The kind of data that the variable may hold in a programming language is referred to as data types.


There are various types of data, such as Integer, character, real, string that a variable may contain in a programming language are named as Data types.

Any thing enclosed in ‘single quotes’ are character data. Number without fractions represents integer data type. Numbers with fractions represents floating point(real) data type. Any thing enclosed in “double quotes” are string data types.

Basic data types

There are two basic types of data in c as integer and floating point. With the help of these two data we can derive further two types(character and double precession) precession means how many digits can be used in a number. If you a temp to store a number with many digits such as 4.254655241(as floating point variable, only six digit 4.254655) will be retained.


The bytes occupied by each data type are shown in the table

Data Type Size in Bytes Range Use
char 1 ā€“128 to 127 To store characters
int 2 ā€“32768 to 32767 To store integer numbers
float 4 3.4Eā€“38 to 3.4E+38 To store floating point numbers
double 8 1.7Eā€“308 to 1.7E+308 To store big floating point numbers

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Check Also
Close
Back to top button