C Fundamental Types
Integer Types
signed long long unsigned long long
signed long unsigned long
signed int unsigned int
signed short unsigned short
signed char unsigned char
_Bool
What’s in a Name(Repetitive Names)
All Fundamental Types(1 Rule of Order)
Integer Capacity
Integer Capacity On the Common Platform
signed/unsigned char - 8 bits
signed/unsigned short - 16 bits
signed/unsigned int - 32 bits
signed/unsigned long - 64 bits
signed/unsigned long long - 64 bits(same capacity as long(but no smaller than long)
(to see more of table, see doc: https://docs.google.com/document/d/1oSf5X8tu8wevaKgDcBTqtf9Z1SeA8B9sghvy_fIcHF8/edit?usp=sharing
Real Number Capacity On the Common Platform
float - 32 bits
double - 64 bits
long double - 128 bits
(to see more of table, see doc: https://docs.google.com/document/d/1oSf5X8tu8wevaKgDcBTqtf9Z1SeA8B9sghvy_fIcHF8/edit?usp=sharing
Making Variables(4 elements)
Static Typing
Dynamic Typing(difference from Static typing)
– Lots of languages have dynamic typing (e.g.,
JavaScript, PHP, Python)
- * It’s a tradeoff in:
– flexibility
– performance
– ability to detect errors at compile time
Auto(Local) Variable Scope
Global Variable Scope
Shadowing
Literal Values
Integer Literal Values
Floating Point Literals
C99 Boolean Type
A Time before Boolean
Meet stdbool.h
Conditional Expressions
Short Circuiting
C Expressions
Meet Sizeof
How Much Memory( function for reading how much a type)