/
monahov
/
learningcplusplus
Обзор
Документация
Войти
/
monahov
/
learningcplusplus
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Lesson 7.1.cpp
22 строки
764 B
monahov
upload files
29 июл 2025, 10:56
29 июл 2025, 10:56
8ab4c82
Код
Авторство
О чём код?
#include <iostream> int main() { int a{ 1 }; short b{ 10 }; long l{ 100 }; long long ll{ 100000000 }; float f{ 20.3123F }; double d{ 99.99 }; long double ld{ 100321.312321 }; bool c{}; std::cout << "int: " << &a << " " << sizeof(a) << std::endl; std::cout << "short: " << &b << " " << sizeof(b) << std::endl; std::cout << "long: " << &l << " " << sizeof(l) << std::endl; std::cout << "long long: " << &ll << " " << sizeof(ll) << std::endl; std::cout << "float: " << &f << " " << sizeof(f) << std::endl; std::cout << "double: " << &d << " " << sizeof(d) << std::endl; std::cout << "long double: " << &ld << " " << sizeof(ld) << std::endl; std::cout << "bool: " << &c << " " << sizeof(c) << std::endl; return EXIT_SUCCESS; }