MIS 24053 Lecture Notes - Lecture 27: Array Data Structure, For Loop

15 views7 pages

Document Summary

An array is a collection of data elements that are of the same type (e. g. , a collection of integers, collection of characters, collection of doubles). Given a list of test scores, determine the maximum and minimum scores. Read in a list of student names and rearrange them in alphabetical order (sorting). Given the height measurements of students in a class, output the names of those students who are taller than average. The array elements are all values of the type . The size of the array is indicated by , the number of elements in the array. must be an int constant or a constant expression. Note that an array can have multiple dimensions. Declare an array of 10 integers: int ar[10]; // array of 10 ints. To access an individual element we must apply a subscript to array named ar. The expression in the brackets is known as the index.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents