Deck 8: Arrays

ملء الشاشة (f)
exit full mode
سؤال
An atomic variable is also referred to as a scalar variable.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
A data structure is also known as an atomic data type.
سؤال
The values of a data structure can be decomposed into individual data elements, each of which has to be atomic.
سؤال
A one-dimensional array is also known as both a single-dimensional array and a single-subscript array.
سؤال
An array component is also referred to as the element's subscript value.
سؤال
Each individual element in an array is referred to as an indexed variable.
سؤال
The computer uses the index as an offset from the array's starting position.
سؤال
Atomic data types can be decomposed into simpler types.
سؤال
Structured types can be decomposed into simpler types that are related within a defined structure.
سؤال
A double-precision variable may never be used as a subscript.
سؤال
The statement scanf("%d %lf", grades[0], price[2]); causes two values to be read and stored in the variables grades[0] and price[2].
سؤال
The LISP language was developed specifically for manipulating lists.
سؤال
When using an array element, C performs bound checks on the value of the index.
سؤال
If an array has been declared as consisting of 10 elements and you use an index of 12, C will notify you of the error when the program is compiled.
سؤال
Arrays can be declared either within or outside a function.
سؤال
Arrays declared outside a function have global scope.
سؤال
Global arrays can only be static.
سؤال
When first created, the values within auto local arrays are undefined.
سؤال
When passing an array to a function, the called function receives a copy of the array; this is because C uses pass by value.
سؤال
For large arrays, making duplicate copies of the array for each function call would waste computer storage, consume execution time, and frustrate the effort to return multiple element changes made by the called program.
سؤال
It is generally advisable to omit the size of the array in a function header line.
سؤال
A one-dimensional array consists of both rows and columns of elements.
سؤال
The outer braces in the initialization statement of a two-dimensional array can be omitted.
سؤال
Nested loops are especially useful when dealing with two-dimensional arrays because they allow the programmer to easily cycle through each element.
سؤال
In a three-dimensional array, the second subscript is often called the rank.
سؤال
Arrays of three, four, five, six, or more dimensions can be viewed as mathematical n-tuples of order three, four, five, six, and so on, respectively.
سؤال
A(n) ____ is a data type with two main characteristics: (1) its values can be decomposed into individual data elements, and (2) it provides an access scheme for locating individual data elements.

A)data structure
B)scalar data type
C)array
D)atomic data type
سؤال
A(n) ____, is used to store and process a set of values, all of the same data type, that forms a logical group.

A)data structure
B)scalar variable
C)array
D)atomic variable
سؤال
A ____ is a list of values of the same data type that is stored using a single group name.

A)one-dimensional array
B)two-dimensional array
C)three-dimensional array
D)matrix
سؤال
Each item in an array is called a(n) ____ of the array.

A)subscript
B)variable
C)index
D)element
سؤال
Any individual element in an array can be accessed by giving the name of the array and the element's position; this position is called the element's ____ value.

A)component
B)variable
C)index
D)element
سؤال
In a one-dimensional array in C, the first element has an index of ____.

A)NULL
B)-1
C)0
D)1
سؤال
In C, the array name and index of the desired element are combined by listing the index in ____ after the array name.

A)parentheses
B)square braces
C)curly braces
D)dashes
سؤال
____ refers to the first grade stored in the grades array.

A)grades[0]
B)grades[1]
C)grades(0)
D)grades{1}
سؤال
Any expression that evaluates a(n) ____ may be used as a subscript.

A)character
B)double
C)boolean
D)integer
سؤال
A ____ loop is very convenient for cycling through array elements.

A)while
B)do-while
C)switch
D)for
سؤال
All ____ arrays are created and destroyed each time the function they are local to is called and completes its execution.

A)global
B)static
C)auto
D)extern
سؤال
The individual elements of all global and static arrays are, by default, set to ____ at compilation time.

A)NULL
B)-1
C)0
D)1
سؤال
____ is a correct statement.

A)int grades[5] = {98, 87, 92, 79, 85};
B)int grades[5] = 98, 87, 92, 79, 85;
C)int grades[5] = (98, 87, 92, 79, 85);
D)int grades[5] = [98, 87, 92, 79, 85];
سؤال
____ shows a correct array initialization statement.

A)char codes[4] = {'s', 'a', 'm', 'p', 'l', 'e'};
B)char codes[] = {'s', 'a', 'm', 'p', 'l', 'e'};
C)char codes = {'s', 'a', 'm', 'p', 'l', 'e'};
D)char codes[*] = {'s', 'a', 'm', 'p', 'l', 'e'};
سؤال
____ shows a correct array initialization statement.

A)char codes[6] = ['s', 'a', 'm', 'p', 'l', 'e'];
B)char codes[] = ('s', 'a', 'm', 'p', 'l', 'e');
C)char codes[] = "sample";
D)char codes[*] = {'s', 'a', 'm', 'p', 'l', 'e'};
سؤال
char codes[] = "sample"; sets aside ____ elements in the codes array.

A)5
B)6
C)7
D)8
سؤال
The ____ character is automatically appended to all strings by the C compiler.

A)'\NULL'
B)'\1'
C)'\n'
D)'\0'
سؤال
A two-dimensional array is sometimes referred to as a ____.

A)list
B)vector
C)queue
D)table
سؤال
____ declares an array of three rows and four columns.

A)int val[3,4];
B)int val[4,3];
C)int val[3][4];
D)int val[4][3];
سؤال
The term ____ uniquely identifies the element in row 1, column 3.

A)val[3][1]
B)val[1][3]
C)val[3,1]
D)val[1,3]
سؤال
In a function prototype that has a two-dimensional argument, the ____ size is optional.

A)column
B)row
C)array
D)subscript
سؤال
For one-dimensional arrays, the offset to the element with index i is calculated as ____.

A) Offset = i * the size of the array
B) Offset = i * the size of the subscript
C) Offset = i * the size of a component + 1
D) Offset = i * the size of an individual element
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/48
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 8: Arrays
1
An atomic variable is also referred to as a scalar variable.
True
2
A data structure is also known as an atomic data type.
False
3
The values of a data structure can be decomposed into individual data elements, each of which has to be atomic.
False
4
A one-dimensional array is also known as both a single-dimensional array and a single-subscript array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
5
An array component is also referred to as the element's subscript value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
6
Each individual element in an array is referred to as an indexed variable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
7
The computer uses the index as an offset from the array's starting position.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
8
Atomic data types can be decomposed into simpler types.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
9
Structured types can be decomposed into simpler types that are related within a defined structure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
10
A double-precision variable may never be used as a subscript.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
11
The statement scanf("%d %lf", grades[0], price[2]); causes two values to be read and stored in the variables grades[0] and price[2].
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
12
The LISP language was developed specifically for manipulating lists.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
13
When using an array element, C performs bound checks on the value of the index.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
14
If an array has been declared as consisting of 10 elements and you use an index of 12, C will notify you of the error when the program is compiled.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
15
Arrays can be declared either within or outside a function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
16
Arrays declared outside a function have global scope.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
17
Global arrays can only be static.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
18
When first created, the values within auto local arrays are undefined.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
19
When passing an array to a function, the called function receives a copy of the array; this is because C uses pass by value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
20
For large arrays, making duplicate copies of the array for each function call would waste computer storage, consume execution time, and frustrate the effort to return multiple element changes made by the called program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
21
It is generally advisable to omit the size of the array in a function header line.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
22
A one-dimensional array consists of both rows and columns of elements.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
23
The outer braces in the initialization statement of a two-dimensional array can be omitted.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
24
Nested loops are especially useful when dealing with two-dimensional arrays because they allow the programmer to easily cycle through each element.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
25
In a three-dimensional array, the second subscript is often called the rank.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
26
Arrays of three, four, five, six, or more dimensions can be viewed as mathematical n-tuples of order three, four, five, six, and so on, respectively.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
27
A(n) ____ is a data type with two main characteristics: (1) its values can be decomposed into individual data elements, and (2) it provides an access scheme for locating individual data elements.

