8. What statement is true with respect to memory leaks? A. As a C++ programmer i
ID: 3712975 • Letter: 8
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 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.Explanation / Answer
9) which of the following is not a stage in the software engineering life cycle?
Ans) Option A is the correct answer, i.e; Preprocessing
Explanation:
Preprocessing is not a stage in the software engineering life cycle and the remaining options are wrong.
10) which of the following is true regarding the & character in C++?
Ans) Option B is the correct answer, i.e; it can be used to declare a variable as a reference.
Explanation:
& character in C++ can be used to declare a variable as a reference.
11) which details are not required in a function declaration?
Ans) Option D is the correct answer, i.e; All of the above statements are true
Explanation:
All of the above statements are true
12) what is the default access given to a class member?
Ans) Option C is the correct answer, i.e; Private
Explanation:
Private is the default access given to a class member and the remaining options are wrong.
13) which of the following is not variable storage class?
Ans) Option B is the correct answer, i.e; Extern
Explanation:
Extern is not variable storage class
According to chegg rules we should answer only four questions, but i have answered more questions, you can post the remaining questions as a separate questions, hope you understand and please co-operate with us.
Hope This Helps, if you have any doubts Please comment i will get back to you, thank you and please thumbs up
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.