QUIZ 3 REVIEW Flashcards

1
Q

Illustration 1: Which line declares an array?

A

int Array[10];

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Illustration 1: Which line declares an integer?

A

int x;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Illustration 1: Which line declares an integer pointer?

A

int* px;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Illustration 1: Which line gives the value of the fourth element of an array?

A

Array[3]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Illustration 1: Which line gives the address of the third subscripted value of an array?

A

&Array[3]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Illustration 1: Which line specifies the value of an integer?

A

x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Illustration 1: Which line gives the pointer to the first element of an array?

A

Array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Illustration 1: Which line gives the contents of the address of the fourth element of an array?

A

*(&Array[3])

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Illustration 1: Which line gives the address of an integer?

A

&x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which line dereferences (gives the contents) of an address given by an integer pointer?

A

*px

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

. Illustration 2: Which line declares an integer?

A

int x;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Illustration 2: Which line declares an array with 10 elements?

A

Array[3]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Illustration 2: Which line calls foo with a copy of an integer?

A

foo(x);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Illustration 2: Which line calls foo with the address of an integer?

A

foo(&x);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Illustration 2: Which line calls foo with the address of the first element of an array?

A

foo(cherry, 3);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Illustration 2: Which line calls foo with the value of an element of an array?

A

foo(cherry[3]);

17
Q

Illustration 2: Which line calls foo with the address of an element of an array which is not the first element?

A

foo(&cherry[3]);

18
Q

Illustration 3: What makes the lines a function prototype?

A

semicolon

19
Q

Illustration 3: Which line declares a single dimension integer array with an unnecessary dimension value?

A

int foo( int boot[5] );

20
Q

Illustration 3: Which line declares a multi-dimension array?

A

int foo( int tire[3][5] );

21
Q

Illustration 3: Which line declares an integer array without including dimension information?

A

int foo( int boot[] );

22
Q

. Illustration 3: Which line declares that the function is receiving a copy of a value?

A

int foo ( int x );

23
Q

Illustration 3: Does line 1 declare an integer pointer?

A

yes*