Given an array arr, of type int, along with two int variables i and j, write some code that swaps the values of arr[i] and arr[j
]. declare any additional variables as necessary.
1 answer:
You'll need a helper variable for this, so depending on your programming language, the solution becomes:
int helper;
helper = arr[i];
arr[i] = arr[j];
arr[j] = helper;
You might be interested in
Answer:
Shut down the computer.
Explanation:
l hope it help

There are three dimensions of information systems
- organizational
- management
- technology.

Answer:
i dont know
Explanation:
i m really sorry :(
They're not dangerous. However, they do cause mild tremors.
The answer is relational.