C++ Object-Oriented Programming: Lab Exercise One
Dynamic Memory Allocation and Pointer Vairable Example Input and run the program, observe the output, and explain the purpose of each line. #include<iostream> using namespace std; int main(){ int *ptr, index; ptr = new int[5]; if (ptr == NULL) exit(0); *(ptr + 1) = 3; for (index = 0; index &l...