Deck 2: Problem Solving Using C++

ملء الشاشة (f)
exit full mode
سؤال
Programs with a structure consisting of interrelated segments, called ____ , are arranged in a logical, easily understandable order to form an integrated and complete unit.

A) blocks
B) modules
C) units
D) procedures
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Preprocessor commands end with a semicolon.
سؤال
Data transmitted to a function at runtime is referred to as the ____ of the function.

A) return value
B) arguments
C) body
D) structure
سؤال
Preprocessor commands begin with a ____ sign.

A) #
B) !
C) //
D) */
سؤال
A(n) ____ is a word the language sets aside for a special purpose and can be used only in a specified manner.

A) codeword
B) keyword
C) identifier
D) classname
سؤال
The maximum number of characters in a function name is ____.

A) 128
B) 256
C) 512
D) 1024
سؤال
The main() function is referred to as a(n) ____ function because it tells other functions the sequence in which they execute.

A) logical
B) auxiliary
C) driver
D) class
سؤال
One important requirement for designing a good function is giving it a name that conveys some idea of what the function does.
سؤال
The ____ is an output object that sends data it receives to the standard display device.

A) out
B) cin
C) print
D) cout
سؤال
Omitting the parentheses after main() is a common programming error.
سؤال
You cannot add and subtract character data and mix it with integer data to produce useful results.
سؤال
C++ is a case-sensitive language.
سؤال
C++ provides ten built-in integer data types.
سؤال
Modular programs are easier to develop, correct, and modify than programs constructed in some other manner.
سؤال
A(n) ____ is a word designed as a memory aid.

A) mnemonic
B) keyword
C) reserved word
D) identifier
سؤال
____ programs are easier to develop, correct, and modify than programs constructed in some other manner.

A) Modular
B) Handwritten
C) Sequential
D) Low-level
سؤال
Programs in C++ can have more than one main() function.
سؤال
Except for strings, double quotes, identifiers, and keywords, C++ ignores all white space.
سؤال
Although declaration statements can be placed anywhere in a function, typically they re grouped together and placed after the function s opening brace.
سؤال
A ____ contains both data and functions appropriate for manipulating the data.

A) segment
B) block
C) class
D) function
سؤال
A(n) ____ is simply a name the programmer assigns to refer to computer storage locations.

A) constant
B) variable
C) expression
D) identifier
سؤال
To determine the address of a variable, we can use C++ s address operator, ____, which means the address of.

A) *
B) =
C) &
D) !
سؤال
A common programming error consists of forgetting to separate data streams sent to cout with the insertion symbol, ____.

A) <
B) >
C) >>
D) <<
سؤال
In a function header, the ____________________ before the function name defines the type of value the function returns when it has completed operating.
سؤال
In C++, a module can be a class or a(n) ____________________.
سؤال
In an object-oriented language, such as C++, a(n) ____________________ encapsulates both data and sets of operations.
سؤال
The newline escape sequence is ____.

A) \l
B) \r
C) \n
D) \t
سؤال
____ are explanatory remarks made in a program.

A) Comments
B) Strings
C) Escape sequences
D) Classes
سؤال
A(n) ____ is an item used to change how the output stream of characters is displayed.

A) manipulator
B) escape sequence
C) string
D) char object
سؤال
____ in C++ are any combination of letters, numbers, and special characters enclosed in quotation marks.

A) Arrays
B) Strings
C) Enums
D) Objects
سؤال
A(n) ____ is an acceptable value for a data type.

A) primitive value
B) literal
C) built-in value
D) class value
سؤال
A(n) ____ number, more commonly known as a real number, can be the number zero or any positive or negative number that contains a decimal point.

A) boolean
B) integer
C) long int
D) floating-point
سؤال
The three most important and common integer types used in most applications are int , char , and ____.

A) long int
B) unsigned char
C) bool
D) long
سؤال
Each ____________________ inside the function body must end with a semicolon (;).
سؤال
The C++ operator ____ provides the number of bytes used to store values for any data type named in the operator s parentheses.

A) size()
B) sizeof()
C) length()
D) lengthof()
سؤال
When a declaration statement is used to store a value into a variable, the variable is said to be ____.

A) initialized
B) deleted
C) reserved
D) used
سؤال
A program consists of subprograms, called ____________________, that are designed and developed to perform a specific task.
سؤال
A ____ begins with two slashes ( // ) and continues to the end of the line.

A) program comment
B) function comment
C) block comment
D) line comment
سؤال
A(n) ____ data value is considered a complete entity and can t be decomposed into a smaller data type supported by the language.

A) composed
B) atomic
C) complex
D) real
سؤال
The value stored in the variable is referred to as the variable s ____.

A) address
B) location
C) data
D) contents
سؤال
A(n) ____________________ statement names a variable and specifies the data type that can be stored in it.
سؤال
A(n) ____________________ data type allows negative values to be stored as well as zero and positive values.
سؤال
The ____________________ data type is used to store single characters.
سؤال
Variables used to hold single-precision values are declared by using the keyword ____________________.
سؤال
In C++, a(n) ____________________ is any combination of operators and operands that can be evaluated to yield a value.
سؤال
A(n) ____________________ is defined as a set of values and a set of operations that can be applied to these values.
سؤال
The output object that sends data it receives to the standard display device, or console, is called ____________________.
سؤال
The ____________________ and ostream classes provide the data declarations and methods used for data input and output, respectively.
سؤال
In C++, a(n) ____________________ character changes the normal interpretation of the character following it and alters its meaning.
سؤال
Every variable has three major items associated with it: its data type, the value stored in it, and its ____________________.
سؤال
Forgetting to enclose a string sent to ____________________ with quotation marks is a common programming error.
سؤال
C++ supports two types of comments: line and ____________________.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/52
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 2: Problem Solving Using C++
1
Programs with a structure consisting of interrelated segments, called ____ , are arranged in a logical, easily understandable order to form an integrated and complete unit.

