Design a site like this with
Get started

Reference vs Pointer

Differences POINTERREFERENCEIs a variable that holds memory address of another variable. // int *ptr = &i; Is an alias i.e. another name for an already existing variable. // int &ref = i; Can point nowhere e.g. NULLMust refer to an objectCan be re-assigned any number of times Cannot be re-assigned after binding Can take the... Continue Reading →

Blog at

Up ↑