Flashcard Details

CPlusPlus

What is the difference between a pointer and a reference in C++?

A pointer stores the memory address of a variable, while a reference is an alias to an existing variable. Pointers can be reassigned, but references cannot.

2

https://www.geeksforgeeks.org/pointers-vs-references-cpp/?ref=gcse_outind

3