Write two C++ functions that increment an integer value using two different parameter-passing techniques commonly used in embedded and firmware development:
void incrementPtr(int* x)void incrementRef(int& x)The program reads an integer from standard input, calls both functions separately, and prints the results.
You only need to implement the two functions.
The main() function is provided and must not be modified.
Assumptions:
Example 1
Input
5Output
After incrementPtr: 6
After incrementRef: 6
Example 2
Input
0Output
After incrementPtr: 1
After incrementRef: 1
Input
5
Expected Output
After incrementPtr: 6 After incrementRef: 6