What does the following do?
#include <iostream.h>
void main()
{ int A[] = { 31, 54, 77, 52, 93 };
int* ptrint = A;
for(int j=0; jɝ j++) {
cout << endl << *(ptrint++); }
}
Prints the values of the array. We can
increment a pointer that holds an address.
We cannot increment an address itself.
Previous slide
Next slide
Back to first slide
View graphic version