Deck 13: Structures

ملء الشاشة (f)
exit full mode
سؤال
Structure data items or fields are called ____ of the structure.

A) instances
B) members
C) types
D) names
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
The real power of structures is realized when the same structure is used for ____.

A) lists of data
B) heterogeneous data
C) strings of data
D) all class members
سؤال
Union members are referenced by using the same notation as structure members.
سؤال
The NULL pointer has no numerical value.
سؤال
Unions can be members of structures or arrays.
سؤال
As with all external and static variables, in the absence of explicit initializers, the numeric elements of static and external arrays or structures are initialized to ____.

A) undefined
B) -2
C) -1
D) 0
سؤال
A C++ structure can also be declared as a(n) ____ with no member functions and all public data members.

A) class
B) string
C) array
D) constant
سؤال
A single ____ is simply a convenient method for combining and storing related items under a common name.

A) array
B) structure
C) string
D) instance variable
سؤال
Declaring an array of structures is different from declaring an array of any other variable type.
سؤال
Declaring a structure requires listing the data ____, data names, and arrangement of data items.

A) objects
B) instances
C) types
D) spaces
سؤال
A C++ class can be declared as a(n) ____ having all private data members and all public member functions.

A) object
B) two-dimensional array
C) array
D) structure
سؤال
An array is a ____ data structure, which means all its components must be of the same data type.

A) hybrid
B) compound
C) homogeneous
D) heterogeneous
سؤال
The steps for returning a structure from a function are identical to the procedures for returning scalar data types.
سؤال
The -> operator is a hyphen followed by a greater-than symbol.
سؤال
For structures, multiple variables can be defined in the same statement.
سؤال
Assigning actual data values to a structure s members is referred to as ____ the structure.

A) defining
B) filling
C) declaring
D) populating
سؤال
By convention, the first letter of a user-selected data type name is lowercase.
سؤال
Copies of all structure members can be passed to a function by including the name of the structure as an argument to the called function.
سؤال
As with all external and static variables, in the absence of explicit initializers, the character elements of static and external arrays or structures are initialized to ____.

A) -1
B) NULL
C) a blank space
D) 0
سؤال
Creating and using a structure involves the same two steps for creating and using any variable.
سؤال
A(n) ____ is a set of structures in which each structure contains at least one member whose value is the address of the next logically ordered structure in the list.

A) array
B) linked list
C) class
D) string
سؤال
A(n) ____ is a data type that reserves the same area in memory for two or more variables that can be different data types.

A) array
B) union
C) class
D) structure
سؤال
Structure ____________________ can be any valid C++ data type.
سؤال
The initialization of structures follows the same rules as for the initialization of ____________________.
سؤال
In the expression ____, the address in pt is incremented before the hours member is accessed.

A) ++pt->hours
B) (++pt) ->hours
C) ++pt->(hours)
D) ++(pt->hours)
سؤال
The statement display(emp.idNum); passes ____ the structure member emp.idNum to a function named display() .

A) the address of
B) a copy of
C) a pointer to
D) the name of
سؤال
The ____ operator reserves the number of bytes required by the requested data type.

A) delete
B) free
C) allocnew
D) new
سؤال
The expression ____ uses the postfix increment operator to increment the address in pt after the hours member is accessed.

A) (pt->hours) ++
B) pt->hours++
C) (pt++) ->hours
D) pt++->hours
سؤال
A structure is a(n) ____________________ data structure, which means that each of its components can be of different data types.
سؤال
The general expression (*pointer).member can always be replaced with the notation ____.

A) *pointer.member
B) *pointer-member
C) *(pointer.member)
D) pointer->member
سؤال
When working with linked lists, records are linked together by including the ____ of the next record in the record immediately preceding it.

A) address
B) name
C) id
D) object sequence number
سؤال
Each structure member is accessed by giving both the ____________________ name and the data item name.
سؤال
Assuming Employee is an already declared structure, the function definition calcNet(Employee *pt) declares the pt parameter as a(n) ____ to a structure of type Employee .

