Advertisement
Adm1n_0v3rride

The data types of C++/C

Dec 13th, 2017
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.86 KB | None | 0 0
  1. /*The data types of C++/C (C) 2017*/
  2. #include <iostream>
  3. #include <cstdio>
  4. #include <string>
  5.  
  6. using namespace std;
  7.  
  8. int main() {
  9.     cout<<"The size of int is: "<<sizeof(int)<<endl;
  10.     cout<<"The size of unsigned int is: "<<sizeof(unsigned int)<< endl;
  11.     cout<<"The size of long long int is: "<< sizeof(long long int)<<endl;
  12.     cout<<"The size of float is: "<<sizeof(float)<<endl;
  13.     cout<<"The size of unsigned char: "<<sizeof(unsigned char)<<endl;
  14.     cout<<"The size of signed int: "<<sizeof(signed int)<<endl;
  15.     cout<<"The size of const int: "<<sizeof(const int)<< endl;
  16.     cout<<"The size of double: "<<sizeof(double)<<endl;
  17.     cout<<"The size of bool: "<<sizeof(bool)<<endl;
  18.     cout<<"The size of long double: "<<sizeof(long double)<<endl;
  19.     cout<<"The size of short int: "<<sizeof(short int)<<endl;
  20.     cout<<"The size of long int: "<<sizeof(long int)<<endl;
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement