Machine-translated by Google. Questions are authored in English.
Top

Discussion

If p is a pointer, what does the expression *p give ?

  • A.The address stored in p
  • B.The value stored at the address held by p
  • C.The address of p itself
  • D.The size of the type p points to

Answer: C

Correct answer: The value stored at the address held by p

The asterisk is the dereference operator, which follows the pointer to the object it refers to. The address of p itself is obtained with &p, and p alone gives the address it holds.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.