79423350

Date: 2025-02-08 14:36:17
Score: 2
Natty:
Report link

When we pass dptr (which is a pointer to a pointer) to updateValue, we allow the function to access and modify the original value indirectly.

  1. ptr stores the address of value.
  2. dptr stores the address of ptr.
  3. Inside updateValue(int** ptr), **ptr = 50; means:
  4. *ptr gives us ptr (which points to value).
  5. **ptr accesses the actual value, allowing it to be modified to 50.
Reasons:
  • No code block (0.5):
  • Starts with a question (0.5): When we
  • Low reputation (1):
Posted by: marvel