C++ examples for Data Type:Pointer
Pointer arithmetic refers to the application of some of the arithmetic operators to pointers.
#include <iostream> using namespace std; int main() {/*www .ja v a 2 s. co m*/ int i[10]; double d[10]; int* ip = i; double* dp = d; cout << "ip = " << (long)ip << endl; ip++; cout << "ip = " << (long)ip << endl; cout << "dp = " << (long)dp << endl; dp++; cout << "dp = " << (long)dp << endl; }