Search

C++ Data Types

Data Type tell us about the type of data, clearly understood by its name.

What is Data ?

“Anything or Something”

Everything is Data

Everywhere is Data

Now What is Type ?

What is Type ?

Please Tell !!



In Computer Language, There are various data types like “integer” – number, “character” – any alphabet, “float” – decimal point values.

All Done ?

Nah !

Data Types are of four types in C++

Types

Data Types

Basic Data Type

int, char, float, double etc

Derived Data Type

array, pointer etc

Enumeration Data Type

enum

User Defined Data Type

struct



Some Data Types, Memory Required, Range

Range ? Yes there is a limit of everything in this world, And Of-course also requires some space which is termed as memory required.

Data Type

Memory Size

Range

char

1 byte

-128 to 127

signed char

1 byte

-128 to 127

unsigned char

1 byte

0 to 127

short

2 byte

-32768 to 32767

signed short

2 byte

-32768 to 32767

unsigned short

2 byte

0 to 32767

int

2 byte

-32768 to 32767

signed int

2 byte

-32768 to 32767

unsigned int

2 byte

0 to 32767

short int

2 byte

-32768 to 32767

signed short int

2 byte

-32768 to 32767

unsigned short int

2 byte

0 to 32767

long int

4 byte

-


signed long int

4 byte

-

unsigned long it

4 byte

-

float

4 byte

-

double

8 byte

-

long double

10 byte

-



Move to Next Page

---------------------------------------------------------------------------------------------------------------------

Previous Page Next Page


Any Doubt ? Feel free to write a comment

Download C++ Projects

Join us on LinkedIn – Great Place of Networking

Follow us on More Together – Facebook for regular updates

Mandatory to join Telegram group for regular job updates

Mandatory to join whatsapp group for regular job updates



Other C++ Topics



For Other Tutorials – Click Here


24 views0 comments

Related Posts

See All

Number to Character Conversion in C++

Program to implement Number to Character Conversion in C++ Firstly see what we are going to do ? Like this 0 - zero 1 – one 2 – two 3 – three 4 – four 5 – five 6 – six 7 – seven 8 – eight 9 – nine How

Factorial of a number in C++

In this tutorial we are going to see how to find a factorial of number using C++ program Firstly let’s see a example to understand it better n! = n + (n-1) + (n-2) ! n>=1 3! = 3 *2*1 = 6 Program to fi

Fibonacci Triangle in C++

Program to implement Fibonacci Triangle in C++ #include <iostream> using namespace std; int main() { int a=0,b=1,i,c,n,j; cout<<"Enter the limit: "; cin>>n; for(i=1; i<=n; i++) { a=0; b=1; cout<<b<<"\

Info © Copyright 2020-21 Fresher Side. All rights reserved. Contact us