Deck 7: Arrays

ملء الشاشة (f)
exit full mode
سؤال
Each item in an array is called a(n) ____ or component of the array.

A) element
B) object
C) instance
D) list
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Each individual array element is referred to as an indexed variable or a(n) ____ variable.

A) scalar
B) subscripted
C) static
D) array
سؤال
A string is any sequence of characters enclosed in ____.

A) asterisks
B) single quotation marks
C) parentheses
D) double quotation marks
سؤال
Array elements can be initialized in their declaration statements in the same manner as scalar variables, except that the initializing elements must be included in braces.
سؤال
A(n) ____ array consists of both rows and columns of elements.

A) one-dimensional
B) two-dimensional
C) single-dimensional
D) simple-dimensional
سؤال
The escape sequence \0 is called the ____ character.

A) null
B) newline
C) tab
D) zero
سؤال
Using a subscript that references a nonexistent array element will always be detected by all C++ compilers.
سؤال
The element s index or ____ value gives the element s position in the array.

A) id
B) scale
C) subscript
D) reference
سؤال
A(n) ____ is a list of related values, all having the same data type, that s stored with a single group name.

A) static variable
B) one-dimensional array
C) atomic variable
D) instance variable
سؤال
It is generally advisable to use the size of the array in a function header line.
سؤال
C++ allows up to two dimensions to be declared for arrays.
سؤال
Arrays are extremely useful in any application that requires multiple passes through the same set of data elements.
سؤال
Only integer constants can be used as array subscripts.
سؤال
A two-dimensional array is sometimes referred to as a table.
سؤال
A one-dimensional array is also referred to as a single-dimensional array.
سؤال
A(n) ____ check is a check of the value of the index being used.

A) index
B) bounds
C) object
D) reference
سؤال
Two-dimensional array variables can be used anywhere that scalar variables are valid.
سؤال
A(n) ____ variable is one whose value can t be further subdivided or separated into a legitimate data type.

A) indexed
B) array
C) grade
D) scalar
سؤال
A(n) ____ type is any type whose values can be decomposed and are related by some defined structure.

A) scalar
B) static
C) aggregate
D) atomic
سؤال
Forgetting to declare an array is a common programming error.
سؤال
A(n) ____ is the data structure of first choice when you have a list of primitive data types or objects that can be grouped as an array but must be expanded or contracted.

A) array
B) vector
C) object
D) class
سؤال
____ are used to specify which elements in a container are to be operated on when an algorithm is called.

A) Iterators
B) Walkers
C) Sequencers
D) Indexers
سؤال
For a one-dimensional array, the first element has an index of ____________________.
سؤال
The STL algorithm ____ removes duplicate adjacent elements in a specified range.

A) duplicate
B) delete
C) unique
D) remove
سؤال
Good programming practice requires defining the number-of-items in the array as a(n) ____________________ before declaring the array.
سؤال
The ____ header is required to create one or more vector objects.

A) < string >
B) < iostream >
C) < algorithm >
D) < vector >
سؤال
The STL algorithm ____ assigns every element in a specified range to a specified value.

A) equal
B) fill
C) find
D) unique
سؤال
The STL ____ function returns a value corresponding to the start of the vector.

A) begin()
B) end()
C) rear()
D) last()
سؤال
To meet the need of providing a tested and generic set of data structures that can be modified, expanded, and contracted, C++ includes a useful set of classes in its ____.

A) Standard Array Library
B) Standard Template Library
C) Standard Data Structure Library
D) Data Structure Library
سؤال
The STL algorithm ____ copies elements from a source range to a destination range.

A) copy
B) copy_backward
C) copy_forward
D) replace
سؤال
Internally, the computer uses the ___________________ as an offset from the array s starting position.
سؤال
In C++, a two-dimensional array is initialized in ____ order.

A) vector
B) linear
C) row
D) column
سؤال
The STL algorithm ____ returns the sum of the numbers in a specified range.

A) count
B) sum
C) max
D) accumulate
سؤال
The STL algorithm ____ randomly shuffles element values in a specified range.

A) random
B) rnd_shuffle
C) shuffle
D) random_shuffle
سؤال
Individual array elements can be displayed using the ___________________ object.
سؤال
____ loops are especially useful when dealing with two-dimensional arrays because they allow the programmer to designate and cycle through each element easily.

A) Nested
B) Single
C) Simple
D) Conditional
سؤال
The ____________________ of an array may be omitted when initializing values in the declaration statement.
سؤال
Conceptually, a ____-dimensional array can be viewed as a book of data tables.

A) one
B) two
C) three
D) four
سؤال
Each STL class is coded as a template that permits the constructing a generic data structure, referred to as a(n) ____.

A) container
B) object
C) structure
D) array
سؤال
Many compilers automatically set all elements of integer and real value arrays to ____.

A) -100
B) -10
C) -1
D) 0
سؤال
____________________ classes and algorithms provide verified and reliable code that can shorten program development time.
سؤال
Generic STL functions are referred to in the STL as ____________________.
سؤال
The statement char code 6 26 ; declares an array code consisting of ____________________ rows.
سؤال
Array elements are passed to a called function in the same manner as __________________ variables.
سؤال
The C++ vector class function ___________________ appends an element at the end of the vector .
سؤال
The header is required to create and use an STL sort algorithm.
سؤال
A(n) ____________________ is the data structure of choice when you have a list of primitive data types or objects that don t have to be expanded or contracted.
سؤال
A vector is similar to an array in that it stores elements that can be accessed using an integer index that starts at ___________________.
سؤال
The value of using a(n) ___________________ search algorithm is that the number of elements that must be searched is cut in half on each iteration of the algorithm.
سؤال
The functions begin() and end() are known as STL____________________ functions.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 7: Arrays
1
Each item in an array is called a(n) ____ or component of the array.

