ECS 30 Lecture Notes - Lecture 2: Camel Case

51 views2 pages

Document Summary

Data type are nothing but a amount of consecutive bytes, and a way to interpret these bytes. Bytes are nothing but combinations of ones and zeros. The c language guarantees a minimum byte size for the data type. The type of os, compiler, processor architecture will decide to the real implementation size. A built-in operator sizeof() will give you the size of each data type. Without a specific modifier, they are signed by default. Floating point numbers are always signed, and double usually has twice the precision of float. Maximum represented value can be higher (3e38 for float vs. 1. 7e308 for double) %d is a decimal value, %u is an unsigned decimal value, %f for floating point, h stands for half, l stands for long. Choose floating point numbers only if you need fractional components. Use a double or float based on the precision that you want. Otherwise you should use a signed and unsigned type.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents