-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path0016.cpp
More file actions
39 lines (28 loc) · 733 Bytes
/
0016.cpp
File metadata and controls
39 lines (28 loc) · 733 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
28
29
30
31
32
33
34
35
36
37
#include <iostream>
#include <stdlib.h>
/*====================================
* eXcript.com
* fb.com/eXcript
* ====================================*/
using namespace std;
int main() {
short a1 = 10;
short int a2 = 10;//2 bytes
int b = 10;//4 bytes
long int c1 = 10;//4 bytes
long c2 = 10;//4 bytes
unsigned char c = 259;
cout << sizeof(a1) << endl;
cout << sizeof(a2) << endl;
cout << sizeof(b) << endl;
cout << sizeof(c1) << endl;
cout << sizeof(c2) << endl;
float f1 = 2;
long long f2 = 2;
long double f3 = 2;
cout << sizeof(f1) << endl;
cout << sizeof(f2) << endl;
cout << sizeof(f3) << endl;
system("pause");
return 0;
}