Data Types In C Programming Language | LearntHub

Introduction Of C Data Types:-

Today we will learn Data Types in C Programming, so we start the chapter.
Whenever you create a variable,before that, the compiler tells that what kind of data you will store in that variable. This allows the compiler to allot that same memory from the computer's memory.

In normal terms, when we declare a variable during programming, then you have to tell the compiler what data type you want to store in the variable, this allows the compiler to provide the same amount of memory from the RAM.

Classification Of Data Types:-There are three types of data types in c programming language.
1. Integer
2. Float
3. Characters

1. Integer:-

We use Integer data types for store any whole number (Not Decimal Number), required memory for storing integer data type is 2 Bytes.
For example: 1,2,3,5,.......
The range of integer data type is -32768 to +32767.
  1. Functions
  2. Array
  3. Strings
Integer has three class for integer storage,which written below
  • Short Integer
  • Integer
  • Long integer

2. Float:-

We use float data type to store any Decimal Number.required memory for storing float data type is 4 Bytes.
For example: 1.2,1.6,2.6,66.55 etc.
The range of float data type is 3.4e-38 to 3.4e+38.
Float data type has two class for float storage,which written below
  • Double
  • Long Double

3. Character:-

We use the char data type to store any character.required memory for character data type is 1 Bytes.
For example: a,b,c,d,@,$,%,& etc.
The range of character data type is -128 to 127.
Character data type has two class for character storage,which written below
  • Signed Character
  • Unsigned Character

4. Void:- 

Void means is no Value, void is not a value. It is used for Data Type Function and Punmeter of Function. This does not return any value to OS.

Post a comment

1 Comments