School-Coding-Cpp/cicli_operatori/LunghezzaTipi.cpp

14 lines
402 B
C++

// Vichi
#include <iostream>
using namespace std;
int main(void) {
char c = 'T';
bool b = false;
int i = 1;
float f = 1;
double d = 1;
unsigned int u = 1;
cout << "LUNGHEZZE:\nChar: " << sizeof(c) << endl << "Bool: " << sizeof(b) << endl << "Int: " << sizeof(i) << endl << "Float: " << sizeof(f) << endl << "Double: " << sizeof(d) << endl << "Unsigned Int: " << sizeof(u) << endl;
return 0;
}