Recent Posts

Monday, 25 December 2017

Data types in C

     In the previous post we learn about what is Variable in C language.In this post we will learn Data type in C.The data type is a classification of data which tells the compiler or interpreter that how the programmer intends to use the data.The data type define the operation that can be done on data, the meaning of the data.

The basic data type of C are as follows

1.Int :  
          This data type is used to store integer values in the range of -32768 to 32767. It takes 2 bytes               in memory.
Syntax:
int variable_name;

Example:int a;


2.Float:
          This data type is used to store decimal values in the range of 3.4E-38 3.4E+38.It takes 4 bytes               in memory.
Syntax:
float variable_name;

3.Double:
          This data type is used to store decimal values in the range of 1.7E-308 to 1.7E+308.
           It takes 8 bytes in memory.
          This data type is used when accuracy provided by float is not sufficient
Syntax:
double variable_name;

4.Char:
          This data type is used to store characters.It takes one byte in memory to store one character.
Syntax:
char variable_name;

5.Void:
         Void means nothing.This data type is used with function as return data type when function has not return any value to its calling function.

0 comments:

Post a Comment

Followers

Popular Posts

Categories

social media

Text Widget

Powered by Blogger.

About Me

My name is junaid khan and i am a full time blogger and author of a blog tutorial called tutorialpointsolution.

String function

In the previous post we learn about what is String .we know that string is a collection of two or more characters.In string we can store al...

Search This Blog

Technology

Adbox

Recent Post

Breaking

Recent In Internet

Comments

Facebook

Pages

Comments

Pages

Recent

Pages

Technology