summaryrefslogtreecommitdiff
path: root/4p28.cpp
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-08-21 20:55:10 +0200
committerOskar <[email protected]>2024-08-21 20:55:10 +0200
commit4c8377e5711e2c864c8754d1d6373c09da2ce7e1 (patch)
treed3c8703a39cb8bd2f1a3b22c868141f8eba35e95 /4p28.cpp
parente747f69eb9b34f2c99472ca1cd17e049c1b74c9c (diff)
more exercises
Diffstat (limited to '4p28.cpp')
-rw-r--r--4p28.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/4p28.cpp b/4p28.cpp
new file mode 100644
index 0000000..0f519e1
--- /dev/null
+++ b/4p28.cpp
@@ -0,0 +1,33 @@
+#include <iostream>
+
+/*
+ *
+ * 4.28
+ *
+ *
+ */
+
+int main () {
+
+ std::cout << "void " << sizeof(void*) << std::endl;
+ std::cout << "nullptr_t " << sizeof(std::nullptr_t) << std::endl;
+ std::cout << "bool " << sizeof(bool) << std::endl;
+ std::cout << "char " << sizeof(char) << std::endl;
+ std::cout << "uchar " << sizeof(unsigned char) << std::endl;
+ std::cout << "schar " << sizeof(signed char) << std::endl;
+ std::cout << "si " << sizeof(short int) << std::endl;
+ std::cout << "i " << sizeof(int) << std::endl;
+ std::cout << "li " << sizeof(long int) << std::endl;
+ std::cout << "lli " << sizeof(long long int) << std::endl;
+ std::cout << "usi " << sizeof(unsigned short int) << std::endl;
+ std::cout << "ui " << sizeof(unsigned int) << std::endl;
+ std::cout << "uli " << sizeof(unsigned long int) << std::endl;
+ std::cout << "ulli " << sizeof(unsigned long long int) << std::endl;
+ std::cout << "wchar " << sizeof(wchar_t) << std::endl;
+ std::cout << "char16 " << sizeof(char16_t) << std::endl;
+ std::cout << "char32 " << sizeof(char32_t) << std::endl;
+ std::cout << "float " << sizeof(float) << std::endl;
+ std::cout << "double " << sizeof(double) << std::endl;
+ std::cout << "long double " << sizeof(long double) << std::endl;
+ return 0;
+}