CS136 Lecture Notes - Lecture 7: Mutation, Global Variable, Call Stack

20 views5 pages

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.

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