31 views5 pages

Document Summary

Arrays are data structures, consisting of elements of the same data type. All the elements are stored in contiguos memory locations. Array names are pointers to the first element(also known as base address) - data_type: primitive or user defined data type. - array_name: identifies the array, and follows the same rules as any other variable name. - size: defines de number of elements that can be stored. It has to be an integer constant(symbolic, named or literal) - if not initialized, the array declaration ends with semicolon. - every element in the array can be accessed using index value. Index should be an integer( constant, variable or ann expression that can be evaluated as integer) In c, valid index values are from 0 to n-1. Where n is the size of the array. In the example above, the elements of myarray, can be accessed using myarray[0], myarray[1]myarray[9] Each of the elements can be used as an independent variable,

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

Related Questions