This is a very simple question but even have some doubt in sequence point.
int a[3] = {1,2,4}; printf("%d",++a[1]); o/p
3 Is this a valid c statement, I am getting output 3, which means it is same as
++(a[1]) But how is this possible as we have a pre-increment operator which has to increment the a first then the dereference has to happen.
Please correct my doubt. How we are getting 3?
ais not even an assignable lvalue, so even if the precedence laws were different you could not get 4 . (you can't increment an array) (you cannot increment the numeric literal1either)