Array Quiz Flashcards

1
Q

Simple data type

A

variables of these types can store only one value at a time

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

Structured data type

A

a data type in which each data item is a collection of other data items

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

Array

A

a collection of a fixed number of components, all of the same data type

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

One-dimensional array

A

components are arranged in a list form

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

declaring one-dimensional arrays

A

datatype arrayName[intExp]

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

intExp

A

any constant expression that evaluates to a positive integer

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

Index

A

position of some data in an array

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

[ ]

A

array subscripting operator. Always starts at 0

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

basic operations

A

Initializing, Inputting data, Outputting data stored in an array, Finding the largest and/or smallest element

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

does c++ guard against out of bounds indexs?

A

nope

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

Aggregate operation

A

any operation that manipulates the entire array as a single unit. Not allowed in c++

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

Are arrays passed by reference only?

A

yes, don’t use & operator. Const in the formal decorator to detach

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

base address

A

the address (memory location) of the first array component, if it’s a one-dimensional array, its base address is the address of list[0]

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

Sequential search

A

Searching a list for a given item, starting from the first array element and moving one by one

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

Selection sort

A

rearrange the list by selecting an element and moving it to its proper position

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

auto

A

auto declare a variable

17
Q

null terminal

18
Q

A’ vs “A”

A

character vs string

19
Q

can a char array be initialized like: char name[] = “John”?

20
Q

what does cin.get(str, m+1) do?

A

stores the next m characters into str, but the newline character is not stored in str

21
Q

what is a c_str?

A

converts std string to a c-syle string as it’s less abstracted

22
Q

how do you declaire 2d arrays?

A

arrayName [indexSize] [indexSize]

23
Q

row processing

A

Process a single row at a time

24
Q

column processing

A

Process a single column at a time

25
do you have to declare a 2d array dimensions sizes?
yes but only the second one