CS136 Lecture Notes - Lecture 7: Mutation, Global Variable, Call Stack
Document Summary
Overflow: int limit ( -2,147,483,648 ~ 2,147,483,647, int_min & int_max, sizeof (int) = 4 -> limited space is the main reason lead to overflow. Type: char (%c: sizeof (char) = 1, 28 = 256 possible values for a char, character use single quotes. Ascii value 97 (c translates a" into 97) Printf ( %c\n , letter_a) > a / printf ( %d\n , letter_a) > 97. Ascii: to represent text (char) in memory with a numeric code to each character. Thursday, january 25, 2018 used as integer expression. Character arithmetic: char can be values in. Symbol type: define a unique integer for each symbol (usually all caps) Thursday, january 25, 2018: c float type can represent real values. 0. 022 * 1023: expect precision errors, type float always will have some decimal. Float continue: type: double has more precision than float.