A) element
B) object
C) instance
D) list
A
2
Each individual array element is referred to as an indexed variable or a(n) ____ variable.

A) scalar
B) subscripted
C) static
D) array
B
3
A string is any sequence of characters enclosed in ____.

A) asterisks
B) single quotation marks
C) parentheses
D) double quotation marks
D
4
Array elements can be initialized in their declaration statements in the same manner as scalar variables, except that the initializing elements must be included in braces.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
A(n) ____ array consists of both rows and columns of elements.

A) one-dimensional
B) two-dimensional
C) single-dimensional
D) simple-dimensional
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
The escape sequence \0 is called the ____ character.

A) null
B) newline
C) tab
D) zero
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
Using a subscript that references a nonexistent array element will always be detected by all C++ compilers.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
The element s index or ____ value gives the element s position in the array.

A) id
B) scale
C) subscript
D) reference
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
A(n) ____ is a list of related values, all having the same data type, that s stored with a single group name.

A) static variable
B) one-dimensional array
C) atomic variable
D) instance variable
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
It is generally advisable to use the size of the array in a function header line.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
C++ allows up to two dimensions to be declared for arrays.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
Arrays are extremely useful in any application that requires multiple passes through the same set of data elements.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
Only integer constants can be used as array subscripts.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
A two-dimensional array is sometimes referred to as a table.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
A one-dimensional array is also referred to as a single-dimensional array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
A(n) ____ check is a check of the value of the index being used.

A) index
B) bounds
C) object
D) reference
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
Two-dimensional array variables can be used anywhere that scalar variables are valid.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
A(n) ____ variable is one whose value can t be further subdivided or separated into a legitimate data type.

A) indexed
B) array
C) grade
D) scalar
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
A(n) ____ type is any type whose values can be decomposed and are related by some defined structure.

A) scalar
B) static
C) aggregate
D) atomic
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
Forgetting to declare an array is a common programming error.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
A(n) ____ is the data structure of first choice when you have a list of primitive data types or objects that can be grouped as an array but must be expanded or contracted.

A) array
B) vector
C) object
D) class
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
____ are used to specify which elements in a container are to be operated on when an algorithm is called.

A) Iterators
B) Walkers
C) Sequencers
D) Indexers
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
For a one-dimensional array, the first element has an index of ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
The STL algorithm ____ removes duplicate adjacent elements in a specified range.

A) duplicate
B) delete
C) unique
D) remove
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
Good programming practice requires defining the number-of-items in the array as a(n) ____________________ before declaring the array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
The ____ header is required to create one or more vector objects.

A) < string >
B) < iostream >
C) < algorithm >
D) < vector >
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
The STL algorithm ____ assigns every element in a specified range to a specified value.

A) equal
B) fill
C) find
D) unique
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
The STL ____ function returns a value corresponding to the start of the vector.

A) begin()
B) end()
C) rear()
D) last()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
To meet the need of providing a tested and generic set of data structures that can be modified, expanded, and contracted, C++ includes a useful set of classes in its ____.

A) Standard Array Library
B) Standard Template Library
C) Standard Data Structure Library
D) Data Structure Library
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
The STL algorithm ____ copies elements from a source range to a destination range.

A) copy
B) copy_backward
C) copy_forward
D) replace
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
Internally, the computer uses the ___________________ as an offset from the array s starting position.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
In C++, a two-dimensional array is initialized in ____ order.

A) vector
B) linear
C) row
D) column
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
The STL algorithm ____ returns the sum of the numbers in a specified range.

A) count
B) sum
C) max
D) accumulate
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
The STL algorithm ____ randomly shuffles element values in a specified range.

A) random
B) rnd_shuffle
C) shuffle
D) random_shuffle
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
Individual array elements can be displayed using the ___________________ object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
____ loops are especially useful when dealing with two-dimensional arrays because they allow the programmer to designate and cycle through each element easily.

A) Nested
B) Single
C) Simple
D) Conditional
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
The ____________________ of an array may be omitted when initializing values in the declaration statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
Conceptually, a ____-dimensional array can be viewed as a book of data tables.

A) one
B) two
C) three
D) four
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
Each STL class is coded as a template that permits the constructing a generic data structure, referred to as a(n) ____.

A) container
B) object
C) structure
D) array
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
Many compilers automatically set all elements of integer and real value arrays to ____.

A) -100
B) -10
C) -1
D) 0
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
____________________ classes and algorithms provide verified and reliable code that can shorten program development time.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
Generic STL functions are referred to in the STL as ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
The statement char code 6 26 ; declares an array code consisting of ____________________ rows.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
Array elements are passed to a called function in the same manner as __________________ variables.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
The C++ vector class function ___________________ appends an element at the end of the vector .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
The header is required to create and use an STL sort algorithm.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
A(n) ____________________ is the data structure of choice when you have a list of primitive data types or objects that don t have to be expanded or contracted.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
A vector is similar to an array in that it stores elements that can be accessed using an integer index that starts at ___________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
The value of using a(n) ___________________ search algorithm is that the number of elements that must be searched is cut in half on each iteration of the algorithm.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
The functions begin() and end() are known as STL____________________ functions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.