13. (TCO 6) Debugging is like being a(n) _____. (Points : 4) accountant
2. (TCO 2) What does the symbol << represent in C++ programming? (Points : 4)
3. (TCO 2) Which of the following statements about C++ syntax is true? (Points : 4)
Every executable statement must end with a comma.
A block is enclosed inside parentheses.
C++ is not case sensitive.
C++ is case sensitive.
5. (TCO 3) What is the value of x after the following statement?
x = 3.0 / 4.0 + (3 + 1)/ 5 ; (Points : 4)
8. (TCO 4) One-way if statements execute an action if the condition is _____. (Points : 4)
sent to the console
within a nested loop
|9. (TCO 5) A _____ repeats actions while some condition remains unchanged. (Points : 4)|
1. (TCO 7) Arguments and parameters must match in _____. (Points : 4) data type
numbers of parameters
the order of parameters
All of the above
|2. (TCO 8) Which function indicates that the parameter is passed by reference? (Points : 4)|
int myGoodness(double *)
int mySomething( double &)
|3. (TCO 8) What would be a valid argument for the following function?|
char myFunction(int &x) (Points : 4)
All of the above
5. (TCO 9) The items displayed in a menu are often preceded by _____. (Points : 4)
Any of the above
|6. (TCO 9) What type of programming encapsulates data and functions together in an object? (Points : 4)|
|7. (TCO 10) An error that results from a poorly planned solution would be called a _____. (Points : 4)|
|8. (TCO 11) Which of the following is false? (Points : 4)|
All elements of the array have the same data type.
All elements in an array have the same name.
All elements in an array have the same subscript.
The first element of the array has a subscript of zero.
|9. (TCO 11) Programmers often mistakenly reference the first element in an array with index1. What is this called? (Points : 4)|
14. (TCO 13) Sometimes, a project will need to save data inputted by the user so it can be used again. This data stored will later be accessed from a _____. (Points : 4)
2. (TCO 9) Explain which is more appropriate for writing a menu program: a switch case or if-else statements. Provide a snippet of code to support your position. (Points : 15)
(TCO 11) Explain how a linear search is conducted to find a particular data value in an array. Provide a C++ program segment to illustrate your answer. (Points : 15)
4. (TCO 7) Explain the difference between a function prototype and a function definition. Use a C++ program segment to illustrate your answer. (Points : 15)
5 (TCO 4) Explain when a switch statement may be more appropriate than an if/else statement and provide a code example. (Points : 15)
6 TCO 5) Using a loop, write a program that reads in exactly 10 integers and outputs the sum