-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdataTypeRange.cpp
More file actions
27 lines (26 loc) · 873 Bytes
/
Copy pathdataTypeRange.cpp
File metadata and controls
27 lines (26 loc) · 873 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <iostream>
using namespace std;
int main()
{
// primitive
// int a=343;//4 byte
// float a=3.6f;//4 byte
// double a=388.36376373;//8 byte
// char a='a';// 1 byte
// bool a=true;//1 byte
// string a="amit";//24 byte
// some more modified primitive
// short a=3; //2 byte
// short int a=4;//2 byte
// long a=1332762;//4 byte
// long int a=1676;
// long long int a=27383;
// unsigned a=278373;//4 byte for only positive integer
// unsigned int a=278373;//4 byte
// signed a=-23;//4 byte for both postive to negetive integer
// signed int a=-45;//4 byte
// cout<<sizeof(a)<<endl;
// unsigned int a=-33;
// cout<<a<<endl;//print 4294967263 because m.s.b which denote signed number negetive or positive its use that as data bit.
return 0;
}