Answer:
System.out.println(value % 10);
printReverse(value / 10);
Explanation:
System.out.println(value % 10);
To print the last digit, we print the value modulo 10 as the result of the value modulo 10 gives us the last digit.
printReverse(value / 10);
To call the recursive method again without the last digit, we now pass the result of dividing the value with 10 inside the printReverse method as parameter. The division by 10 will remove the last digit from the value and result will be the remaining digits.
Answer:
1) B (++ and --)
2) A (1 2 3 4 5)
Explanation:
In the first question, the operators ++ and -- are used in almost all programming languages for adding and subtracting 1 respectively from an operand.
In the second question using a while statement the numbers 1-5 is printed out because the variable n=1 is increased by 1 after each iteration.
Answer:
The problem with Paul's computer is that the magnetic hard drive failed.
Explanation:
A magnetic hard drive or hard disk is a non-volatile storage device, which is used to store different information on a computer.
The magnetic disk is made up of numerous magnetic plates, these plates are divided into sectors and tracks. A spindle is present in the middle to rotate the combined plates or the whole unit.
When there is a clicking noise coming from the magnetic disk, it could mean that one of the plates is damaged or if the power to the computer is inconsistent. This can greatly affect the performance of your computer.