Deck 5: Control Statements: Part 1

ملء الشاشة (f)
exit full mode
سؤال
Which statement is false

A) Unless directed otherwise, the computer executes C# statements one after the other in the order in which they are written.
B) Activity diagrams normally show the C# code that implements the activity.
C) Like pseudocode, activity diagrams help programmers develop and represent algorithms.
D) The arrows in the activity diagram represent transitions, which indicate the order in which the actions represented by the action states occur.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Which of the following is a double-selection control statement

A) do…while
B) for
C) if…else
D) if
سؤال
Control statements are helpful in building and manipulating objects.
سؤال
Pseudocode helps you conceptualize a program during the design process.
سؤال
Pseudocode must be written in an editor capable of understanding it and the language to which it pertains.
سؤال
What kind of language is pseudocode

A) a hybrid language of all .NET languages
B) an artificial language used to develop algorithms
C) a language used to translate from C++ to C#
D) None of the above.
سؤال
Which of the following is not an algorithm

A) a recipe
B) operating instructions
C) textbook index
D) shampoo instructions (lather, rinse, repeat)
سؤال
A transfer of control occurs when:

A) a program changes from input to output, or vice versa
B) a logic error occurs in a program
C) a statement other than the next one in the program executes
D) None of the above.
سؤال
Pseudocode is most comparable to which of the following languages

A) C#
B) C
C) Pascal
D) English
سؤال
The order of actions of an algorithm is irrelevant.
سؤال
The three types of selection structures are:

A) foreach, for and switch
B) if, for and switch
C) if, if/else and while
D) if, if/else and switch
سؤال
It is essential to have an understanding of a problem before writing a program to solve it.
سؤال
Programs can be written,compiled and executed with pseudocode.
سؤال
Pseudocode normally describes only executable statements.
سؤال
The lines in an activity diagram are a graphical representation of an algorithm.
سؤال
Which of the following is not a benefit of "goto-free programs"

A) easier to debug and modify
B) shorter
C) clearer
D) more likely to be bug free
سؤال
Program control is best defined as:

A) specifying the degree of control a program has over the computer it is executed on
B) specifying the line of code that is executing at a given time
C) specifying the order in which the statements are executed
D) None of the above.
سؤال
Sequential execution is when statements execute one after the other in the order in which they appear in the program.
سؤال
Which of the following is a type of control structure

A) declaration structure
B) repetition structure
C) flow structure
D) All of the above.
سؤال
What is an algorithm

A) the actions (and their order) that solve a particular problem
B) an English description of a problem to be solved
C) the process of converting between data types
D) None of the above.
سؤال
The sequence structure is built into C#.Unless directed otherwise,the computer ex
ecutes C# statements one after the other in the order in which they are written.
سؤال
The best way to use braces is to go back and insert them after all the code has been written.
سؤال
What is output by the following C# code segment
Int temp = 200;
If (temp > 90)
{
Console.WriteLine("This porridge is too hot.");
}
If (temp < 70)
{
Console.WriteLine("This porridge is too cold.");
}
If (temp == 80)
{
Console.WriteLine("This porridge is just right!");
}

A) This porridge is too hot.
B) This porridge is too cold.
C) This porridge is just right!
D) None of the above.
سؤال
A set of statements contained in a pair of braces can be placed anywhere in a program at which a single statement can be placed.
سؤال
A decision symbol in an activity diagram takes the shape of a ________.

A) diamond
B) rectangle
C) circle
D) question mark
سؤال
The first operand of the ternary operator is the condition.
سؤال
The conditional operator is of the highest precedence.
سؤال
Control structures cannot be placed inside other control structures.
سؤال
if is a _________ statement.

A) restricted
B) selection
C) repetition
D) unrestricted
سؤال
What capability does if…else provide that if does not

A) the ability to execute actions when the condition is true and false
B) the ability to nest structures
C) the ability to stack structures
D) None of the above.
سؤال
is C#'s only ternary operator.

A) *
B)
C) =
D) //
سؤال
C#'s type is capable of holding the value true or false.

A) bool
B) int
C) if
D) logic
سؤال
Syntax errors cause a program to fail and terminate prematurely.
سؤال
The if statement is a repetition statement.
سؤال
The body of an if statement executes only if the condition is evaluated as true.
سؤال
Which of the following statements about the conditional operator (
:)is false

