1. (TCO 1) Microsoft Visual C++ is an example of a(n) _____. (Points : 4)
C++ programming language
debugger
compiler
IDE
Question 2.2. (TCO 2) Which characters make up the stream insertion operator? (Points : 4)
:)
::
<<
//
Question 3.3. (TCO 2) Which of the following statements is not a C++ syntax rule? (Points : 4)
C++ is not case sensitive.
Blocks of code are defined by curly braces.
Statements must end with a semicolon.
Every C++ program must have a function named "main."
Question 4.4. (TCO 2) To assign a value 1 to variable x, you write _____. (Points : 4)
x++;
1 = x;
x = 1;
x == 1;
Question 5.5. (TCO 3) What is the value of x after the following statement? float x; x = 2 / 5 + (3 + 1)/ 5.0 ; (Points : 4)
0
1.2
1.0
0.8
Question 6.6. (TCO 4) Which of the following is not included in pseudocode program? (Points : 4)
Program control structures
Input/output
Declarations
Program algorithms
Question 7.7. (TCO 4) What is the decision symbol in a flow chart? (Points : 4)
Square
Rectangle
Circle
Diamond
Question 8.8. (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 : 4)
colon
semicolon
curly bracket
parenthesis
Question 9.9. (TCO 5) In a count-controlled loop, the counter performs which of the following actions? (Points : 4)
Counter initialization
Counter testing
Counter adjustment
All of the above
Question 10.10. (TCO 5) When should a programmer select a for loop for his or her program? (Points : 4)
When the programmer knows the exact number of times the loop will be executed
When the programmer knows the loop must be executed at least once
When he or she is not sure how many times the loop will be executed
There is no reason to select a for loop. Any loop can be used at any time.
Question 11.11. (TCO 5) The while loop is what type of loop? (Points : 4)
Posttest loop
Pretest loop
Infinite loop
None of the above
Question 12.12. (TCO 5) A loop that is inside another loop is called _____. (Points : 4)
an infinite loop
a pretest loop
a posttest loop
a nested loop
Question 13.13. (TCO 6) Which two key sequences are used to start debugging and stop debugging? (Points : 4)
Shift-F5 for start debugging and F5 for stop debugging
F5 for start debugging and Shift-F5 for stop debugging
F10 for start debugging and F11 for stop debugging
F11 for start debugging and F10 for stop debugging
Question 14.14. (TCO 7) A statement at the top of a program that includes a function header, excludes function body, and is terminated by a semicolon is called a _____. (Points : 4)
function instantiation
function definition
function prototype
function overloading
Question 15.15. (TCO 8) A value that is part of a function header is called a(n) _____. (Points : 4)
argument
parameter
initializer
reference
1. (TCO 7) When is a return statement required inside a function? (Points : 4)
Every function must include at least one return statement.
When you use a switch statement
When a return data type (other than void) is included in the function prototype
Inside an if-else statement
Question 2.2. (TCO 8) Which function prototype indicates that the parameter is passed by reference? (Points : 4)
int myFunction( double &)
int myFunction(double)
int myFunction(double *)
int myFunction(&)
Question 3.3. (TCO 8) The process of passing a variable's value to a function is called _____. (Points : 4)
passing by reference
passing by value
localization
globalization
Question 4.4. (TCO 9) Menu-driven programs should be broken down into _____ that perform individual tasks. (Points : 4)
loops
functions
tasks
modules
Question 5.5. (TCO 9) When the user makes a selection from the main menu in a multiple-level menu, a _____ might be displayed next. (Points : 4)
menu
main menu
grand menu
submenu
Question 6.6. (TCO 9) What type of programming is centered on the procedures or actions that take place in a program? (Points : 4)
0 коммент.:
Отправить комментарий