doubleIt is a function that takes one argument and returns no value. The argument is a pointer to int. The function doubles the value that the argument points to and stores it back. savings is an int variable that has been declared and initialized. Write a statement that doubles the value stored in savings by invoking the function doubleIt. For example, if the value in savings was 7 before your statement, after your statement its value would be 14.

LANGUAGE: C++

CHALLENGE:

doubleIt is a function that takes one argument and returns no value. The argument is a pointer to int. The function doubles the value that the argument points to and stores it back. savings is an int variable that has been declared and initialized. Write a statement that doubles the value stored in savings by invoking the function doubleIt. For example, if the value in savings was 7 before your statement, after your statement its value would be 14.

SOLUTION:



doubleIt(&savings);