Assume you have two integer variables, num1 and num2. Which of the following is the correct way to swap the values in these two variables?
a. ```
int temp = num1;
num2 = num1;
num1 = num2;
```
b. ```
int temp = num2;
num2 = num1;
num1 = temp;
```
c. ```
num1 = num2;
num2 = num1;
```
d. ```
int temp = num1;
num2 = temp;
temp = num2;
num1 = temp;
```
e. None of these
b. ```
int temp = num2;
num2 = num1;
num1 = temp;
```
Computer Science & Information Technology
You might also like to view...
What is the default data table style?
A) Normal B) Medium 2 C) Medium 1 D) None
Computer Science & Information Technology
_________ instructions are those that can be executed only while the processor is in a certain privileged state or is executing a program in a special privileged area of memory.
Fill in the blank(s) with the appropriate word(s).
Computer Science & Information Technology