Multiple choice technology programming languages

Which of the following gives the memory address of a pointer a?

  1. a

  2. *a

  3. &a

  4. address(a)

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

A pointer variable stores a memory address. When you declare int* a, the variable a itself holds an address. Accessing a returns that address value. Dereferencing (*a) gives the value at that address. Taking address of a (&a) gives the address where the pointer variable is stored, not the address it holds.