1 1 vote int arr[]={1,2,3,4,5}; int *p2=(int*)(&arr+1); what is the meaning of p2 ????? please explain Programming in C programming-in-c + – sandeep singh gaur 574 views answer comment Share Follow Print See all 4 Comments 4 4 Comments reply Verma Ashish commented Feb 5, 2019 reply Follow flag P2 is a pointer pointing to array value 2 (integer) 0 0 replyShare sandeep singh gaur commented Feb 5, 2019 reply Follow flag i am not understand please explain in detail , printf("%d",*(p2-1)); what is the output,according to above question. 0 0 replyShare smsubham commented Feb 5, 2019 reply Follow flag It will print 5. (last element of the array) &arr+1 = &arr+ (5*size of int) *(p2-1) = p2[-1] See this: https://gateoverflow.in/232228/array-and-pointer 3 3 replyShare Verma Ashish commented Feb 5, 2019 reply Follow flag Yes..👍 I was wrong. :( 0 0 replyShare Please log in or register to add a comment.
–1 –1 vote P2 is an integer pointer and the address of 2nd slot of the array is assigned to p2. piyushwm answered Feb 5, 2019 piyushwm comment Share Follow 0 reply Please log in or register to add a comment.