initial import
[staff/goc4/2018bti7061.git] / c-4-pointers / examples / c-pointers / pointerArithmetic2.c
1 #include <stdio.h>
2
3 int main(){
4 int* px, * py;
5 static int a[6] = {1,2,3,4,5,6};
6
7 px = &a[0];
8 py = &a[5];
9 printf("px=%X; py=%X \n",px,py);
10 printf("py - px = %X \n", py-px);
11 /* Output
12 px=601020; py=601034
13 py - px = 5
14 */
15 }