Question: Consider the following function that is intended to swap the values in the n1 and n2 variables. void swapShells(int &n1, int &n2) { n1
Consider the following function that is intended to swap the values in the n1 and n2 variables. void swapShells(int &n1, int &n2) { n1 = n2; n2 = } n1; It does not work as intended. Why?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Answer The provided function appears to have a syntax error ... View full answer
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
