EECS 280 Lecture Notes - Lecture 15: In C, Shap, C String Handling

73 views8 pages

Document Summary

An object is a piece of data in memory. An object lives at an address in memory. Object lifetimes are managed according to storage duration. Globals and static live for the whole program. Locals live for the execution of the block. Globals and locals are managed by the compiler - the compiler determines which ones go away and all that. Procedural abstraction lets us separate what the code does from how it is implemented. In c++, we use functions to implement procedural abstraction. Int * find(int*a, unassigned int size, int search) For(int * i = a; i < a + size; ++i) For(int *i = s; i == "\0"; ++i) For (triangle *i = triangles; i < triangles + size; ++i) Cout << "area = " << triangle_area(i) << endl; Triangle t = ask_user(); //the user types in isosceles. The static type (at compile type) is triangles, the dynamic type (at run time) is isosceles.

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