A) blocks
B) modules
C) units
D) procedures
B
2
Preprocessor commands end with a semicolon.
False
3
Data transmitted to a function at runtime is referred to as the ____ of the function.

A) return value
B) arguments
C) body
D) structure
B
4
Preprocessor commands begin with a ____ sign.

A) #
B) !
C) //
D) */
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
5
A(n) ____ is a word the language sets aside for a special purpose and can be used only in a specified manner.

A) codeword
B) keyword
C) identifier
D) classname
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
6
The maximum number of characters in a function name is ____.

A) 128
B) 256
C) 512
D) 1024
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
7
The main() function is referred to as a(n) ____ function because it tells other functions the sequence in which they execute.

A) logical
B) auxiliary
C) driver
D) class
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
8
One important requirement for designing a good function is giving it a name that conveys some idea of what the function does.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
9
The ____ is an output object that sends data it receives to the standard display device.

A) out
B) cin
C) print
D) cout
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
10
Omitting the parentheses after main() is a common programming error.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
11
You cannot add and subtract character data and mix it with integer data to produce useful results.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
12
C++ is a case-sensitive language.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
13
C++ provides ten built-in integer data types.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
14
Modular programs are easier to develop, correct, and modify than programs constructed in some other manner.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
15
A(n) ____ is a word designed as a memory aid.

A) mnemonic
B) keyword
C) reserved word
D) identifier
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
16
____ programs are easier to develop, correct, and modify than programs constructed in some other manner.

A) Modular
B) Handwritten
C) Sequential
D) Low-level
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
17
Programs in C++ can have more than one main() function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
18
Except for strings, double quotes, identifiers, and keywords, C++ ignores all white space.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
19
Although declaration statements can be placed anywhere in a function, typically they re grouped together and placed after the function s opening brace.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
20
A ____ contains both data and functions appropriate for manipulating the data.

A) segment
B) block
C) class
D) function
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
21
A(n) ____ is simply a name the programmer assigns to refer to computer storage locations.

A) constant
B) variable
C) expression
D) identifier
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
22
To determine the address of a variable, we can use C++ s address operator, ____, which means the address of.

A) *
B) =
C) &
D) !
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
23
A common programming error consists of forgetting to separate data streams sent to cout with the insertion symbol, ____.

A) <
B) >
C) >>
D) <<
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
24
In a function header, the ____________________ before the function name defines the type of value the function returns when it has completed operating.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
25
In C++, a module can be a class or a(n) ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
26
In an object-oriented language, such as C++, a(n) ____________________ encapsulates both data and sets of operations.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
27
The newline escape sequence is ____.

A) \l
B) \r
C) \n
D) \t
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
28
____ are explanatory remarks made in a program.

A) Comments
B) Strings
C) Escape sequences
D) Classes
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
29
A(n) ____ is an item used to change how the output stream of characters is displayed.

A) manipulator
B) escape sequence
C) string
D) char object
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
30
____ in C++ are any combination of letters, numbers, and special characters enclosed in quotation marks.

A) Arrays
B) Strings
C) Enums
D) Objects
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
31
A(n) ____ is an acceptable value for a data type.

A) primitive value
B) literal
C) built-in value
D) class value
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
32
A(n) ____ number, more commonly known as a real number, can be the number zero or any positive or negative number that contains a decimal point.

A) boolean
B) integer
C) long int
D) floating-point
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
33
The three most important and common integer types used in most applications are int , char , and ____.

A) long int
B) unsigned char
C) bool
D) long
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
34
Each ____________________ inside the function body must end with a semicolon (;).
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
35
The C++ operator ____ provides the number of bytes used to store values for any data type named in the operator s parentheses.

A) size()
B) sizeof()
C) length()
D) lengthof()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
36
When a declaration statement is used to store a value into a variable, the variable is said to be ____.

A) initialized
B) deleted
C) reserved
D) used
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
37
A program consists of subprograms, called ____________________, that are designed and developed to perform a specific task.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
38
A ____ begins with two slashes ( // ) and continues to the end of the line.

A) program comment
B) function comment
C) block comment
D) line comment
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
39
A(n) ____ data value is considered a complete entity and can t be decomposed into a smaller data type supported by the language.

A) composed
B) atomic
C) complex
D) real
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
40
The value stored in the variable is referred to as the variable s ____.

A) address
B) location
C) data
D) contents
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
41
A(n) ____________________ statement names a variable and specifies the data type that can be stored in it.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
42
A(n) ____________________ data type allows negative values to be stored as well as zero and positive values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
43
The ____________________ data type is used to store single characters.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
44
Variables used to hold single-precision values are declared by using the keyword ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
45
In C++, a(n) ____________________ is any combination of operators and operands that can be evaluated to yield a value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
46
A(n) ____________________ is defined as a set of values and a set of operations that can be applied to these values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
47
The output object that sends data it receives to the standard display device, or console, is called ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
48
The ____________________ and ostream classes provide the data declarations and methods used for data input and output, respectively.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
49
In C++, a(n) ____________________ character changes the normal interpretation of the character following it and alters its meaning.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
50
Every variable has three major items associated with it: its data type, the value stored in it, and its ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
51
Forgetting to enclose a string sent to ____________________ with quotation marks is a common programming error.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
52
C++ supports two types of comments: line and ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 52 في هذه المجموعة.