Write two functions that increment a number in different ways:
void incrementPtr(int* x)
void incrementRef(int& x)
The program will call both functions and print the results. You only need to implement the two functions.
Example Input:
5
Output:
After incrementPtr: 6 After incrementRef: 6
Input:
0
After incrementPtr: 1 After incrementRef: 1
Test Cases
Test Results
Input
Expected Output