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.

Related Posts:

  • Difference between compiler and interpreter C is a general purpose programming language.In the previous post we learnt about what is high level language and what is low level language. … Read More
  • 2d array in C In the previous post we learn about what is array and what is one dimensional array.In this post we will learn what is two dimensional array. What … Read More
  • Variable If you want to learn programming you must know variable, constant, keywords ,data type and operators in C language.In the p… Read More
  • What is constant in C In the previous post we have learn about keywords. In this post we will learn about What is Constant they are also part of syntax. Consta… Read More
  • what is high level language and low level language In the previous post we learnt about variable and data type.In this post we will learn about computer languages.Today computer can be programmed to u… Read More

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