Predict the output of code using a pointer to a pointer.
Asked in the Technical stage. Consider this C++ program:
void update(int **p, int delta) {
**p += delta;
*p = nullptr;
}
// int value = initial;
// int* ptr = &value;
// update(&ptr, delta);
// cout << value << " " << (ptr == nullptr);
Implement predict_output(initial, delta) to return the exact output as a string. The first value is the mutated integer, followed by a space and 1 when ptr is null.
initial and delta."value 1".def predict_output(initial, delta):