Lesson 2: Arrays and Pointers Flashcards

1
Q

An ordered set consisting of a variable number of elements to which additions and deletions may be made

A

List

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

A list which displays the relationship of physical adjacency

A

Linear list

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

A finite sequence of simple data items or records

A

Linear list

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

An ordered collection of data items of the same type referred to collectively by a single name

A

Array

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

Individual data items in an array are called __________

A

elements

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

Array elements are ordered according to subscripts, and sometimes called as ___________

A

Subscripted variables

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

A variable that holds the memory address of another variable

A

Pointer

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

The datatype of both, the pointer variable and the variable whose address is being assigned to a pointer variable, must be ___________

A

same

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

Declaration of Array

A

int a[5];

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

Declaration of Pointer

A

int *p;

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

Differences of Pointer and Array (clue: OSV)

A

&operator
sizeof operator
reassigning a VALUE

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

[Differences of Pointer and Array] &operator

A

&pointer = returns the address of pointer
&array = returns the address of first element

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

[Differences of Pointer and Array] sizeof operator

A

sizeof(array) = returns the total memory consumed by the all the elements of the array
sizeof(pointer) = returns the only memory consumed by the pointer variable itself

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

[Differences of Pointer and Array] reassigning a value

A

Array variable can’t be re-assigned a value whereas pointer variable can

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

The number of subscripts of an array determines its __________

A

Dimensionality

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

An array with only one subscript

A

One-dimensional array

17
Q

An array with two subscripts

A

Two-dimensional array

18
Q

Arrays with more than two subscripts

A

Multi-dimensional array