CSCI-14 Lab 2 – due 2/11/16

advertisement
CSCI-14 Lab 2 – due 2/11/16
Please work in groups of two. Submit one email for the group, submitted following the class
email instructions, with both names in the subject line and the body of the email, and in the
source top-of-file comments.
The sizeof() operator gives the size, in bytes, of a data type or variable. For example, a
statement like cout << sizeof( char ); will display the size of a char on your system
Write a C++ program that displays the size in bytes of all of the scalar (atomic) C++ data types
we discussed in class. Print each size with a message explaining the types for the sizes.
Send me the source and output of your program.
If you feel ambitious, run this on a couple of different IDEs, and compare the results. But only
send me one version with output.
Download