*ptr++ and ++*ptr are they representing the same expression if not then how they are different according to precedence ?
daredevil786 0 Newbie Poster
Recommended Answers
Jump to PostI refuse to answer, on the grounds that you should be enthusiastically TESTING this yourself. ;)
Put down your latte, take 30 seconds, and test it, FCOLoud!
Jump to Post++ operator has higher preference than *
so *ptr++ is essentially *(ptr++)
and *++ptr means *(++ptr)
and ++*ptr means ++(*ptr)
All 7 Replies
Adak 419 Nearly a Posting Virtuoso
daredevil786 0 Newbie Poster
Adak 419 Nearly a Posting Virtuoso
rajsekhar28 0 Newbie Poster
Adak 419 Nearly a Posting Virtuoso
daredevil786 0 Newbie Poster
Adak 419 Nearly a Posting Virtuoso
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.