1. Suppose a, b, and c are int variables and a=5 and b=6. What is the value of a after this statement executes: a = (a + 4) % b++;

2. Which statement outputs a double value in a field of seven characters with three digits after the decimal point?

3. For readability, all statements inside a loop body should be

What is the value of beta after the following code executes if the input is 3?

int beta;
cin >> beta;
case 3:
beta += 3;
case 1:
case 4:
beta += 4;
case 5:
beta += 5;

How many times does the following loop body execute?

int count = 52;
cout << count << endl;

6. Statements in your code which do not adhere to the syntax rules of the language lead to

7. When a program is stopped at a breakpoint, you can use the debugger to

8. White box testing

9. Which of the following statements about testing are true?
Black box test cases can be written as soon as the problem statement and program requirements are specified.
White box testing is typically done by the programmer as code is being developed.
Both black box and white box testing are commonly done to fully test a program.
All of the above

10. When a variable is passed by reference as a function argument,
its value is copied
it can have its value both read and modified by the function
it is protected from being modified by the function
All of the above

11. When should you use reference variables as function parameters?
When the value of the actual parameter needs to be changed
When you want to return one value from the function
When you want the function to process a copy of the data
None of the above

12. (TCO 6) Arrays can be passed to functions by _______. (Points : 5)
either reference or value
All of the above


Get this answer with Chegg Study