Deck 9: Control I - Expressions and Statements

ملء الشاشة (f)
exit full mode
سؤال
Bracketing keywords are used in the if statement to remove ambiguity.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Syntactic sugar is a language construct that is completely expressible in terms of other constructs.
سؤال
An expression,in its pure mathematical form,produces side effects.
سؤال
In normal order evaluation,each operation begins its evaluation before its operands are evaluated.
سؤال
If-expressions never have all of their subexpressions evaluated.
سؤال
Delayed evaluation is sometimes called strict evaluation.
سؤال
To exit a loop completely,the continue statement is used.
سؤال
Lisp requires all expressions to be fully parenthesized.
سؤال
A language has referential transparency when its expressions produce no side effects.
سؤال
If-operators are a special case of operators that delay evaluating their operands.
سؤال
All languages restrict expressions from producing side effects.
سؤال
Alan Turing introduced the guarded if statement.
سؤال
Operators can be written in infix,postfix,or prefix notation.
سؤال
If-then-else is an example of a binary operator.
سؤال
In the absence of side effects,normal order evaluation does not change the semantics of a program.
سؤال
The do statement ensures that the code of a loop is executed at least once.
سؤال
In a case statement,no two listed cases may have the same value after conversion.
سؤال
Functions are written in prefix form.
سؤال
A unary operator can take one or more operands.
سؤال
Most languages use a mix-fix form that distributes the syntax of an if-then-else operator throughout the expression.
سؤال
Sequence operators are used to ____.

A) define a set of variables to declare
B) eliminate side effects
C) allow several expressions to be combined into a single expression and evaluated sequentially
D) specify the execution order of code blocks
سؤال
____ code is code for a function body that is inserted directly at the point where the function would be called.

A) Substitution
B) Control
C) Inline
D) Parameterized
سؤال
A general form for a loop construct is given by Dijkstra's structure called the ____.

A) for loop
B) guarded if
C) guarded do
D) while loop
سؤال
The advantage of postfix and prefix forms for expressions is that ____.

A) they do not require parentheses to express the order in which operators are applied
B) they follow strict rules of operator precedence
C) they follow strict rules that define associativity of operators
D) they do not allow unary operators
سؤال
The termination model resumes control at the exact point an exception is first raised after it is handled.
سؤال
Exception handling is an attempt to imitate in a programming language the features of a hardware interrupt or error trap.
سؤال
Arguments are specified for use with ____.

A) functions
B) unary operators
C) expressions
D) binary operators
سؤال
Evaluating all operands before applying operators is called ____ evaluation.

A) normal order
B) applicative order
C) delayed
D) short-circuit
سؤال
A sentinel-based loop is often used in situations where a series of input values must be processed.
سؤال
Ada uses a(n)____ for its if-statements.

A) enclosing keyword
B) bracketing keyword
C) closest nested first disambiguation
D) dynamic disambiguation rules
سؤال
In a function,the operands are viewed as ____.

A) operators
B) arguments
C) local variables
D) global variables
سؤال
A(n)____ is executed for its side effects and returns no value.

A) expression
B) statement
C) function
D) method
سؤال
Synchronous errors occur in direct reaction to program execution.
سؤال
____ statements transfer control to and from sequences of statements.

A) Transfer
B) Relocation
C) Block
D) Control
سؤال
____ states that any two expressions in a program that have the same value may be substituted for each other anywhere in the program.

A) Referential transparency
B) Normal order evaluation
C) Delayed evaluation
D) Mix-fix form
سؤال
In the guarded if statement,the ____ are the Boolean expressions.

A) guards
B) gatekeepers
C) testers
D) predictors
سؤال
Exception handlers throw exceptions.
سؤال
The most closely nested rule is used to disambiguate ____.

A) nonlocal variable references
B) parameter references
C) if statements
D) function calls
سؤال
____ evaluation stops once the truth value of a Boolean expression is known.

A) Predictive
B) Short-circuit
C) Optimized
D) Applicative order
سؤال
An ambiguity in which it cannot be determined which if statement that should be associated with a single else statement is called the ____ problem.

A) dangling-else
B) ambiguous-else
C) nested-else
D) loose-else
سؤال
____ errors can occur at any moment,not necessarily in response to program code execution.

A) Asynchronous
B) Synchronous
C) Unpredictable
D) Unhandled
سؤال
If an exception is thrown and no handler is found in the block,control is passed to the next enclosing block in a process that is called ____ the exception.

A) transferring
B) redirecting
C) propagating
D) throwing
سؤال
In C++,exception handlers are associated with ____ blocks.

A) catch-release
B) throw-catch
C) try-catch
D) retry-handle
سؤال
If a program crashes,it fails the ____ test.

A) efficiency
B) structured organization
C) graceful exit
D) robustness
سؤال
When an error is thrown,a(n)____ is executed to recover normal execution.

A) recoverer
B) crash-prevention statement
C) exception handler
D) explicit control statement
سؤال
If control resumes at the point where the exception was first raised,the ____ model is being used.

A) resumption
B) redemption
C) termination
D) recovery
سؤال
Stack unwinding occurs when an exception is thrown and control is ____.

A) unable to resume
B) exited back in search of a handler
C) placed elsewhere on the stack
D) moved off the stack and onto the heap
سؤال
In C,the ____ statement skips the remainder of the loop body and resumes execution with the next evaluation of the control expression.

A) break
B) skip
C) update
D) continue
سؤال
The for-loop construct provides for a(n)____ expression,a test expression and an update expression.

