Question: 8. What statement is true with respect to memory leaks? A. As a C++ programmer it is your responsibility to deallocate memory you use on

8. What statement is true with respect to memory leaks? A. As a C++ programmer it is your responsibility to deallocate memory you use on the stack and heap. B. GDB is a tool we can use to detect memory leaks C. Dynamically allocated memory should be deallocated in the same scope as it was allocated D. Once dynamically allocated, memory is reserved until it is explicitly deallocated or the program terminates. 9. Which of the following is not a stage in the software engineering life cycle? A. Preprocessing B. Implementation C. Requirements analysis D. Desigr 10. Which of the following statements is true A. It can be used to set the address of a non-pointer variable. regarding the & character in C++? B. It can be used to declare a variable as a reference. C. It can be used as a logical "and" operator. D. All of the above statements are true 11. What details are not required in a A. Return type B. Function name C. The types, order, and number of parameters D. All of the above details are required in a function ??? function declaration? declaration. 12. What is the default access given to a A. Public B. Protected C. Private D. Invisible/lnaccessible class member? 13. If you write a class intended to be included in someone else's program, which of the following do the users of your class not necessarily need? A. A header file for your class. B. The class object code C. The function definitions in a class source file D. They will need all of the above. 14. Which of the following is not variable A. B. C. D. Mutable Extern Static All of the above are examples of variable storage classes. storage class? 15. What is not true about the automatic These variables are only destroyed when the program terminates A. storage class? B. These variables are stored on the stack. C. It is the default storage class. D. Local variables are an example of automatic variables. 6. Which of the following statements are true with respect to variable scope? A. B. C. D. A variable declared within a block can be visible outside of that block. A variable declared outside of any block within a file can be accessed from another file A parameter name specified within a function prototype is visible outside of that prototype. The scope resolution operator can't be used to access global variables within a block of code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
