Question: Compare and contrast pointers and references in C++. A) In what circumstance does it make more sense to use a pointer than a reference, and

Compare and contrast pointers and references in C++.

A) In what circumstance does it make more sense to use a pointer than a reference, and when does it make more sense to use a reference?

B) Under what circumstances are you allowed to return a reference from a function?

C) What constraints are placed on the declaration of a reference?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!