lect13 Vectors

lect13 Vectors - Exam 2 Lecture Portion Avg W1 W2 W3 Total...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Exam 2 Lecture Portion Avg Median 100s W1 80.5 89.5 1 W2 77.1 88 1 W3 71.0 77 0 Total 77.1 87.5 2
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Passing Arrays Example void func(int passedArray[]); main() { int intArray[5]; intArray[0] = 60; cout << intArray[0]; func(intArray); cout << intArray[0]; } void func(int passedArray[]) { passedArray[0] = 1000; }
Background image of page 2
Initializing Arrays int main() { char cArray3[5] = {'a', 'b', 'c'}; int iArray[] = {1, 2, 3, 4}; int iArray2[10] = {10, 13, 15, 17}; double dArray[] = {3.4, 5.67e4}; double dArray1[5] = {6.7, 7.8, 9.5}; }
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Initializing string Arrays #include <string> using namespace std; int main() { string sArray[] = {"one", "two", "three"}; cout << sArray[0]; }
Background image of page 4
Character Array Alternative Initialization char cArray[] = "hello"; char cArray2[10] = "hi";
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Two Dimensional Arrays char cArray[10][20]; int iArray[100][50]; cArray[0][0] = ‘a’; cArray[0][1] = ‘b’; cArray[9][19] = ‘x’; iArray[0][0] = 99; iArray[1][5] = 135; iArray[99][49] = 0;
Background image of page 6
Vectors A Vector Is a Resizable Array Must Include File <vector>
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 03/03/2010.

Page1 / 12

lect13 Vectors - Exam 2 Lecture Portion Avg W1 W2 W3 Total...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online