UGC-NET | UGC-NET CS 2017 Dec 2 | Question 11

‘ptrdata’ is a pointer to a data type. The expression *ptrdata++ is evaluated as (in C++) :
(A) *(ptrdata++)
(B) (*ptrdata)++
(C) *(ptrdata)++
(D) Depends on compiler


Answer: (A)

Explanation: Here ++ (unary operator) have high precedence than * (unary operator). So ++ will be evaluated first then * will be in action. So A is the correct option.
So, option (A) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.