C++ programı yazarken kullandığımız değişkenlerin, bellekte ne kadar yer kapladıklarının gösterilmesi.
sizeof(veriTipi);
#include <iostream> using namespace std; int main() { cout << "Size of char: " << sizeof(char) << " byte" << endl; cout << "Size of int: " << sizeof(int) << " bytes" << endl; cout << "Size of float: " << sizeof(float) << " bytes" << endl; cout << "Size of double: " << sizeof(double) << " bytes" << endl; return 0; }
![](https://i0.wp.com/www.epikod.com/wp-content/uploads/2021/05/cpp_sizeof.png)