A) The conditional operator is a ternary operator, meaning that it takes three operands.
B) The first operand is a bool expression.
C) The second operand is the result value if the condition evaluates to false.
D) The second operand is the result value if the condition evaluates to true.
سؤال
A selection statement chooses among alternative courses of action.
سؤال
Which of the following is not included in an activity diagram for a control statement

A) transition arrows
B) attribute
C) action state
D) decision symbols
سؤال
The C# compiler always associates an else with the previous if,unless braces indicate otherwise.
سؤال
During the 1960s,it became clear that the indiscriminate use of transfers of control was the root of much difficulty experienced by software development groups.
سؤال
Counter-controlled repetition is also known as:

A) definite repetition
B) indefinite repetition
C) multiple-repetition structure
D) double-repetition structure
سؤال
It is known as when the number of repetitions is known before a loop begins executing.

A) definite repetition
B) infinite repetition
C) total repetition
D) None of the above.
سؤال
What is output by the following C# code segment
Int temp = 180;
While (temp != 80)
{
If (temp > 90)
{
Console.Write("This porridge is too hot! ");
// cool down
Temp = temp - (temp > 150
100 : 20);
}
Else
{
If (temp < 70)
{
Console.Write("This porridge is too cold! ");
// warm up
Temp = temp + (temp < 50
30 : 20);
}
}
}
If (temp == 80)
{
Console.WriteLine("This porridge is just right!");
}

A) This porridge is too cold! This porridge is just right!
B) This porridge is too hot! This porridge is just right!
C) This porridge is just right!
D) None of the above.
سؤال
How many times is the body of the loop below executed
Int counter = 1;
While (counter > 20)
{
// body of loop
Counter = counter + 1;
}

A) 19
B) 20
C) 21
D) 0
سؤال
Variables that store totals should generally be initialized to zero before being used in a program.
سؤال
Repetition in which the number of iterations is unknown before the loop begins executing is called ________.

A) indefinite repetition
B) controlled repetition
C) top-down repetition
D) None of the above.
سؤال
A can be used in repetition structures to indicate the end of data entry.

A) counter
B) boolean
C) sentinel value
D) None of the above.
سؤال
Which of the following is not necessarily an error (either a syntax error or a logic error)

A) Neglecting to include an action in the body of a while statement that will eventually cause the condition to become false.
B) Spelling a key word (such as while or if) with a capitalized first letter.
C) Using a condition for a while statement that is initially false.
D) An infinite loop.
سؤال
The while statement is an example of a sequence structure.
سؤال
Which of the following terms is not used to refer to a sentinel value that breaks out of a while statement

A) signal value
B) break value
C) dummy value
D) flag value
سؤال
Floating-point numbers contain a fractional part and can be represented by the data type.

A) frac
B) real
C) double
D) None of the above.
سؤال
Which of the following is not one of the three phases that a program is typically split into using pseudocode

A) termination phase
B) initialization phase
C) processing phase
D) action phase
سؤال
A variable used only within a repetition statement should be declared within the statement.
سؤال
A while statement allows you to specify that an action should repeat while:

A) a specific condition remains false
B) a specific condition remains true
C) a specific condition remains either true or false
D) None of the above.
سؤال
A while statement can cause logic errors where the body never stops exe
Cuting.This is known as a(n)      

A) syntax error
B) fatal error
C) infinite loop
D) None of the above.
سؤال
Counter-controlled repetition is often called definite repetition because the number of repetitions is known before the loop begins executing.
سؤال
int division may yield a non-int result.
سؤال
Which of the following conditions would cause a while statement to stop executing

A) 3 < = 11
B) !(7 != 14)
C) 6 != 9
D) All of the above.
سؤال
A can be used in a repetition structure to control the number of times a set of statements will execute.

A) declaration
B) counter
C) controller
D) None of the above.
سؤال
In an activity diagram,the merge symbol has the same shape as what other symbol

A) decision symbol
B) action symbol
C) transition arrows
D) initial state
سؤال
The cast operator is formed by enclosing a type name in braces.
سؤال
C# rounds fractional values when they're to be stored in an integer variable.
سؤال
Cast operators are used to perform implicit conversions between data types.
سؤال
When using top-down,stepwise refinement,only the last refinement is a com
plete specification of the algorithm.
سؤال
A flag value should not be a legitimate data entry value.
سؤال
Which of the following operators associates from left to right