A) initializer
B) prefix
C) functional
D) inferential
سؤال
____ are an example of implicit control mechanisms.

A) For-loops
B) Do-Loops
C) Exception handlers
D) Goto statements
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 9: Control I - Expressions and Statements
1
Bracketing keywords are used in the if statement to remove ambiguity.
True
2
Syntactic sugar is a language construct that is completely expressible in terms of other constructs.
True
3
An expression,in its pure mathematical form,produces side effects.
False
4
In normal order evaluation,each operation begins its evaluation before its operands are evaluated.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
If-expressions never have all of their subexpressions evaluated.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
Delayed evaluation is sometimes called strict evaluation.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
To exit a loop completely,the continue statement is used.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
Lisp requires all expressions to be fully parenthesized.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
A language has referential transparency when its expressions produce no side effects.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
If-operators are a special case of operators that delay evaluating their operands.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
All languages restrict expressions from producing side effects.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
Alan Turing introduced the guarded if statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
Operators can be written in infix,postfix,or prefix notation.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
If-then-else is an example of a binary operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
In the absence of side effects,normal order evaluation does not change the semantics of a program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
The do statement ensures that the code of a loop is executed at least once.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
In a case statement,no two listed cases may have the same value after conversion.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
Functions are written in prefix form.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
A unary operator can take one or more operands.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
Most languages use a mix-fix form that distributes the syntax of an if-then-else operator throughout the expression.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
Sequence operators are used to ____.

A) define a set of variables to declare
B) eliminate side effects
C) allow several expressions to be combined into a single expression and evaluated sequentially
D) specify the execution order of code blocks
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
____ code is code for a function body that is inserted directly at the point where the function would be called.

A) Substitution
B) Control
C) Inline
D) Parameterized
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
A general form for a loop construct is given by Dijkstra's structure called the ____.

A) for loop
B) guarded if
C) guarded do
D) while loop
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
The advantage of postfix and prefix forms for expressions is that ____.

A) they do not require parentheses to express the order in which operators are applied
B) they follow strict rules of operator precedence
C) they follow strict rules that define associativity of operators
D) they do not allow unary operators
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
The termination model resumes control at the exact point an exception is first raised after it is handled.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
Exception handling is an attempt to imitate in a programming language the features of a hardware interrupt or error trap.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
Arguments are specified for use with ____.

A) functions
B) unary operators
C) expressions
D) binary operators
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
Evaluating all operands before applying operators is called ____ evaluation.

A) normal order
B) applicative order
C) delayed
D) short-circuit
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
A sentinel-based loop is often used in situations where a series of input values must be processed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
Ada uses a(n)____ for its if-statements.

A) enclosing keyword
B) bracketing keyword
C) closest nested first disambiguation
D) dynamic disambiguation rules
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
In a function,the operands are viewed as ____.

A) operators
B) arguments
C) local variables
D) global variables
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
A(n)____ is executed for its side effects and returns no value.

A) expression
B) statement
C) function
D) method
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
Synchronous errors occur in direct reaction to program execution.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
____ statements transfer control to and from sequences of statements.

A) Transfer
B) Relocation
C) Block
D) Control
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
____ states that any two expressions in a program that have the same value may be substituted for each other anywhere in the program.

A) Referential transparency
B) Normal order evaluation
C) Delayed evaluation
D) Mix-fix form
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
In the guarded if statement,the ____ are the Boolean expressions.

A) guards
B) gatekeepers
C) testers
D) predictors
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
Exception handlers throw exceptions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
The most closely nested rule is used to disambiguate ____.

A) nonlocal variable references
B) parameter references
C) if statements
D) function calls
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
____ evaluation stops once the truth value of a Boolean expression is known.

A) Predictive
B) Short-circuit
C) Optimized
D) Applicative order
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
An ambiguity in which it cannot be determined which if statement that should be associated with a single else statement is called the ____ problem.

A) dangling-else
B) ambiguous-else
C) nested-else
D) loose-else
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
____ errors can occur at any moment,not necessarily in response to program code execution.

A) Asynchronous
B) Synchronous
C) Unpredictable
D) Unhandled
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
If an exception is thrown and no handler is found in the block,control is passed to the next enclosing block in a process that is called ____ the exception.

A) transferring
B) redirecting
C) propagating
D) throwing
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
In C++,exception handlers are associated with ____ blocks.

A) catch-release
B) throw-catch
C) try-catch
D) retry-handle
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
If a program crashes,it fails the ____ test.

A) efficiency
B) structured organization
C) graceful exit
D) robustness
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
When an error is thrown,a(n)____ is executed to recover normal execution.

A) recoverer
B) crash-prevention statement
C) exception handler
D) explicit control statement
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
If control resumes at the point where the exception was first raised,the ____ model is being used.

A) resumption
B) redemption
C) termination
D) recovery
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
Stack unwinding occurs when an exception is thrown and control is ____.

A) unable to resume
B) exited back in search of a handler
C) placed elsewhere on the stack
D) moved off the stack and onto the heap
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
In C,the ____ statement skips the remainder of the loop body and resumes execution with the next evaluation of the control expression.

A) break
B) skip
C) update
D) continue
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
The for-loop construct provides for a(n)____ expression,a test expression and an update expression.

A) initializer
B) prefix
C) functional
D) inferential
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
____ are an example of implicit control mechanisms.

A) For-loops
B) Do-Loops
C) Exception handlers
D) Goto statements
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.