Microsoft Consultant Question: Download Microsoft Consultant PDF
Give an algorithm that will perform swapping of values between two variables?
Answer:
Let’s call the first variable A and the second variable B. Designate a third variable that will be used for the swap. Calling this third variable MIDDLE, assign MIDDLE to contain the value of the variable A. Then assign the value of B to the variable A. Finally, assign the value of MIDDLE to the variable B.
Previous Question | Next Question |
Tell me are files that were deleted from the Recycle bin gone for good? | Explain me what do you do when you don’t know the answer to a question? |