Absolute C++ Chapter 5 Self-Test Exercise(1)

1. int a[5] is a declaration of array that has 5 places for int value, but a[4] is the fifth variable of array [a]

2.a.score b.double c.5 d.0-5 e.score[1]

3.a. too many argument assigned. b. no error c. no error

4.abc

5.

1.1 2.2 3.3

1.1 3.3 3.3

6.

0 2 4 6 8 10 12 14 16 18

0 4 8 12 16

7. there is no place 9 for the array.

8. at the end there is no a[10] variable.

9.

int a[20]

for(int i=0,i<20,i++)
{
  cin<<a[i];
}

10. 14,1006

11.tripler(a[3]); tripler(a); are illegal

12.b[5] does not exist.

 

posted @ 2012-05-09 00:27  terryhan  阅读(137)  评论(0)    收藏  举报