Deck 6: Using C++ Functions
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
Match between columns
سؤال
Match between columns
سؤال
Match between columns
سؤال
Match between columns
سؤال
Match between columns
سؤال
Match between columns
سؤال
Match between columns
سؤال
سؤال
Match between columns
سؤال
سؤال
Match between columns
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/51
العب
ملء الشاشة (f)
Deck 6: Using C++ Functions
1
When you declare a pointer, you insert a(n) ____ in front of the variable name.
A) ampersand
B) asterisk
C) pipe
D) pound sign
A) ampersand
B) asterisk
C) pipe
D) pound sign
B
2
The ____ of a variable defines where it can be accessed in a program.
A) abstraction
B) scope
C) encapsulation
D) lifetime
A) abstraction
B) scope
C) encapsulation
D) lifetime
B
3
The ____ of a variable is the time during which it is defined-from declaration to destruction.
A) scope
B) duration
C) encapsulation
D) lifetime
A) scope
B) duration
C) encapsulation
D) lifetime
D
4
The statement return letter; can be alternatively written as ____. Both statements work identically.
A) return(letter);
B) return:letter;
C) return{letter};
D) return[letter];
A) return(letter);
B) return:letter;
C) return{letter};
D) return[letter];
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
5
A function declaration is also called a function ____.
A) statement
B) scope
C) call
D) prototype
A) statement
B) scope
C) call
D) prototype
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
6
The statement that executes a function is the function ____.
A) statement
B) alias
C) call
D) expression
A) statement
B) alias
C) call
D) expression
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
7
____ variables are those that are known to all functions in a program.
A) Global
B) Local
C) General
D) Modular
A) Global
B) Local
C) General
D) Modular
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
8
____ variables are known only in a limited scope.
A) Global
B) Local
C) Limited
D) Modular
A) Global
B) Local
C) Limited
D) Modular
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
9
Statements that can never execute are called dead code.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
10
____ is also called data hiding.
A) Overloading
B) Overriding
C) Abstraction
D) Encapsulation
A) Overloading
B) Overriding
C) Abstraction
D) Encapsulation
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
11
A(n) ____ is an alternative name.
A) alias
B) prototype
C) call
D) parameter
A) alias
B) prototype
C) call
D) parameter
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
12
Encapsulation simplifies your concept of the process or object, allowing you to ignore nonessential details.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
13
Any variable listed in a function header is known as a(n) ____ parameter.
A) declaration
B) actual
C) formal
D) prototype
A) declaration
B) actual
C) formal
D) prototype
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
14
An array name is a constant pointer, meaning you cannot alter its contents.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
15
A(n) ____ is the expression used within the parentheses when you call a function.
A) value
B) argument
C) input
D) prototype
A) value
B) argument
C) input
D) prototype
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
16
Most compilers will issue an error message if a function receives a variable as a constant but then passes the variable to another function that does not receive the variable as a constant.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
17
Maintenance programming involves making modifications and improvements to existing systems.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
18
A(n) ____ value is a value sent from a subfunction to the function that called it.
A) return
B) output
C) subroutine
D) function
A) return
B) output
C) subroutine
D) function
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
19
An argument used in a function call is known as a(n) ____ parameter.
A) execution
B) actual
C) formal
D) call
A) execution
B) actual
C) formal
D) call
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
20
The scope resolution operator (____) allows you to refer to a global variable when a local one has taken precedence.
A) *
B) &
C) ::
D) !
A) *
B) &
C) ::
D) !
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
21
What are some errors typically made by beginning programmers when they declare, call, and write functions?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
22
____________________ helps readers of program code understand the purpose of the code.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
23
When is a variable in scope or out of scope?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
24
When you want to use a value stored in a pointer, you must use the ____ to dereference the pointer, or use the value to which it points.
A) ampersand
B) asterisk
C) pipe
D) bang
A) ampersand
B) asterisk
C) pipe
D) bang
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
25
What are the disadvantages of using global variables instead of local variables?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
26
To "____________________" means to take precedence over.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
27
Where in your program should you place include statements?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
28
Describe two benefits of using structures with functions (either as arguments or a return type)?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
29
The principle of ____ is a programming principle that says you should give a process only the authority it needs to accomplish its job.
A) least privilege
B) abstraction
C) encapsulation
D) overloading
A) least privilege
B) abstraction
C) encapsulation
D) overloading
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
30
An array name is a(n) ____________________; it holds a memory address.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
31
The type of object or variable that a function returns to the function that calls it is the function's ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
32
When you use a(n) ____ function, a copy of the function statements is placed directly into the compiled calling program.
A) inline
B) local
C) global
D) prototype
A) inline
B) local
C) global
D) prototype
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
33
____ a function name involves creating multiple functions with the same name but different parameter lists.
A) Encapsulating
B) Prototyping
C) Overriding
D) Overloading
A) Encapsulating
B) Prototyping
C) Overriding
D) Overloading
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
34
A(n) ____ parameter to a function is one for which an automatic value is supplied if you do not explicitly use one.
A) implicit
B) default
C) local
D) global
A) implicit
B) default
C) local
D) global
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
35
In different programming languages, the counterpart to a function is known as a subroutine, procedure, or ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
36
Write an example of code that illustrates how to use the scope resolution operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
37
What are the benefits that you gain when you write functions that you include in other programs?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
38
A(n) ____________________ copy of an object is one in which the value of each field or member of the object is copied to its counterpart in another object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
39
A variable that acts as an alias for another variable is called a ____ variable.
A) least privilege
B) copy
C) reference
D) local
A) least privilege
B) copy
C) reference
D) local
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
40
List some advantages and disadvantages of passing an address of a variable to a function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
41
Match between columns
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
42
Match between columns
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
43
Match between columns
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
44
Match between columns
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
45
Match between columns
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
46
Match between columns
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
47
Match between columns
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
48
What is name mangling?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
49
Match between columns
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
50
When should you use an inline function?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
51
Match between columns
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck