15. If you write a function that should use call-by-reference, but forget to include the ampersand, * The program will not compile The program will not link The program will show a run-time error The program will run with incorrect results

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter10: Pointers
Section: Chapter Questions
Problem 2PP
icon
Related questions
Question

Hi

 

Solve all the quastions plz

15. If you write a function that should use call-by-reference, but forget to include
the ampersand, *
The program will not compile
The program will not link
The program will show a run-time error
O The program will run with incorrect results
16. Which of the following statements correctly prints out the value that is in the
memory address that the pointer p1 is pointing to? *
cout << &p1;
cout << p1;
O cout << int* p1;
O cout << *p1;
17. Polymorphism refers to *
the ability to assign multiple meanings to one function name.
O overriding base class functions.
overloading functions
O none of the above
Transcribed Image Text:15. If you write a function that should use call-by-reference, but forget to include the ampersand, * The program will not compile The program will not link The program will show a run-time error O The program will run with incorrect results 16. Which of the following statements correctly prints out the value that is in the memory address that the pointer p1 is pointing to? * cout << &p1; cout << p1; O cout << int* p1; O cout << *p1; 17. Polymorphism refers to * the ability to assign multiple meanings to one function name. O overriding base class functions. overloading functions O none of the above
18. Using inheritance allows us to *
eliminate duplicate code
make our classes more modular
use polymorphism
O all of the above
19. If the member variables in a base class are private, then *
they can be directly accessed or changed in the derived class
the derived class must use any queries or update functions from the base class
making them private causes a syntax error.
O you must declare them in the derived class also.
20. When a throw statement is executed, *
execution of the try block stops
O execution of the throw block stops
the program always exits
O execution of the catch block stops
Transcribed Image Text:18. Using inheritance allows us to * eliminate duplicate code make our classes more modular use polymorphism O all of the above 19. If the member variables in a base class are private, then * they can be directly accessed or changed in the derived class the derived class must use any queries or update functions from the base class making them private causes a syntax error. O you must declare them in the derived class also. 20. When a throw statement is executed, * execution of the try block stops O execution of the throw block stops the program always exits O execution of the catch block stops
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Types of Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr