Why can I assign a new value to a reference, and how can I make a reference refer to something else?
a) It cannot, the line you quote doesn’t change the reference q, it changes p. b) No the literal is constant, but p is a pointer which points at a literal. The pointer can be changed, what is being pointed to cannot. q = “world”; makes the pointer p point to something else. You seem … Read more