Integral Datatypes in C++
In this video, we are going to see integral datatypes available in C++ programming language. There are five kinds of integral datatypes that we can use while coding in C++. Let's see them in details.
Series playlist ▶︎ https://youtube.com/playlist?list=PLt4rWC_3rBbWnDrIv4IeC4Vm7PN1wvrNg
Source Code:
#include <iostream>
using namespace std;
int main(){
char c;
c = 97;
short s = -12421;
int i = 12;
long int l = 13;
long long ll = -1313;
// cout<< c << endl;
// cout<< i << endl;
// cout<< l << endl;
cout<< ll << endl;
return 0;
}
/*
-----------------------------------
------- INTEGRAL DATA TYPES -------
-----------------------------------
Type Number of Bytes Minimum Value Maximum Value
---- --------------- ------------- --------------
char 1 -128 127
short 2 –32,768 32,767
int 4 –2,147,483,648 2,147,483,647
long 4 –2,147,483,648 2,147,483,647
long long 8 –9,223,372,036,854,775,808 9,223,372,036,854,775,807
*/
0 Comments