When the pointer is incremented by an increment operator, it is always right incremented. : Pointer Calculation « Pointer « C Tutorial






#include <stdio.h>

main(){
    int a[5];
    int i;
    for(i = 0;i<5;i++){
        a[i]=i;
    }

    int *b;
    b=a;
    for(i = 0;i<5;i++)
    {
        printf("value in array %d and address is %16lu\n",*b,b);
        b++;                 
    }
}
#include <stdio.h>

main(){
    long a[5];
    int i;
    for(i = 0;i<5;i++)    {
        a[i]=i;
    }

    long *b;
    b=a;
    for(i = 0;i<5;i++)
    {
        printf("value in array %d and address is %16lu\n",*b,b);
        b++;                 
    }
}
value in array 0 and address is           631652
      value in array 1 and address is           631656
      value in array 2 and address is           631660
      value in array 3 and address is           631664
      value in array 4 and address is           631668








10.5.Pointer Calculation
10.5.1.Store the address of number in pointer
10.5.2.Change value of variable through pointer
10.5.3.When the pointer is incremented by an increment operator, it is always right incremented.
10.5.4.Pointer arrays