Which operator is used to access the memory address of a variable in C++? 

  • * (Asterisk) 
  • & (Ampersand) 
  • % (Percent) 
  • + (Plus)
The "&" (ampersand) operator is used to get the memory address of a variable in C++. For instance, if int x = 10;, then &x will give the memory address where the integer x is stored. The asterisk (*), on the other hand, is used for dereferencing.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *