ECS 30 Lecture Notes - Lecture 7: Segmentation Fault, Dynamic Array, Memory Address

38 views2 pages

Document Summary

The approach for multiple data types is not scalable as it doesn"t capture the nature of the problem. As algorithms become more complex they should be broken down into refined functions that create a hierarchy. Data types can also create a hierarchy by using simple types to define a more complex type, independent types can become one large unified collection. An array groups distinct variables of the same type under a single name. Access to an element in the array is given in the form of indices. These values always start from index zero and the index must be an integer. In memory arrays are continuously allocated in ascending order of index. Similar to global and local variables, there are global and local arrays. If a global array is uninitialized then it will default to zero, but a local array uninitialized will raise a warning by compiler.

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