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.
- ptr stores the address of value.
- dptr stores the address of ptr.
- Inside updateValue(int** ptr), **ptr = 50; means:
- *ptr gives us ptr (which points to value).
- **ptr accesses the actual value, allowing it to be modified to 50.