Asked by Digtzy

Homework is over pointers


1. (3 points) True or false?
If (x == y) then (&x == &y). T F
Explain your choice:
I think its true but I don't really understand why

If (x == y) then (*x == *y). T F
Explain your choice:
False but not sure why

Answers

Answered by Reed
What school subject is this? I doubt anyone here knows what C++ means.
Answered by Steve
#1 If x and y are numbers, then &x and &y are their addresses. So, False.

#2 If x and y are pointers, then since they point to the same thing, the values pointed to are equal. So, True.
There are no AI answers yet. The ability to request AI answers is coming soon!

Related Questions