A) pointer
B) class
C) object
D) instance
سؤال
The only argument delete requires is the ____ of a storage block that was allocated dynamically.

A) name
B) data type
C) starting address
D) number of bytes
سؤال
The NULL pointer value, like its end-of-string counterpart, has a numerical value of ____.

A) -2
B) 0
C) 13
D) 32
سؤال
The ____ manipulator included in the cout stream forces each name to be displayed left justified in its designated field width.

A) setiosflags(ios::justified)
B) setiosflags(justified::left)
C) setiosflags(ios::left)
D) setiosflags(ios::right)
سؤال
Both arrays and structures are ____________________ data types.
سؤال
C++ provides a special pointer value called ____ that acts as a sentinel or flag to indicate when the last record on a linked list has been processed.

A) EMPTY
B) LAST
C) NULL
D) ZERO
سؤال
The ____ operator restores a block of storage to the computer at runtime.

A) delete
B) malloc
C) new
D) alloc
سؤال
The definition of a union has the same form as a structure definition, with the keyword(s) ____ used in place of the keyword struct .

A) using union
B) struct_union
C) union_struct
D) union
سؤال
The member operator, . , has a(n) ____________________ precedence compared to the indirection operator * .
سؤال
An alternative to the pass-by-value function call, in which the called function receives a copy of a structure, is a pass by reference that passes a(n) ____________________ to a structure.
سؤال
When working with a linked list, besides an end-of-list sentinel value, a special pointer must be provided for storing the address of the ____________________ structure in the list.
سؤال
Adding a structure to an array of structures requires shifting all ____________________ below the addition down to make room for the new entry.
سؤال
Structure members can be passed to a function in the same manner as any ____________________ variable.
سؤال
Structures, arrays, and ____________________ can be members of unions.
سؤال
The -> operator has a(n) ____________________ priority compared to the increment operator.
سؤال
In practice, most structure handling functions get direct access to a structure by receiving a structure reference or ____________________.
سؤال
Any address that the new operator returns can be passed subsequently to ____________________ to restore the reserved memory to the computer.
سؤال
A(n) ____________________ list provides a convenient method for maintaining a constantly changing list, without needing to reorder and restructure the entire list.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 13: Structures
1
Structure data items or fields are called ____ of the structure.

A) instances
B) members
C) types
D) names
B
2
The real power of structures is realized when the same structure is used for ____.

A) lists of data
B) heterogeneous data
C) strings of data
D) all class members
A
3
Union members are referenced by using the same notation as structure members.
True
4
The NULL pointer has no numerical value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
Unions can be members of structures or arrays.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
As with all external and static variables, in the absence of explicit initializers, the numeric elements of static and external arrays or structures are initialized to ____.

A) undefined
B) -2
C) -1
D) 0
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
A C++ structure can also be declared as a(n) ____ with no member functions and all public data members.

A) class
B) string
C) array
D) constant
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
A single ____ is simply a convenient method for combining and storing related items under a common name.

A) array
B) structure
C) string
D) instance variable
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
Declaring an array of structures is different from declaring an array of any other variable type.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
Declaring a structure requires listing the data ____, data names, and arrangement of data items.

A) objects
B) instances
C) types
D) spaces
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
A C++ class can be declared as a(n) ____ having all private data members and all public member functions.

A) object
B) two-dimensional array
C) array
D) structure
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
An array is a ____ data structure, which means all its components must be of the same data type.

A) hybrid
B) compound
C) homogeneous
D) heterogeneous
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
The steps for returning a structure from a function are identical to the procedures for returning scalar data types.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
The -> operator is a hyphen followed by a greater-than symbol.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
For structures, multiple variables can be defined in the same statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
Assigning actual data values to a structure s members is referred to as ____ the structure.

A) defining
B) filling
C) declaring
D) populating
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
By convention, the first letter of a user-selected data type name is lowercase.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
Copies of all structure members can be passed to a function by including the name of the structure as an argument to the called function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
As with all external and static variables, in the absence of explicit initializers, the character elements of static and external arrays or structures are initialized to ____.

