) _____ is often used in the design of a program to describe the program processing Solution

) _____ is often used in the design of a program to describe the program processing Solution

1. (TCO 4) _____ is often used in the design of a program to describe the program processing. (Points : 3)
Pseudocode
Algorithm
Program control
Data flow
2. (TCO 4) Which of the following statement encompass the other three? (Points :
Decision statement
Repetition statement
Sequence statement
Control statement
3. (TCO 4) Programmers often write the if statement on two lines to visually separate the decision-making condition from its resulting action; however, only one _____ follows the entire statement. (Points : 3)
colon
semicolon
curly bracket
parenthesis
4. (TCO 4) Consider the following statement: A department store is giving a discount of 15% for all purchases over $100. Which of the following is the appropriate structure to use to program the statement? (Points : 3)
Decision
Loop
Repetition
Sequence
5. (TCO 4) What type of operator can be used to determine whether a specific relationship exists between two values? (Points : 3)
Relational
Mathematical
Logical
Boolean
6. (TCO 4) What is the “not equal” to symbol? (Points : 3)
!=
=&
+=
=!
7. (TCO 4) When an if statement is placed within the conditionally executed code of another if statement, this is known as _____. (Points : 3)
complexity
nesting
overloading
validation
8. (TCO 4) Consider the following segment of code:
if(apple == 5)
cout<<"You got \"five\" apples!"<<endl;
else
cout<<"You do not have five apples!\n";
cout<<"The end of the program is reached.";
What will be the output on screen if apple is 4? (Points : 3)
You got five apples!
The end of the program is reached.
You got five apples!
You do not have five apples!
You do not have five apples!
The end of the program is reached.
9. (TCO 4) What keywords are used to construct a switch statement? (Points : 3)
case, jump, break, default
switch, case, break, default
break, default, case, goto
switch, case, break, else
10. (TCO 6) How does the environment handle a breakpoint when the debugger is running a program? (Points : 3)
It stops the program at the line that has the breakpoint, but doesn't execute it.
It stops the program at the line of the breakpoint after it has executed it.
It runs past the line with the breakpoint, but echoes the values in the Trace window.
It shows the call stack in the memory window.
11. (TCO 4) Explain when a Switch statement may be more appropriate than an if/else statement and provide a code example. (Points : 5)
Powered by