Question: Consider some function that passes by reference: void fun ( int &first, int &second ) What happens when the function is called and the same

Consider some function that passes by reference:
void fun(int &first, int &second)
What happens when the function is called and the same variable is passed twice?
For example:
fun(total, total)
Group of answer choices
An automatic compiler optimization, resulting in a smaller memory profile for the function.
A pair of dangling pointers.
Collisions between aliases.
Inadvertent recursion.
A compiler error.

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!