A) ++
B)
C) %=
D) /
سؤال
Which of the following generates a syntax error

A) c *= 3;
B) c %= 2;
C) c /= 4;
D) None of the above.
سؤال
Many algorithms can be divided into an initialization phase,a processing phase and a termination phase.
سؤال
The sentinel value must be chosen so that it cannot be confused with an acceptable in
put value.
سؤال
Which of the following correctly represents the expression a = a + 3

A) 3a
B) a += 3
C) a + 3
D) None of the above.
سؤال
Which statement is true

A) A while statement cannot be nested inside another while statement.
B) An if statement cannot be nested inside another if statement.
C) A while statement cannot be nested inside an if statement.
D) None of the above.
سؤال
When you know how many times a loop will execute in advance,a ________loop should be used.

A) sentinel
B) infinite
C) counter-controlled
D) None of the above.
سؤال
Top-down,stepwise refinement helps lead to well-structured algorithms.
سؤال
Which of the following segments will call the method readData four times

A) int k; k = 1;
While (k < 4)
{
ReadData();
K = k + 1;
}
B) int i;
C) int i;
D) int i; i = 0;
While (i < 4)
{
ReadData();
I = i + 1;
}
سؤال
What is typically the most difficult part of solving a problem on a computer

A) deciding what problem needs to be solved
B) developing the algorithm for the solution
C) producing a C# program from the algorithm
D) None of the above.
سؤال
Local variables must be ________.

A) initialized when they are declared.
B) initialized before their values are used in an expression.
C) declared and initialized in two steps.
D) declared at the top of the method.
سؤال
Which statement is false

A) To ensure that the operands are of the same type, C# performs implicit conversion on selected operands.
B) Cast operators are unary operators.
C) Cast operators associate from right to left and are one level lower than the multiplicative operators.
D) Cast operators are formed by placing parentheses around the name of a type.
سؤال
In an expression containing values of the types int and double,the ________ values are ________ to ________ values for use in the expression.

A) int, promoted, double.
B) int, demoted, double.
C) double, promoted, int.
D) double, demoted, int.
سؤال
What does the expression x %= 10 do

A) Adds 10 to the value of x, and stores the result in x.
B) Divides x by 10 and stores the remainder in x.
C) Divides x by 10 and stores the integer result in x.
D) None of the above.
سؤال
Using top-down,stepwise refinement results in pseudocode that can be straightforwardly evolved into a C# program.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/94
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 5: Control Statements: Part 1
1
Which statement is false

A) Unless directed otherwise, the computer executes C# statements one after the other in the order in which they are written.
B) Activity diagrams normally show the C# code that implements the activity.
C) Like pseudocode, activity diagrams help programmers develop and represent algorithms.
D) The arrows in the activity diagram represent transitions, which indicate the order in which the actions represented by the action states occur.
B
2
Which of the following is a double-selection control statement

A) do…while
B) for
C) if…else
D) if
C
3
Control statements are helpful in building and manipulating objects.
True
4
Pseudocode helps you conceptualize a program during the design process.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
5
Pseudocode must be written in an editor capable of understanding it and the language to which it pertains.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
6
What kind of language is pseudocode

A) a hybrid language of all .NET languages
B) an artificial language used to develop algorithms
C) a language used to translate from C++ to C#
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
7
Which of the following is not an algorithm

A) a recipe
B) operating instructions
C) textbook index
D) shampoo instructions (lather, rinse, repeat)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
8
A transfer of control occurs when:

A) a program changes from input to output, or vice versa
B) a logic error occurs in a program
C) a statement other than the next one in the program executes
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
9
Pseudocode is most comparable to which of the following languages

A) C#
B) C
C) Pascal
D) English
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
10
The order of actions of an algorithm is irrelevant.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
11
The three types of selection structures are:

A) foreach, for and switch
B) if, for and switch
C) if, if/else and while
D) if, if/else and switch
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
12
It is essential to have an understanding of a problem before writing a program to solve it.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
13
Programs can be written,compiled and executed with pseudocode.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
14
Pseudocode normally describes only executable statements.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
15
The lines in an activity diagram are a graphical representation of an algorithm.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
16
Which of the following is not a benefit of "goto-free programs"

A) easier to debug and modify
B) shorter
C) clearer
D) more likely to be bug free
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
17
Program control is best defined as:

A) specifying the degree of control a program has over the computer it is executed on
B) specifying the line of code that is executing at a given time
C) specifying the order in which the statements are executed
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
18
Sequential execution is when statements execute one after the other in the order in which they appear in the program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
19
Which of the following is a type of control structure

A) declaration structure
B) repetition structure
C) flow structure
D) All of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
20
What is an algorithm

A) the actions (and their order) that solve a particular problem
B) an English description of a problem to be solved
C) the process of converting between data types
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
21
The sequence structure is built into C#.Unless directed otherwise,the computer ex
ecutes C# statements one after the other in the order in which they are written.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
22
The best way to use braces is to go back and insert them after all the code has been written.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
23
What is output by the following C# code segment
Int temp = 200;
If (temp > 90)
{
Console.WriteLine("This porridge is too hot.");
}
If (temp < 70)
{
Console.WriteLine("This porridge is too cold.");
}
If (temp == 80)
{
Console.WriteLine("This porridge is just right!");
}

A) This porridge is too hot.
B) This porridge is too cold.
C) This porridge is just right!
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
24
A set of statements contained in a pair of braces can be placed anywhere in a program at which a single statement can be placed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
25
A decision symbol in an activity diagram takes the shape of a ________.

A) diamond
B) rectangle
C) circle
D) question mark
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
26
The first operand of the ternary operator is the condition.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
27
The conditional operator is of the highest precedence.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
28
Control structures cannot be placed inside other control structures.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
29
if is a _________ statement.

A) restricted
B) selection
C) repetition
D) unrestricted
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
30
What capability does if…else provide that if does not

A) the ability to execute actions when the condition is true and false
B) the ability to nest structures
C) the ability to stack structures
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
31
is C#'s only ternary operator.

A) *
B)
C) =
D) //
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
32
C#'s type is capable of holding the value true or false.

A) bool
B) int
C) if
D) logic
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
33
Syntax errors cause a program to fail and terminate prematurely.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
34
The if statement is a repetition statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
35
The body of an if statement executes only if the condition is evaluated as true.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
36
Which of the following statements about the conditional operator (
:)is false

A) The conditional operator is a ternary operator, meaning that it takes three operands.
B) The first operand is a bool expression.
C) The second operand is the result value if the condition evaluates to false.
D) The second operand is the result value if the condition evaluates to true.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
37
A selection statement chooses among alternative courses of action.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
38
Which of the following is not included in an activity diagram for a control statement

A) transition arrows
B) attribute
C) action state
D) decision symbols
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
39
The C# compiler always associates an else with the previous if,unless braces indicate otherwise.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
40
During the 1960s,it became clear that the indiscriminate use of transfers of control was the root of much difficulty experienced by software development groups.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
41
Counter-controlled repetition is also known as:

A) definite repetition
B) indefinite repetition
C) multiple-repetition structure
D) double-repetition structure
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
42
It is known as when the number of repetitions is known before a loop begins executing.

A) definite repetition
B) infinite repetition
C) total repetition
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
43
What is output by the following C# code segment
Int temp = 180;
While (temp != 80)
{
If (temp > 90)
{
Console.Write("This porridge is too hot! ");
// cool down
Temp = temp - (temp > 150
100 : 20);
}
Else
{
If (temp < 70)
{
Console.Write("This porridge is too cold! ");
// warm up
Temp = temp + (temp < 50
30 : 20);
}
}
}
If (temp == 80)
{
Console.WriteLine("This porridge is just right!");
}

A) This porridge is too cold! This porridge is just right!
B) This porridge is too hot! This porridge is just right!
C) This porridge is just right!
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
44
How many times is the body of the loop below executed
Int counter = 1;
While (counter > 20)
{
// body of loop
Counter = counter + 1;
}

A) 19
B) 20
C) 21
D) 0
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
45
Variables that store totals should generally be initialized to zero before being used in a program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
46
Repetition in which the number of iterations is unknown before the loop begins executing is called ________.

A) indefinite repetition
B) controlled repetition
C) top-down repetition
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
47
A can be used in repetition structures to indicate the end of data entry.

A) counter
B) boolean
C) sentinel value
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
48
Which of the following is not necessarily an error (either a syntax error or a logic error)

A) Neglecting to include an action in the body of a while statement that will eventually cause the condition to become false.
B) Spelling a key word (such as while or if) with a capitalized first letter.
C) Using a condition for a while statement that is initially false.
D) An infinite loop.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
49
The while statement is an example of a sequence structure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
50
Which of the following terms is not used to refer to a sentinel value that breaks out of a while statement

A) signal value
B) break value
C) dummy value
D) flag value
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
51
Floating-point numbers contain a fractional part and can be represented by the data type.

A) frac
B) real
C) double
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
52
Which of the following is not one of the three phases that a program is typically split into using pseudocode

A) termination phase
B) initialization phase
C) processing phase
D) action phase
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
53
A variable used only within a repetition statement should be declared within the statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
54
A while statement allows you to specify that an action should repeat while:

A) a specific condition remains false
B) a specific condition remains true
C) a specific condition remains either true or false
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
55
A while statement can cause logic errors where the body never stops exe
Cuting.This is known as a(n)      

A) syntax error
B) fatal error
C) infinite loop
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
56
Counter-controlled repetition is often called definite repetition because the number of repetitions is known before the loop begins executing.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
57
int division may yield a non-int result.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
58
Which of the following conditions would cause a while statement to stop executing

A) 3 < = 11
B) !(7 != 14)
C) 6 != 9
D) All of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
59
A can be used in a repetition structure to control the number of times a set of statements will execute.

A) declaration
B) counter
C) controller
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
60
In an activity diagram,the merge symbol has the same shape as what other symbol

A) decision symbol
B) action symbol
C) transition arrows
D) initial state
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
61
The cast operator is formed by enclosing a type name in braces.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
62
C# rounds fractional values when they're to be stored in an integer variable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
63
Cast operators are used to perform implicit conversions between data types.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
64
When using top-down,stepwise refinement,only the last refinement is a com
plete specification of the algorithm.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
65
A flag value should not be a legitimate data entry value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
66
Which of the following operators associates from left to right

A) ++
B)
C) %=
D) /
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
67
Which of the following generates a syntax error

A) c *= 3;
B) c %= 2;
C) c /= 4;
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
68
Many algorithms can be divided into an initialization phase,a processing phase and a termination phase.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
69
The sentinel value must be chosen so that it cannot be confused with an acceptable in
put value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
70
Which of the following correctly represents the expression a = a + 3

A) 3a
B) a += 3
C) a + 3
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
71
Which statement is true

A) A while statement cannot be nested inside another while statement.
B) An if statement cannot be nested inside another if statement.
C) A while statement cannot be nested inside an if statement.
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
72
When you know how many times a loop will execute in advance,a ________loop should be used.

A) sentinel
B) infinite
C) counter-controlled
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
73
Top-down,stepwise refinement helps lead to well-structured algorithms.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
74
Which of the following segments will call the method readData four times

A) int k; k = 1;
While (k < 4)
{
ReadData();
K = k + 1;
}
B) int i;
C) int i;
D) int i; i = 0;
While (i < 4)
{
ReadData();
I = i + 1;
}
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
75
What is typically the most difficult part of solving a problem on a computer

A) deciding what problem needs to be solved
B) developing the algorithm for the solution
C) producing a C# program from the algorithm
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
76
Local variables must be ________.

A) initialized when they are declared.
B) initialized before their values are used in an expression.
C) declared and initialized in two steps.
D) declared at the top of the method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
77
Which statement is false

A) To ensure that the operands are of the same type, C# performs implicit conversion on selected operands.
B) Cast operators are unary operators.
C) Cast operators associate from right to left and are one level lower than the multiplicative operators.
D) Cast operators are formed by placing parentheses around the name of a type.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
78
In an expression containing values of the types int and double,the ________ values are ________ to ________ values for use in the expression.

A) int, promoted, double.
B) int, demoted, double.
C) double, promoted, int.
D) double, demoted, int.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
79
What does the expression x %= 10 do

A) Adds 10 to the value of x, and stores the result in x.
B) Divides x by 10 and stores the remainder in x.
C) Divides x by 10 and stores the integer result in x.
D) None of the above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
80
Using top-down,stepwise refinement results in pseudocode that can be straightforwardly evolved into a C# program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 94 في هذه المجموعة.