The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
729 views

'ptrdata' is a pointer to a data type. The expression *ptrdata++ is evaluated as (in C++):

(1) *(ptrdata++)                                  (2) (*ptrdata)++

(3) *(ptrdata)++                                   (4) Depends on compiler 

asked in CBSE/UGC NET by (39 points)
retagged by | 729 views

1 Answer

+1 vote
Best answer

Post-increment (++) has higher precedence than dereference (*). Hence it increments the address that the pointer holds, then dereferences it

answer will be *(ptrdata++)

answered by Boss (34.9k points)
selected by

Related questions



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

42,599 questions
48,599 answers
155,660 comments
63,730 users