Add Initial commit
This commit is contained in:
BIN
CM2005 Object Oriented Programming/Topic 2/2.1.1/a.exe
Normal file
BIN
CM2005 Object Oriented Programming/Topic 2/2.1.1/a.exe
Normal file
Binary file not shown.
19
CM2005 Object Oriented Programming/Topic 2/2.1.1/types.cpp
Normal file
19
CM2005 Object Oriented Programming/Topic 2/2.1.1/types.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
#include <iostream>
|
||||
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user