diff --git a/CM2005 Object Oriented Programming/Topic 2/2.1.1/a.exe b/CM2005 Object Oriented Programming/Topic 2/2.1.1/a.exe new file mode 100644 index 0000000..473a199 Binary files /dev/null and b/CM2005 Object Oriented Programming/Topic 2/2.1.1/a.exe differ diff --git a/CM2005 Object Oriented Programming/Topic 2/2.1.1/types.cpp b/CM2005 Object Oriented Programming/Topic 2/2.1.1/types.cpp new file mode 100644 index 0000000..e1fabe7 --- /dev/null +++ b/CM2005 Object Oriented Programming/Topic 2/2.1.1/types.cpp @@ -0,0 +1,19 @@ +#include + +int main() +{ + char c = 0; + std::cout << "char: " << sizeof(char) << std::endl; + + signed int si = 0; + std::cout << "signed int: " << sizeof(si) << std::endl; + + float f = 0.0f; + std::cout << "float: " << sizeof(f) << std::endl; + + double d = 0.0; + std::cout << "double: " << sizeof(d) << std::endl; + + long double ld = 0.0; + std::cout << "long double: " << sizeof(ld) << std::endl; +} \ No newline at end of file