Basic data types of c-language

in c-language •  11 months ago 

Hello!

code-3637299_1280.jpg

A basic data type is kind of information that is used in a computer program.

IMG_20231022_235856.jpg

Some basic data types are,

1] Integer data type :
• It allows a variable to store numeric values.
• " int" is used to refer integer data type.
• The storage size of 'int' data type is 2 bytes.
Eg- int a;

2] Character data type :
• It allows a variable to store only one character.
• "char" keyword is used to refer character data type.
• The storage size of character data type is 1 byte.
Eg- char c;

3] Float data type :
• It allows a variable to store decimal values.
• "float" keyword is used to refer float data type.
• The storage size of float data type is 4 bytes.
Eg- float b;

4] Double data type :
• It allows the variable to store up to 10 digits after decimal values.
• "double" keyword is used to refer double data type.
• The storage size of double data type is 8 bytes.
Eg- double d;

ux-789162_1280.jpg

Here is a simple short video on basic data types explained in easy way.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE BLURT!