Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Multiple Choice Identify the choice that best completes the statement or answers

ID: 3917857 • Letter: M

Question

Multiple Choice Identify the choice that best completes the statement or answers the question.  

11. ___ variables store whole numbers. a. Integer c. Floating point b. Numeric d. Character  
  
12. ____ is a programming language that supports object-oriented techniques. a. COBOL c. BASIC b. C++ d. FORTRAN  

13. When you compile a C++ program, error messages and/or ____ might appear. a. bugs c. inconsistencies b. exceptions d. warnings  

14. C++ provides ____ simple arithmetic operators for creating arithmetic expressions. a. three c. five b. four d. six  

15. A(n) ____ is a digit added to a number (either at the end or at the beginning) that validates the authenticity of the number. a. checksum c. error detection code b. check digit d. CRC  

16. When an expression includes a(n) ____ operator, the mathematical operation takes place after the expression is evaluated. a. prefix c. unary b. postfix d. binary  

17. The Boolean expression used in an if statement is often a comparison, such as “x greater than y,” but in C++ it can also be a number or a(n) ____. a. arithmetic expression c. character b. logical expression d. relational expression  

18. The _a___ takes one action when its Boolean expression is evaluated as true, and uses an else clause to define the actions to take when the expression is evaluated as false. a. dual-alternative if c. switch statement b. single-alternative if d. conditional operator  
  
19. It is a common mistake to use = instead of ____. a. || c. == b. && d. !=   

20. You can use the address operator (_d___) to examine the memory address of a variable. a. % c. * b. $ d. &  

____ 21. Which of the following statements has an error? a. int rent[4] = {250, 375, 460, 600}; b. int rent[] = {250, 375, 460, 600}; c. int rent[4] = {250, 375}; d. int rent[4] = {250, 375, 460, 600, 650};  

____ 22. A convenient way to set all array elements to zero is to declare as follows: int rent[20] = ____;. a. 0 c. {0} b. {0..0} d. {}  

____ 23. An alternative to parallel arrays is to create ____. a. one-dimensional arrays c. arrays of structure objects b. two-dimensional arrays d. arrays of flag variables  

____ 24. The ____ of a variable defines where it can be accessed in a program. a. abstraction c. encapsulation b. scope d. lifetime  

____ 25. ____ variables are those that are known to all functions in a program. a. Global c. General b. Local d. Modular  

____ 26. A(n) ____ value is a value sent from a subfunction to the function that called it. a. return c. subroutine b. output d. function  

____ 27. A(n) ____ is the expression used within the parentheses when you call a function. a. value c. input b. argument d. prototype  

____ 28. An argument used in a function call is known as a(n) ____ parameter. a. execution c. formal b. actual d. call  

____ 29. The scope resolution operator is ____. a. & c. * b. :: d. ->  

____ 30. ____ variables are sometimes called class variables, class fields, or class-wide fields. a. Public c. Constant b. Private d. Static  

____ 31. The ____ pointer is automatically supplied every time you call a non-static member function of a class. a. this c. const b. super d. void  

____ 32. The variable ____ is an example of a correct use of the this pointer. a. *this.employeeIdNum c. *(this.employeeIdNum) b. (*this).employeeIdNum d. *(this).employeeIdNum  

____ 33. getName() is a typical example of a(n) ____ function. a. manager c. inspector b. auxiliary d. predicate  

____ 34. A ____ function has the same name as its class. a. constructor c. predicate b. manager d. mutator  

____ 35. The ____ directive means that you have reached the end of the block of code that you are defining. a. #define c. #ifdef b. #endif d. #ifndef  

Explanation / Answer

This is the long assignment to do at once. We are not allowed to answer more than 4 parts of a question. I am providing answers for the 10 problems. Please post the remaining questions seperately.

11. Numeric variables store whole numbers.

12. C++ is a programming language that supports object-oriented techniques.

13. When you compile a C++ program, error messages and/or warnings might appear.

14.C++ provides five simple arithmetic operators for creating arithmetic expressions.

15.A(n) error detection code is a digit added to a number (either at the end or at the beginning) that validates the authenticity of the number.

16.When an expression includes a(n) prefix operator, the mathematical operation takes place after the expression is evaluated.

17. The Boolean expression used in an if statement is often a comparison, such as “x greater than y,” but in C++ it can also be a number or a(n) arithmetic expression.

18. The dual-alternative if takes one action when its Boolean expression is evaluated as true, and uses an else clause to define the actions to take when the expression is evaluated as false.

19. It is a common mistake to use = instead of ==.

20. You can use the address operator & to examine the memory address of a variable.