Deck 14: Advanced Topics

ملء الشاشة (f)
exit full mode
سؤال
The decimal value of the binary number 10100 is ____.

A) 4
B) 16
C) 20
D) 32
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
The ____ function is used to show the size in bytes of any object or type.

A) size()
B) sizeof()
C) len()
D) length()
سؤال
Quick sort and pivot sort are names for recursive sorting methods.
سؤال
You cannot use the address operator (&) with a bit field.
سؤال
The bitwise ____ operator compares the bits of its two operands, and produces a result in which each bit is a 1 if either of the operand's corresponding bits is a 1.

A) complement
B) AND
C) exclusive OR
D) OR
سؤال
The bitwise ____ operator compares the individual bits of its two operands and produces a result in which each bit is a 1 where both operands contain a 1; the result is 0 in all other bit positions.

A) OR
B) AND
C) complement
D) exclusive OR
سؤال
The identifiers in an enum must be unique within a block.
سؤال
For any number n , shifting n bits to the right is the same as multiplying by two to the n power.
سؤال
When a field is type ____ int , then it must be positive, because no bit is reserved for a sign, and all eight bits are used to store the value.

A) bitwise
B) short
C) positive
D) unsigned
سؤال
____ operators let you manipulate individual bits of integer or character values.

A) Binary
B) Unary
C) Bitwise
D) Logical
سؤال
On many systems a(n) ____ is the amount of storage required to store a single character, such as an alphabetic letter or punctuation mark.

A) bit
B) byte
C) mask
D) enumerator
سؤال
Separate enumerators cannot have the same value.
سؤال
The ____ keyword is required to declare a variable of type enumeration in C; this keyword can be omitted in C++.

A) enum
B) enumeration
C) list
D) define
سؤال
The declaration ____ declares a variable named aFlag that occupies one bit of storage.

A) bool aFlag:1;
B) bit aFlag:1;
C) int aFlag(1);
D) int aFlag:1;
سؤال
The far left bit in a byte is called the high-order bit.
سؤال
If you assign a value other than 0 or 1 to a bit field, ____.

A) a 0 is stored
B) a 1 is stored
C) only the far right bit is stored
D) only the far left bit is stored
سؤال
For any number n , shifting n bits to the left is the same as dividing by two to the n power.
سؤال
Suppose value1 contains the bit pattern 10101010, value2 contains the bit pattern 00001111, and result is set to result = value1 & value2; . The value of result is ____.

A) 8
B) 10
C) 14
D) 16
سؤال
The bitwise OR operator is ____.

A) &
B) &&
C) |
D) ||
سؤال
The bitwise AND operator is ____.

A) &
B) &&
C) |
D) ||
سؤال
Provide an example of a mechanical system that uses the decimal system.
سؤال
Write an enumeration Days that gives the values 0 through 6 to the identifiers SUN , MON , and so on.
سؤال
What happens if you use fewer than eight bits as fields in a class?
سؤال
Create a Months enumeration that defines JAN as month 1 and so on.
سؤال
If value is set to 46, then value is ____.

A) 20
B) 23
C) 80
D) 92
سؤال
In the pivot sort algorithm, some programmers prefer to use ____ as the pivot point for a sort instead of using the middle position.

A) the median
B) a random position
C) the first position
D) the last position
سؤال
When you declare a field to be a bit field, the field type must be int or unsigned int . Which type is preferable? Why?
سؤال
The bitwise ____ operator sets each bit in the result to 1 if the corresponding bit in the operand is 0, and each bit in the result to 0 if the corresponding bit in the operand is 1.

A) AND
B) OR
C) complement
D) exclusive OR
سؤال
The ____ is a memory location that holds addresses to which functions should return.

A) stack
B) queue
C) buffer
D) register
سؤال
The bitwise complement operator is ____.

A) !
B) @
C) ^
D) ~
سؤال
The ____________________ operator shifts bits to the left.
سؤال
The ____________________ operator shifts bits to the right.
سؤال
The bitwise left shift operator is ____.

A) <<
B) >>
C) <
D) >
سؤال
When you create a class with several bit fields, in what order are the bits placed within a byte?
سؤال
The bitwise right shift operator is ____.

A) <<
B) >>
C) <
D) >
سؤال
The bitwise exclusive OR operator is ____.