A) -1
B) NULL
C) a blank space
D) 0
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
Creating and using a structure involves the same two steps for creating and using any variable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
A(n) ____ is a set of structures in which each structure contains at least one member whose value is the address of the next logically ordered structure in the list.

A) array
B) linked list
C) class
D) string
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
A(n) ____ is a data type that reserves the same area in memory for two or more variables that can be different data types.

A) array
B) union
C) class
D) structure
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
Structure ____________________ can be any valid C++ data type.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
The initialization of structures follows the same rules as for the initialization of ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
In the expression ____, the address in pt is incremented before the hours member is accessed.

A) ++pt->hours
B) (++pt) ->hours
C) ++pt->(hours)
D) ++(pt->hours)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
The statement display(emp.idNum); passes ____ the structure member emp.idNum to a function named display() .

A) the address of
B) a copy of
C) a pointer to
D) the name of
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
The ____ operator reserves the number of bytes required by the requested data type.

A) delete
B) free
C) allocnew
D) new
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
The expression ____ uses the postfix increment operator to increment the address in pt after the hours member is accessed.

A) (pt->hours) ++
B) pt->hours++
C) (pt++) ->hours
D) pt++->hours
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
A structure is a(n) ____________________ data structure, which means that each of its components can be of different data types.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
The general expression (*pointer).member can always be replaced with the notation ____.

A) *pointer.member
B) *pointer-member
C) *(pointer.member)
D) pointer->member
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
When working with linked lists, records are linked together by including the ____ of the next record in the record immediately preceding it.

A) address
B) name
C) id
D) object sequence number
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
Each structure member is accessed by giving both the ____________________ name and the data item name.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
Assuming Employee is an already declared structure, the function definition calcNet(Employee *pt) declares the pt parameter as a(n) ____ to a structure of type Employee .

A) pointer
B) class
C) object
D) instance
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
The only argument delete requires is the ____ of a storage block that was allocated dynamically.

A) name
B) data type
C) starting address
D) number of bytes
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
The NULL pointer value, like its end-of-string counterpart, has a numerical value of ____.

A) -2
B) 0
C) 13
D) 32
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
The ____ manipulator included in the cout stream forces each name to be displayed left justified in its designated field width.

A) setiosflags(ios::justified)
B) setiosflags(justified::left)
C) setiosflags(ios::left)
D) setiosflags(ios::right)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
Both arrays and structures are ____________________ data types.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
C++ provides a special pointer value called ____ that acts as a sentinel or flag to indicate when the last record on a linked list has been processed.

A) EMPTY
B) LAST
C) NULL
D) ZERO
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
The ____ operator restores a block of storage to the computer at runtime.

A) delete
B) malloc
C) new
D) alloc
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
The definition of a union has the same form as a structure definition, with the keyword(s) ____ used in place of the keyword struct .

A) using union
B) struct_union
C) union_struct
D) union
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
The member operator, . , has a(n) ____________________ precedence compared to the indirection operator * .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
An alternative to the pass-by-value function call, in which the called function receives a copy of a structure, is a pass by reference that passes a(n) ____________________ to a structure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
When working with a linked list, besides an end-of-list sentinel value, a special pointer must be provided for storing the address of the ____________________ structure in the list.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
Adding a structure to an array of structures requires shifting all ____________________ below the addition down to make room for the new entry.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
Structure members can be passed to a function in the same manner as any ____________________ variable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
Structures, arrays, and ____________________ can be members of unions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
The -> operator has a(n) ____________________ priority compared to the increment operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
In practice, most structure handling functions get direct access to a structure by receiving a structure reference or ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
Any address that the new operator returns can be passed subsequently to ____________________ to restore the reserved memory to the computer.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
A(n) ____________________ list provides a convenient method for maintaining a constantly changing list, without needing to reorder and restructure the entire list.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.