Question & Answer: An exception terminates the block where the exception occurred. If a base class declares a pure virtual function, a derived class must implement that functi…..

18. An exception terminates the block where the exception occurred. T F 1 9. If a base class declares a pure virtual function, a derived class must implement that function to become a concrete class. T F 20. Polymorphic programming can eliminate the need for switch logic. he non-static objects member functions have access to a self-pointer- to-the-object called the this pointer. (Multiple Choice, circle the correct choice] 22. Given the declaration array <double, 75> alpha; the valid range of index values for alpha is: A) 0 through 75 D) 1 through 74 B) 0 through 74 E) 1 through 76 C) 1 through 75 23. What are the contents of arr after the for loop? int j = 0; for (int i = 0; i i++) arr [i] i + j; j=j+1; A) 01234 B) 12345 C) 02468 D) 13579 24. Given the class declaration class MyClass public: void func ); // other methods private: int n; what notation does the body of func) use to assign the value 3 to n? A) B) C) n=3; MyClass . n=3; MyClass : :n=3; someobject.n=3; D) E) It cant be done n is private.

An exception terminates the block where the exception occurred. If a base class declares a pure virtual function, a derived class must implement that function to become a concrete class. Polymorphic programming can eliminate the need for “switch” logic. The non-static object’s member functions have access to a self-pointer- to-the-object called the “this” pointer. Given the declaration array alpha: the valid range of index values for alpha is: A) 0 through 75 B) 0 through 74 C) 1 through 75 D) 1 through 74 E) 1 through 76 What are the contents of arr after the “for” loop? int j = 0: for (int i = 0: i

Expert Answer

 

18. True : When no user provide exception hander, then complier provide default mechanism to terminate the program

19. True

20. True: Polymorphic programming with virtual functions can eliminate the need for switch logic.

21. True:This pointer is passed a hidden argument for all non-static function calls and availble as local variable with in the body of nonstatic functions.

22. B. 0 through 74.

23. B. 12345

Still stressed from student homework?
Get quality assistance from academic writers!