A)data structure
B)scalar data type
C)array
D)atomic data type
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
28
A(n) ____, is used to store and process a set of values, all of the same data type, that forms a logical group.

A)data structure
B)scalar variable
C)array
D)atomic variable
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
29
A ____ is a list of values of the same data type that is stored using a single group name.

A)one-dimensional array
B)two-dimensional array
C)three-dimensional array
D)matrix
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
30
Each item in an array is called a(n) ____ of the array.

A)subscript
B)variable
C)index
D)element
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
31
Any individual element in an array can be accessed by giving the name of the array and the element's position; this position is called the element's ____ value.

A)component
B)variable
C)index
D)element
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
32
In a one-dimensional array in C, the first element has an index of ____.

A)NULL
B)-1
C)0
D)1
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
33
In C, the array name and index of the desired element are combined by listing the index in ____ after the array name.

A)parentheses
B)square braces
C)curly braces
D)dashes
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
34
____ refers to the first grade stored in the grades array.

A)grades[0]
B)grades[1]
C)grades(0)
D)grades{1}
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
35
Any expression that evaluates a(n) ____ may be used as a subscript.

A)character
B)double
C)boolean
D)integer
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
36
A ____ loop is very convenient for cycling through array elements.

A)while
B)do-while
C)switch
D)for
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
37
All ____ arrays are created and destroyed each time the function they are local to is called and completes its execution.

A)global
B)static
C)auto
D)extern
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
38
The individual elements of all global and static arrays are, by default, set to ____ at compilation time.

A)NULL
B)-1
C)0
D)1
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
39
____ is a correct statement.

A)int grades[5] = {98, 87, 92, 79, 85};
B)int grades[5] = 98, 87, 92, 79, 85;
C)int grades[5] = (98, 87, 92, 79, 85);
D)int grades[5] = [98, 87, 92, 79, 85];
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
40
____ shows a correct array initialization statement.

A)char codes[4] = {'s', 'a', 'm', 'p', 'l', 'e'};
B)char codes[] = {'s', 'a', 'm', 'p', 'l', 'e'};
C)char codes = {'s', 'a', 'm', 'p', 'l', 'e'};
D)char codes[*] = {'s', 'a', 'm', 'p', 'l', 'e'};
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
41
____ shows a correct array initialization statement.

A)char codes[6] = ['s', 'a', 'm', 'p', 'l', 'e'];
B)char codes[] = ('s', 'a', 'm', 'p', 'l', 'e');
C)char codes[] = "sample";
D)char codes[*] = {'s', 'a', 'm', 'p', 'l', 'e'};
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
42
char codes[] = "sample"; sets aside ____ elements in the codes array.

A)5
B)6
C)7
D)8
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
43
The ____ character is automatically appended to all strings by the C compiler.

A)'\NULL'
B)'\1'
C)'\n'
D)'\0'
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
44
A two-dimensional array is sometimes referred to as a ____.

A)list
B)vector
C)queue
D)table
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
45
____ declares an array of three rows and four columns.

A)int val[3,4];
B)int val[4,3];
C)int val[3][4];
D)int val[4][3];
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
46
The term ____ uniquely identifies the element in row 1, column 3.

A)val[3][1]
B)val[1][3]
C)val[3,1]
D)val[1,3]
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
47
In a function prototype that has a two-dimensional argument, the ____ size is optional.

A)column
B)row
C)array
D)subscript
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
48
For one-dimensional arrays, the offset to the element with index i is calculated as ____.

A) Offset = i * the size of the array
B) Offset = i * the size of the subscript
C) Offset = i * the size of a component + 1
D) Offset = i * the size of an individual element
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.