#include <stdio.h>
int main (void)
{
int i = 123;
int *p = &i; // Puntatore al tipo "int".
int **pp = &p; // Puntatore di puntatore al tipo "int".
int ***ppp = &pp; // Puntatore di puntatore di puntatore
// al tipo "int".
printf ("i, p, pp, ppp: %i, %u, %u, %u\n", i, (unsigned int) p, (unsigned int) pp,
(unsigned int) ppp);
printf ("i, p, pp, *ppp: %i, %u, %u, %u\n", i, (unsigned int) p, (unsigned int) pp,
(unsigned int) *ppp);
printf ("i, p, *pp, **ppp: %i, %u, %u, %u\n", i, (unsigned int) p, (unsigned int) *pp,
(unsigned int) **ppp);
printf ("i, *p, **pp, ***ppp: %i, %i, %i, %i\n", i, *p, **pp, ***ppp);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CmludCBtYWluICh2b2lkKQp7CiAgaW50IGkgPSAxMjM7CiAgaW50ICpwID0gJmk7ICAgICAgLy8gUHVudGF0b3JlIGFsIHRpcG8gImludCIuCiAgaW50ICoqcHAgPSAmcDsgICAgLy8gUHVudGF0b3JlIGRpIHB1bnRhdG9yZSBhbCB0aXBvICJpbnQiLgogIGludCAqKipwcHAgPSAmcHA7IC8vIFB1bnRhdG9yZSBkaSBwdW50YXRvcmUgZGkgcHVudGF0b3JlCiAgICAgICAgICAgICAgICAgICAgLy8gYWwgdGlwbyAiaW50Ii4KCiAgcHJpbnRmICgiaSwgcCwgcHAsIHBwcDogJWksICV1LCAldSwgJXVcbiIsCiAgICAgICAgICAgaSwgKHVuc2lnbmVkIGludCkgcCwgKHVuc2lnbmVkIGludCkgcHAsCiAgICAgICAgICAgKHVuc2lnbmVkIGludCkgcHBwKTsKCiAgcHJpbnRmICgiaSwgcCwgcHAsICpwcHA6ICVpLCAldSwgJXUsICV1XG4iLAogICAgICAgICAgIGksICh1bnNpZ25lZCBpbnQpIHAsICh1bnNpZ25lZCBpbnQpIHBwLAogICAgICAgICAgICh1bnNpZ25lZCBpbnQpICpwcHApOwoKICBwcmludGYgKCJpLCBwLCAqcHAsICoqcHBwOiAlaSwgJXUsICV1LCAldVxuIiwKICAgICAgICAgICBpLCAodW5zaWduZWQgaW50KSBwLCAodW5zaWduZWQgaW50KSAqcHAsCiAgICAgICAgICAgKHVuc2lnbmVkIGludCkgKipwcHApOwoKICBwcmludGYgKCJpLCAqcCwgKipwcCwgKioqcHBwOiAlaSwgJWksICVpLCAlaVxuIiwKICAgICAgICAgICBpLCAqcCwgKipwcCwgKioqcHBwKTsKCiAgZ2V0Y2hhciAoKTsKICByZXR1cm4gMDsKfQo=
i, p, pp, ppp: 123, 3218621476, 3218621472, 3218621468
i, p, pp, *ppp: 123, 3218621476, 3218621472, 3218621472
i, p, *pp, **ppp: 123, 3218621476, 3218621476, 3218621476
i, *p, **pp, ***ppp: 123, 123, 123, 123