0 votes 0 votes Programming in C made-easy-test-series programming pointers + – jatin khachane 1 asked Nov 23, 2018 • edited Mar 4, 2019 by akash.dinkar12 jatin khachane 1 516 views answer comment Share Follow See all 9 Comments See all 9 9 Comments reply raahul commented Nov 23, 2018 reply Follow Share 2024? 0 votes 0 votes jatin khachane 1 commented Nov 23, 2018 reply Follow Share Yes...thts right ans But &S + 1 ...Why this is taken as 1*(sizeofarray S) not 1*(sizeof int) 0 votes 0 votes kumar.dilip commented Nov 23, 2018 reply Follow Share I think 2024 ?? 0 votes 0 votes raahul commented Nov 23, 2018 reply Follow Share S is an array of integer. We are adding 1 to base address of S. So,it will skip size of array,not size of int. T skip size of integer we need to ( for example &S[0] +1).Then it will skip size of an int. 0 votes 0 votes jatin khachane 1 commented Nov 23, 2018 reply Follow Share What will be difference in S + 1 &S + 1 &S[0] + 1 0 votes 0 votes raahul commented Nov 23, 2018 reply Follow Share 1 and 3 are same. Both will skip integer.2 will skip an array. 0 votes 0 votes jatin khachane 1 commented Nov 23, 2018 reply Follow Share S ==> address of first element in array &S ==> base address of array In 1st case address is of element which is int hence +1 ==> +1*(sizeof(int)) In 2nd case pointer element which is Array Hence +1 ==> +1*((sizeof(Array)) So in general we can say X + 1 ==> X+1*(size of element to which X is pointing) Correct me if i am wrong 0 votes 0 votes raahul commented Nov 23, 2018 reply Follow Share Yes I think correct. X should be an array here. 0 votes 0 votes Shaik Masthan commented Nov 24, 2018 reply Follow Share This may help you to understand the concept https://gateoverflow.in/254355/test-series-question https://gateoverflow.in/254844/3d-array 1 votes 1 votes Please log in or register to add a comment.