#include <stdio.h>



int main(int argc, char** argv){

	int x=5;
	int* p=&x;
	int* c=p+1;
	printf("Check value after (*p)++:%d\n",(*p)+1); 
	
	printf("Pointer initially:%p\n",p);
	printf("Pointer c (p+1 int position):%p\n",c);
	printf("*Pointer ++ (returns pointed value and increases pointer by 1 int position:%d\n",*p++);
	printf("Pointer now, should be same as c:%p\n",p);
	
	//*p=(*p)++; //equivalent to x++, but the p has changed in line 14 so it does not point to x. We should have this command 
	//before 
	printf("Check value after (*p)++:%d\n",(*p)+1);  //UNDEFINED BEHAVIOUR

	//example of difference between &array and array[]
	int array[5]; 
  
   
    printf("array=%p : &array=%p\n", array, &array);  
  	int i=2;
    printf("array+1 = %p : &array + 1 = %p, &array[i]+1 =%p\n", array+1, &array+1,&array[i]+1); 

	

}