lundi 4 janvier 2016

How is a reference variable represented in memory?

int num = 0;
int *ptrNum = #
int &refNum = num;

enter image description here

Which one is the correct representation of reference variable in the memory-table 1 or table 2?
If table 2,then why a pointer is an object and a reference isn't?
If both representations are incorrect then please provide a correct representation and an explanation for why a reference isn't an object.

Aucun commentaire:

Enregistrer un commentaire