Given the C++ instructions below, add the necessary instructions to swap the contents of the variables num1 and num2.
?
int num1 = 10;
int num2 = 15;
int temp = 0;

What will be an ideal response?


temp = num1;num1 = num2;num2 = temp;?OR?temp = num2;num2 = num1;num1=temp;

Computer Science & Information Technology

You might also like to view...

What is the extension for the NIS map data file?

A. .dat B. .mpd C. .pag D. .dir

Computer Science & Information Technology

What partition is the bootable partition that startup BIOS turns to when searching for an operating system to start up on an MBR partitioned drive?

A. extended partition B. startup partition C. active partition D. volume

Computer Science & Information Technology

AND, OR, and NOT are all examples of ________ functions

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

What is the difference between a layer mask and a clipping mask?

What will be an ideal response?

Computer Science & Information Technology