CSCE 121 Chapter Notes - Chapter 8: Dynamic Array, Include Directive, Parallel Array

141 views9 pages

Document Summary

True/false: all components of an array are of the same data type. Ref: 507: the array index can be any integer less than the array size. Ref: 509: the statement int list[25]; declares list to be an array of 26 components, since the array index starts at 0. Ref: 509: given the declaration int list[20]; the statement list[12] = list[5] + list[7]; updates the content of the twelfth component of the array list. Pts: 1: suppose list is a one dimensional array of size 25, wherein each component is of type int. Further, suppose that sum is an int variable. The following for loop correctly finds the sum of the elements of list. sum = 0; for (int i = 0; i < 25; i++) sum = sum + list; Pts: 1: if an array index goes out of bounds, the program always terminates in an error.

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