Forum Discussion
Altera_Forum
Honored Contributor
15 years agoIf you mean to print the address of a variable you could do something like this:
int i = 3; printf("The location of variable 'i' is %d.", &i); The '&' gives the address of an object instead of the data itself. Normally I print my addresses in hex so this might work better: printf("The location of variable 'i' is 0x%x.", (unsigned long)&i);