bg287

csc110:Arrays

Posted in csc110 by bnmng on 2010 04/20

Next program is 20 Percent of grade. Due may 4th during the final.

Final Tuesday May 4th at 1000. If you show late you’ll be OK.

Homework due Tuesday, April 27. Chap 8 Bronson

Lab on the 29th.

8.1: 1, 2
8.2 1,5
8.3 1, 2, 3, 4 part(a)

Today:
Arrays as arguments

Arrays are a structured type. An array defined with 100 elements is numbered 0 to 99.
An array has an index.
Processing an array involves a loop. Means if you have an array.
Arrays should be named with a plural form.

void getlist (int [], int &) // Arrays are always passed by reference (don’t use a & for an array).
void putlist (cost int [] ) // this allows the array to be passed but the function can’t change it.

We won’t be responsible for the stuct feature in Mr. Sterling’s program.

Finding the minimum index (that is the index of the minimum value).
0=45
1=57
2=14
3=19
4=59

use an auxiliary variable called Min Index.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: