mirror of
https://github.com/tiennm99/KTLT.git
synced 2026-06-17 08:51:16 +00:00
41 lines
2.3 KiB
C++
41 lines
2.3 KiB
C++
#include <iostream>
|
|
|
|
using namespace std;
|
|
|
|
int main()
|
|
{
|
|
cout << "sizeof(char) = " << sizeof(char) << endl;
|
|
cout << "sizeof(char*) = " << sizeof(char*) << endl;
|
|
cout << "sizeof(unsigned char) = " << sizeof(unsigned char) << endl;
|
|
cout << "sizeof(unsigned char*) = " << sizeof(unsigned char*) << endl;
|
|
cout << "sizeof(signed char) = " << sizeof(signed char) << endl;
|
|
cout << "sizeof(signed char*) = " << sizeof(signed char*) << endl;
|
|
cout << "sizeof(int) = " << sizeof(int) << endl;
|
|
cout << "sizeof(int*) = " << sizeof(int*) << endl;
|
|
cout << "sizeof(unsigned int) = " << sizeof(unsigned int) << endl;
|
|
cout << "sizeof(unsigned int*) = " << sizeof(unsigned int*) << endl;
|
|
cout << "sizeof(signed int) = " << sizeof(signed int) << endl;
|
|
cout << "sizeof(signed int*) = " << sizeof(signed int*) << endl;
|
|
cout << "sizeof(short int) = " << sizeof(short int) << endl;
|
|
cout << "sizeof(short int*) = " << sizeof(short int*) << endl;
|
|
cout << "sizeof(unsigned short int) = " << sizeof(unsigned short int) << endl;
|
|
cout << "sizeof(unsigned short int*) = " << sizeof(unsigned short int*) << endl;
|
|
cout << "sizeof(signed short int) = " << sizeof(signed short int) << endl;
|
|
cout << "sizeof(signed short int*) = " << sizeof(signed short int*) << endl;
|
|
cout << "sizeof(long int) = " << sizeof(long int) << endl;
|
|
cout << "sizeof(long int*) = " << sizeof(long int*) << endl;
|
|
cout << "sizeof(unsigned long int) = " << sizeof(unsigned long int) << endl;
|
|
cout << "sizeof(unsigned long int*) = " << sizeof(unsigned long int*) << endl;
|
|
cout << "sizeof(signed long int) = " << sizeof(signed long int) << endl;
|
|
cout << "sizeof(signed long int*) = " << sizeof(signed long int*) << endl;
|
|
cout << "sizeof(float) = " << sizeof(float) << endl;
|
|
cout << "sizeof(float*) = " << sizeof(float*) << endl;
|
|
cout << "sizeof(double) = " << sizeof(double) << endl;
|
|
cout << "sizeof(double*) = " << sizeof(double*) << endl;
|
|
cout << "sizeof(long double) = " << sizeof(long double) << endl;
|
|
cout << "sizeof(long double*) = " << sizeof(long double*) << endl;
|
|
cout << "sizeof(wchar_t) = " << sizeof(wchar_t) << endl;
|
|
cout << "sizeof(wchar_t*) = " << sizeof(wchar_t*) << endl;
|
|
return 0;
|
|
}
|