Answer:
#include <iostream>
using namespace std;
void divide(int numerator, int denominator, int *quotient, int *remainder)
{
*quotient = (int)(numerator / denominator);
*remainder = numerator % denominator;
}
int main()
{
int num = 42, den = 5, quotient=0, remainder=0;
divide(num, den, "ient, &remainder);
return 0;
}
Explanation:
The exercise is for "Call by pointers". This technique is particularly useful when a variable needs to be changed by a function. In our case, the quotient and the remainder. The '&' is passing by address. Since the function is calling a pointer. We need to pass an address. This way, the function will alter the value at the address.
To sum up, in case we hadn't used pointers here, the quotient and remainder that we set to '0' would have remained zero because the function would've made copies of them, altered the copies and then DELETED the copies. When we pass by pointer, the computer goes inside the memory and changes it at the address. No new copies are made. And the value of the variable is updated.
Thanks! :)
The Option D , Table Tools Insert
Answer:
Explanation:
When you have a single copy, a large number of concurrent updates that are supposed to go to a file may result in the user obtaining incorrect information. This incorrect information obtained them leads to the file being left in an incorrect state. When you have a lot of or multiple copies, then storage waste exist and the various copies might happen not to be consistent with respect one other. In summary, what happens is that
a) Using one copy saves space, but also the change might have an effect on all the users.
b) Using multiple copies avoids eliminates the change problem, while creating its own problems, using more space.
Project managers (PMs) are responsible for planning, organizing, and directing the completion of specific projects for an organization while ensuring these projects are on time, on budget, and within scope.