0 votes 0 votes int main() { int a[10]; printf("%d",*a+1-*a+3); return 0; } Answer is given as 4 but i think it should be 8, if int is of 4 byte. Correct me if i am wrong Programming in C programming-in-c + – Gatetarget_100 asked Aug 3, 2018 Gatetarget_100 548 views answer comment Share Follow See all 4 Comments See all 4 4 Comments reply MiNiPanda commented Aug 3, 2018 reply Follow Share Can you explain how are you getting 8? Here *a is used and not just 'a'. So we are not dealing with any address. *a means a[0]. We don't know what is it. But let it be some x. Then (*a+1-*a+3) = (x+1-x+3)=4. 3 votes 3 votes Rishav Kumar Singh commented Aug 4, 2018 reply Follow Share Yes, answer should be 4 0 votes 0 votes Shaik Masthan commented Aug 4, 2018 reply Follow Share @Gatetarget_100 What my suggestion is " When you see an complex expression, first you simplify it and parenthesize it. " *a+1-*a+3 ==> ( ( ( (*a) + 1 ) - (*a) ) + 3 ) Now, you have to evaluate *a first, *a = *(a+0) = a[0] after that just like @ MiNiPanda says We don't know what is it. But let it be some x. Then (*a+1-*a+3) = (((x+1)-x)+3) = 4. 1 votes 1 votes Gatetarget_100 commented Aug 4, 2018 reply Follow Share Got it Thanku :) 0 votes 0 votes Please log in or register to add a comment.