I am confused about working of the below statement:
*ptr++->str
First ++ operator is applied to ptr which returns rvalue. Next operator is -> has to be applied. Doesn’t -> operator require lvalue?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No. See section 6.5.2.3 of the C99 standard:
And that’s all it says on the matter.