Ch_9_Answers_2-D_Arrays_5ed

Ch_9_Answers_2-D_Arrays_5ed - CSCI 152 Possible Answers for...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: CSCI 152 Possible Answers for Chapter 9 2-D Arrays 5 th edition Two-dimensional array problem answers: 31. int temp[3][4] = {{6, 8, 12, 9}, {7, 5, 10, 6}, {4, 13, 16, 20}}; 32 . a. cout << temp[0][0] << endl; b. cout << temp[0][3]<< endl; c. cout << temp[2][0] << endl; d. cout << temp[2][3] << endl; 33. a) 5 * 6 = 30 elements b) 5 rows c) 6 columns d) add the values for each color in a type (add across rows) for example, total # of Fords = # red Fords + # green Fords + # of silver Fords + # black Fords e) add the values for each car type in a color (add down columns) for example, total # of red cars = # red Fords + # red Toyotas + # red Saturns + # red Mazdas...
View Full Document

This note was uploaded on 04/24/2011 for the course CSCI 1302 taught by Professor Harter during the Spring '11 term at Texas A&M University–Commerce.

Page1 / 3

Ch_9_Answers_2-D_Arrays_5ed - CSCI 152 Possible Answers for...

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

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