int, float, double, and char data types in your system :#include <iostream>
int main() {
std::cout << "Size of int: " << sizeof(int) << " bytes" << std::endl;
std::cout << "Size of float: " << sizeof(float) << " bytes" << std::endl;
std::cout << "Size of double: " << sizeof(double) << " bytes" << std::endl;
std::cout << "Size of char: " << sizeof(char) << " bytes" << std::endl;
return 0;
}
Size of int: 4 bytes
Size of float: 4 bytes
Size of double: 8 bytes
Size of char: 1 bytessizeof operator to determine the size of each data type in bytes. The std::cout object is used to print the results to the console. endl manipulator is used to insert a newline character after each line of output. When you run this program, it should output the size of each data type in bytes on your system.