S
sarathy
Hi,
I have doubt in C expressions. The ++, -- ( both post and
pre increment and decrement operators) have similar functionality. The
thing is if the ++ comes before an operand, it is a prefix expression.
If it comes after an operand, it is a postfix expression.
But i see in the precedence table, that
a++ and a-- comes in the category postfix operators (and have high
precedence than ++a,--a), where as
++a and --a comes in the category unary operators( with low precedence)
Why is that distinction ? Both belong to the same category,
right ?
Also what does it mean to say that the result of a++ or ++a
is not an lvalue.
Regards,
Sarathy
I have doubt in C expressions. The ++, -- ( both post and
pre increment and decrement operators) have similar functionality. The
thing is if the ++ comes before an operand, it is a prefix expression.
If it comes after an operand, it is a postfix expression.
But i see in the precedence table, that
a++ and a-- comes in the category postfix operators (and have high
precedence than ++a,--a), where as
++a and --a comes in the category unary operators( with low precedence)
Why is that distinction ? Both belong to the same category,
right ?
Also what does it mean to say that the result of a++ or ++a
is not an lvalue.
Regards,
Sarathy