doble puntero en c

#include <stdio.h>

int main() {
    int num = 42;
    int *ptr1 = &num;        // Declare and initialize a pointer to an integer.
    int ptr2 = &ptr1;      // Declare and initialize a pointer to a pointer to an integer.

    printf("Value of num: %d\n", num);
    printf("Value pointed to by ptr1: %d\n", *ptr1);
    printf("Value pointed to by ptr2: %d\n", ptr2);

    *ptr1 = 100;             // Dereference ptr1 and assign a new value to the variable num.

    printf("New value of num: %d\n", num);
    printf("Updated value pointed to by ptr1: %d\n", *ptr1);
    printf("Updated value pointed to by ptr2: %d\n", ptr2);

    return 0;
}