C++
Download the attached program and complete the functions. (Referto comments)
main.cpp ~#include #include #define END_OF_LIST -999using namespace std;/* * */int exercise_1() { int x = 100; int *ptr; // Assign the pointer variable, ptr, to the address of x. Then print out // the 'value' of x and the 'address' of x. (See Program 10-2) return 0; }int exercise_2() { int x = 100; int *ptr; // Assign ptr to the address of x. Then use indirection to print out the // value of x using pointer variable. (See Program 10-3) return 0;}int exercise_3() { int a[] = {1,2,3,4,5,6,7,8,9}; int *n; // Print the address of the array a, // Notice that printing the address of an array is different then printing // the address of a variable. // Assign the address of the array to the variable n. Then de-reference n // to print out the first, third and fifth elements. (See Programs 10-5 and // 10-6) return 0;}int exercise_4() { int a[] = {1,2,3,4,5,6,7,8,9}; int *n; // Assign the address of the array to the variable n. Then use a loop to // print out each element using a while loop (See Program 10-9) for (int i=0; i<9; i++) { cout << \"Element \" << i << \" is \" << \"... \" << endl; } return 0;}int main() { exercise_1(); exercise_2(); exercise_3(); exercise_4();}