double Data Type

 

If we need to store a large real number which cannot be store in four bytes, then we use double data type. Normally the size of double is twice the size of float. In program we use it as:

 

double x = 345624.769123;

 

char Data Type

 

So far we have been looking on data types to store numbers, In programming we do need to store characters like a,b,c etc. For storing the character data C language provides char data type. By using char data type we can store characters in variables. While assigning a character value to a char type variable single quotes are used around the character as ‘a’.

 

#include <iostream.h>

main()

{

            char x;

            x = ’a’;

            cout << “The character value in x =  “;

            cout << x;        

}

 

 

The output will be as:

The character value in x =  a    

 

 

 

Previous

 

 

TOC

 

 

Next