CPS 180 Final questions with complete solutions
One-dimensional array correct answer: A linear collection of items of the same type. Physical size of an array correct answer: The size of the memory storage allocated in terms of the number of elements that can be held. Logical size of an array correct answer: The number of elements that are actually stored, which can be any number form 0 up to the physical size Dimension correct answer: The number of different indexes needed to access an element Processing array elements in general involve a ______ correct answer: loop To create an array is to... correct answer: Allocate memory storage for it To initialize an array is to... correct answer: put actual values as individual elements into the array Declaring an array variable: correct answer: double [ ] myValues; Creating an array (allocate memory space for the array. this can be combined with declaration): correct answer: myValues = new double [physicalSize];
Document information
- Uploaded on
- May 19, 2023
- Number of pages
- 6
- Written in
- 2022/2023
- Type
- Exam (elaborations)
- Contains
- Questions & answers