⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 a615size.cpp

📁 quarto esempi vari per c++ (schemi base)
💻 CPP
字号:
// nuovi elementi: sizeof(), double, long double
#include <iostream>

using namespace std;

int main() {
  cout << "Numero di byte occupati\n";
  cout << "\t          char: " <<           sizeof(char) << endl;
  cout << "\t         short: " <<          sizeof(short) << endl;
  cout << "\t           int: " <<            sizeof(int) << endl;
  cout << "\t          long: " <<           sizeof(long) << endl;
  cout << "\t unsigned char: " <<  sizeof(unsigned char) << endl;
  cout << "\tunsigned short: " << sizeof(unsigned short) << endl;
  cout << "\t  unsigned int: " <<   sizeof(unsigned int) << endl;
  cout << "\t unsigned long: " <<  sizeof(unsigned long) << endl;
  cout << "\t   signed char: " <<    sizeof(signed char) << endl;
  cout << "\t         float: " <<          sizeof(float) << endl;
  cout << "\t        double: " <<         sizeof(double) << endl;
  cout << "\t   long double: " <<    sizeof(long double) << endl;
  return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -