#include using namespace std; /** * This program illustrates the difference between pointer arithmetic and integer arithmetic on ints (size 4 bytes on 32 bit machine) * and floats (size 8 bytes on 32 bit machine) */ int main() { const int N = 10; // Work with int pointers first { cout << endl << "Int Size: " << sizeof(int) << endl << "-----------" << endl; int arr[N] = {1,1,2,3,5,8,13,21,34,56}; // First do not cast the pointers, what happens? cout << "\n pointer arithmetic\n -------------------\n"; { int *end = arr; for (int i=0;i