Developer community
0 votes
58 views
can anybody tell me What happens if you assign to a reference?

thanks..
asked by | 58 views

1 Answer

0 votes
Best answer
You change the state of the referent (the referent is the object to which the reference refers).

Remember: the reference is the referent, so changing the reference changes the state of the referent. In compiler writer lingo, a reference is an "lvalue" (something that can appear on the left hand side of an assignment operator).
answered by Advisor (5.6k points) 1 7 14

Related questions

0 votes
1 answer
0 votes
2 answers
0 votes
1 answer
+1 vote
1 answer
asked by sandy Newbie (130 points) 1 1 3 | 3.8k views
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

Categories


C Books Guide and List
C++ Books Guide and List
Best Java Books

3.8k questions

4k answers

117 comments

10.7k users

3,751 questions
4,046 answers
117 comments
10,709 users