June 2005
Beginner
480 pages
10h 31m
English
| 1: | What's an efficient way to swap the values contained in two scalar variables $a and $b?
|
| 2: | What does the statement $a=scalar(@array); assign to the variable $a?
|
| 3: | What does the statement $a=@array; assign to the variable $a?
|
| A1: | b. The first choice clearly will not work; the value contained in $a is destroyed. Choice c answers the question but requires a third variable to hold the data during the swap. Choice b swaps the data correctly, using no extra variables, and is fairly clear code. |
| A2: ... |
Read now
Unlock full access