A) !
B) @
C) ^
D) ~
سؤال
Although not required by C++, by convention, a user-defined type begins with a(n) ____________________ letter.
سؤال
A function that calls itself is a(n) ____________________ function.
سؤال
All ____________________ numbers contain a 0 in the far right position.
سؤال
EBCDIC stands for __________________________________________________.
سؤال
Match between columns
occurs when a function is defined in terms of itself
recursion
occurs when a function is defined in terms of itself
byte
occurs when a function is defined in terms of itself
EBCDIC
occurs when a function is defined in terms of itself
binary system
occurs when a function is defined in terms of itself
enumerator
occurs when a function is defined in terms of itself
decimal system
occurs when a function is defined in terms of itself
bit
occurs when a function is defined in terms of itself
mask
occurs when a function is defined in terms of itself
enumeration
سؤال
Match between columns
value whose only purpose is to filter values from other variables
recursion
value whose only purpose is to filter values from other variables
byte
value whose only purpose is to filter values from other variables
EBCDIC
value whose only purpose is to filter values from other variables
binary system
value whose only purpose is to filter values from other variables
enumerator
value whose only purpose is to filter values from other variables
decimal system
value whose only purpose is to filter values from other variables
bit
value whose only purpose is to filter values from other variables
mask
value whose only purpose is to filter values from other variables
enumeration
سؤال
Write a recursive function cumulativeSum() in which for any argument, num , that is passed in with a value greater than 1, the function returns a value that is num plus the cumulativeSum() of num - 1. If num is 1, it returns that value.
سؤال
How does the bitwise exclusive OR operator (^) work?
سؤال
Match between columns
eight binary digits
recursion
eight binary digits
byte
eight binary digits
EBCDIC
eight binary digits
binary system
eight binary digits
enumerator
eight binary digits
decimal system
eight binary digits
bit
eight binary digits
mask
eight binary digits
enumeration
سؤال
Explain a recursive "divide and conquer" approach to quickly sorting a list.
سؤال
In C++, is the ampersand polymorphic or not? Explain.
سؤال
Match between columns
binary digit
recursion
binary digit
byte
binary digit
EBCDIC
binary digit
binary system
binary digit
enumerator
binary digit
decimal system
binary digit
bit
binary digit
mask
binary digit
enumeration
سؤال
Match between columns
coding system used in many mainframe computer systems
recursion
coding system used in many mainframe computer systems
byte
coding system used in many mainframe computer systems
EBCDIC
coding system used in many mainframe computer systems
binary system
coding system used in many mainframe computer systems
enumerator
coding system used in many mainframe computer systems
decimal system
coding system used in many mainframe computer systems
bit
coding system used in many mainframe computer systems
mask
coding system used in many mainframe computer systems
enumeration
سؤال
Match between columns
arithmetic system that uses the digits 0 through 9
recursion
arithmetic system that uses the digits 0 through 9
byte
arithmetic system that uses the digits 0 through 9
EBCDIC
arithmetic system that uses the digits 0 through 9
binary system
arithmetic system that uses the digits 0 through 9
enumerator
arithmetic system that uses the digits 0 through 9
decimal system
arithmetic system that uses the digits 0 through 9
bit
arithmetic system that uses the digits 0 through 9
mask
arithmetic system that uses the digits 0 through 9
enumeration
سؤال
Match between columns
arithmetic system that uses only 1s and 0s
recursion
arithmetic system that uses only 1s and 0s
byte
arithmetic system that uses only 1s and 0s
EBCDIC
arithmetic system that uses only 1s and 0s
binary system
arithmetic system that uses only 1s and 0s
enumerator
arithmetic system that uses only 1s and 0s
decimal system
arithmetic system that uses only 1s and 0s
bit
arithmetic system that uses only 1s and 0s
mask
arithmetic system that uses only 1s and 0s
enumeration
سؤال
Match between columns
named constant in an enumeration
recursion
named constant in an enumeration
byte
named constant in an enumeration
EBCDIC
named constant in an enumeration
binary system
named constant in an enumeration
enumerator
named constant in an enumeration
decimal system
named constant in an enumeration
bit
named constant in an enumeration
mask
named constant in an enumeration
enumeration
سؤال
Match between columns
programmer-defined set of integer constants represented by identifiers
recursion
programmer-defined set of integer constants represented by identifiers
byte
programmer-defined set of integer constants represented by identifiers
EBCDIC
programmer-defined set of integer constants represented by identifiers
binary system
programmer-defined set of integer constants represented by identifiers
enumerator
programmer-defined set of integer constants represented by identifiers
decimal system
programmer-defined set of integer constants represented by identifiers
bit
programmer-defined set of integer constants represented by identifiers
mask
programmer-defined set of integer constants represented by identifiers
enumeration
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/53
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 14: Advanced Topics
1
The decimal value of the binary number 10100 is ____.

