Write the definition of a function named swapints that is passed two int variables. The function returns nothing but exchanges the values of the two variables. So, if j and k have (respectively) the values 15 and 23, and the invocation swapint(j,k) is made, then upon return, the values of j and k will be 23 and 15 respectively.

Write the definition of a function named swapints that is passed two int variables. The function returns nothing but exchanges the values of the two variables. So, if j and k have (respectively) the values 15 and 23, and the invocation swapint(j,k) is made, then upon return, the values of j and k will be 23 and 15 respectively.

LANGUAGE: C++

CHALLENGE:

Write the definition of a function named swapints that is passed two int variables. The function returns nothing but exchanges the values of the two variables. So, if j and k have (respectively) the values 15 and 23, and the invocation swapint(j,k) is made, then upon return, the values of j and k will be 23 and 15 respectively.

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days – Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level