1 1 vote Tell me the difference : &(arr+1) and &arr+1 Programming in C programming-in-c pointers array + – Ahsanul Hoque 2.4k views answer comment Share Follow Print See all 5 Comments 5 5 Comments reply Lakshman Bhaiya commented Feb 17, 2019 i edited by Lakshman Bhaiya Feb 18, 2019 reply Follow flag https://www.geeksforgeeks.org/whats-difference-between-array-and-array-for-int-array5/ 1 1 replyShare manisha11 commented Feb 18, 2019 i edited by manisha11 Feb 18, 2019 reply Follow flag @chauhansunil20th agree. &arr + 1 = &(arr + sizeof(arr)) &(arr+1) = &arr[1] 5 5 replyShare chauhansunil20th commented Feb 18, 2019 reply Follow flag @Lakshman Patel RJIT &arr +1 will be 105, &arr+1 will jump the entire array. 0 0 replyShare Shaik Masthan commented Feb 18, 2019 reply Follow flag it may help you https://gateoverflow.in/282711/madeeasy-programming-language-2019?show=282720#c282720 1 1 replyShare chauhansunil20th commented Feb 18, 2019 reply Follow flag @manisha11 agree. &arr + 1 = &(arr + sizeof(arr)) &(arr+1) = &arr[1] I don't know what did you do it? &arr[1] and &(arr+1) are not same, &arr[1] means &(arr[1]) = &(*(arr+1)) = &(10) = 101, suppose 10 is stored at the location 101. while &(arr+1) will ne &(101). so 101 and &101 both are not same, they indeed are not same as &arr+1. 1 1 replyShare Please log in or register to add a comment.
5 5 votes The name of the array gives the address of the 0th element. So if we add 1 to the name of the array it will contain the address of the next element. But if we look at the other one "&arr" this gives the address of the entire array and now when we increment it by one it will contain the address of the second array of same size. saif answered Feb 18, 2019 • edited Feb 18, 2019 by saif saif comment Share Follow 0 reply Please log in or register to add a comment.
2 2 votes Caption Rudr Pawan answered Jun 9, 2019 Rudr Pawan comment Share Follow 0 reply Please log in or register to add a comment.