A) 4
B) 16
C) 20
D) 32
C
2
The ____ function is used to show the size in bytes of any object or type.

A) size()
B) sizeof()
C) len()
D) length()
B
3
Quick sort and pivot sort are names for recursive sorting methods.
True
4
You cannot use the address operator (&) with a bit field.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
5
The bitwise ____ operator compares the bits of its two operands, and produces a result in which each bit is a 1 if either of the operand's corresponding bits is a 1.

A) complement
B) AND
C) exclusive OR
D) OR
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
6
The bitwise ____ operator compares the individual bits of its two operands and produces a result in which each bit is a 1 where both operands contain a 1; the result is 0 in all other bit positions.

A) OR
B) AND
C) complement
D) exclusive OR
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
7
The identifiers in an enum must be unique within a block.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
8
For any number n , shifting n bits to the right is the same as multiplying by two to the n power.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
9
When a field is type ____ int , then it must be positive, because no bit is reserved for a sign, and all eight bits are used to store the value.

A) bitwise
B) short
C) positive
D) unsigned
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
10
____ operators let you manipulate individual bits of integer or character values.

A) Binary
B) Unary
C) Bitwise
D) Logical
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
11
On many systems a(n) ____ is the amount of storage required to store a single character, such as an alphabetic letter or punctuation mark.

A) bit
B) byte
C) mask
D) enumerator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
12
Separate enumerators cannot have the same value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
13
The ____ keyword is required to declare a variable of type enumeration in C; this keyword can be omitted in C++.

A) enum
B) enumeration
C) list
D) define
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
14
The declaration ____ declares a variable named aFlag that occupies one bit of storage.

A) bool aFlag:1;
B) bit aFlag:1;
C) int aFlag(1);
D) int aFlag:1;
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
15
The far left bit in a byte is called the high-order bit.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
16
If you assign a value other than 0 or 1 to a bit field, ____.

A) a 0 is stored
B) a 1 is stored
C) only the far right bit is stored
D) only the far left bit is stored
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
17
For any number n , shifting n bits to the left is the same as dividing by two to the n power.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
18
Suppose value1 contains the bit pattern 10101010, value2 contains the bit pattern 00001111, and result is set to result = value1 & value2; . The value of result is ____.

A) 8
B) 10
C) 14
D) 16
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
19
The bitwise OR operator is ____.

A) &
B) &&
C) |
D) ||
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
20
The bitwise AND operator is ____.

A) &
B) &&
C) |
D) ||
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
21
Provide an example of a mechanical system that uses the decimal system.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
22
Write an enumeration Days that gives the values 0 through 6 to the identifiers SUN , MON , and so on.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
23
What happens if you use fewer than eight bits as fields in a class?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
24
Create a Months enumeration that defines JAN as month 1 and so on.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
25
If value is set to 46, then value is ____.

A) 20
B) 23
C) 80
D) 92
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
26
In the pivot sort algorithm, some programmers prefer to use ____ as the pivot point for a sort instead of using the middle position.

A) the median
B) a random position
C) the first position
D) the last position
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
27
When you declare a field to be a bit field, the field type must be int or unsigned int . Which type is preferable? Why?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
28
The bitwise ____ operator sets each bit in the result to 1 if the corresponding bit in the operand is 0, and each bit in the result to 0 if the corresponding bit in the operand is 1.

A) AND
B) OR
C) complement
D) exclusive OR
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
29
The ____ is a memory location that holds addresses to which functions should return.

A) stack
B) queue
C) buffer
D) register
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
30
The bitwise complement operator is ____.

A) !
B) @
C) ^
D) ~
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
31
The ____________________ operator shifts bits to the left.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
32
The ____________________ operator shifts bits to the right.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
33
The bitwise left shift operator is ____.

A) <<
B) >>
C) <
D) >
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
34
When you create a class with several bit fields, in what order are the bits placed within a byte?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
35
The bitwise right shift operator is ____.

A) <<
B) >>
C) <
D) >
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
36
The bitwise exclusive OR operator is ____.

A) !
B) @
C) ^
D) ~
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
37
Although not required by C++, by convention, a user-defined type begins with a(n) ____________________ letter.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
38
A function that calls itself is a(n) ____________________ function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
39
All ____________________ numbers contain a 0 in the far right position.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
40
EBCDIC stands for __________________________________________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
41
Match between columns
occurs when a function is defined in terms of itself
recursion
occurs when a function is defined in terms of itself
byte
occurs when a function is defined in terms of itself
EBCDIC
occurs when a function is defined in terms of itself
binary system
occurs when a function is defined in terms of itself
enumerator
occurs when a function is defined in terms of itself
decimal system
occurs when a function is defined in terms of itself
bit
occurs when a function is defined in terms of itself
mask
occurs when a function is defined in terms of itself
enumeration
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
42
Match between columns
value whose only purpose is to filter values from other variables
recursion
value whose only purpose is to filter values from other variables
byte
value whose only purpose is to filter values from other variables
EBCDIC
value whose only purpose is to filter values from other variables
binary system
value whose only purpose is to filter values from other variables
enumerator
value whose only purpose is to filter values from other variables
decimal system
value whose only purpose is to filter values from other variables
bit
value whose only purpose is to filter values from other variables
mask
value whose only purpose is to filter values from other variables
enumeration
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
43
Write a recursive function cumulativeSum() in which for any argument, num , that is passed in with a value greater than 1, the function returns a value that is num plus the cumulativeSum() of num - 1. If num is 1, it returns that value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
44
How does the bitwise exclusive OR operator (^) work?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
45
Match between columns
eight binary digits
recursion
eight binary digits
byte
eight binary digits
EBCDIC
eight binary digits
binary system
eight binary digits
enumerator
eight binary digits
decimal system
eight binary digits
bit
eight binary digits
mask
eight binary digits
enumeration
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
46
Explain a recursive "divide and conquer" approach to quickly sorting a list.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
47
In C++, is the ampersand polymorphic or not? Explain.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
48
Match between columns
binary digit
recursion
binary digit
byte
binary digit
EBCDIC
binary digit
binary system
binary digit
enumerator
binary digit
decimal system
binary digit
bit
binary digit
mask
binary digit
enumeration
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
49
Match between columns
coding system used in many mainframe computer systems
recursion
coding system used in many mainframe computer systems
byte
coding system used in many mainframe computer systems
EBCDIC
coding system used in many mainframe computer systems
binary system
coding system used in many mainframe computer systems
enumerator
coding system used in many mainframe computer systems
decimal system
coding system used in many mainframe computer systems
bit
coding system used in many mainframe computer systems
mask
coding system used in many mainframe computer systems
enumeration
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
50
Match between columns
arithmetic system that uses the digits 0 through 9
recursion
arithmetic system that uses the digits 0 through 9
byte
arithmetic system that uses the digits 0 through 9
EBCDIC
arithmetic system that uses the digits 0 through 9
binary system
arithmetic system that uses the digits 0 through 9
enumerator
arithmetic system that uses the digits 0 through 9
decimal system
arithmetic system that uses the digits 0 through 9
bit
arithmetic system that uses the digits 0 through 9
mask
arithmetic system that uses the digits 0 through 9
enumeration
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
51
Match between columns
arithmetic system that uses only 1s and 0s
recursion
arithmetic system that uses only 1s and 0s
byte
arithmetic system that uses only 1s and 0s
EBCDIC
arithmetic system that uses only 1s and 0s
binary system
arithmetic system that uses only 1s and 0s
enumerator
arithmetic system that uses only 1s and 0s
decimal system
arithmetic system that uses only 1s and 0s
bit
arithmetic system that uses only 1s and 0s
mask
arithmetic system that uses only 1s and 0s
enumeration
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
52
Match between columns
named constant in an enumeration
recursion
named constant in an enumeration
byte
named constant in an enumeration
EBCDIC
named constant in an enumeration
binary system
named constant in an enumeration
enumerator
named constant in an enumeration
decimal system
named constant in an enumeration
bit
named constant in an enumeration
mask
named constant in an enumeration
enumeration
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
53
Match between columns
programmer-defined set of integer constants represented by identifiers
recursion
programmer-defined set of integer constants represented by identifiers
byte
programmer-defined set of integer constants represented by identifiers
EBCDIC
programmer-defined set of integer constants represented by identifiers
binary system
programmer-defined set of integer constants represented by identifiers
enumerator
programmer-defined set of integer constants represented by identifiers
decimal system
programmer-defined set of integer constants represented by identifiers
bit
programmer-defined set of integer constants represented by identifiers
mask
programmer-defined set of integer constants represented by identifiers
enumeration
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 53 في هذه المجموعة.