fork download
  1. #include <stdio.h>
  2. int
  3. main (void)
  4. {
  5. int i = 123;
  6. int *p = &i; // Puntatore al tipo "int".
  7. int **pp = &p; // Puntatore di puntatore al tipo
  8. // "int".
  9. int ***ppp = &pp; // Puntatore di puntatore di puntatore
  10. // al tipo "int".
  11.  
  12. printf ("i, p, pp, ppp: %i, %u, %u, %u\n",
  13. i, (unsigned int) p, (unsigned int) pp,
  14. (unsigned int) ppp);
  15.  
  16. printf ("i, p, pp, *ppp: %i, %u, %u, %u\n",
  17. i, (unsigned int) p, (unsigned int) pp,
  18. (unsigned int) *ppp);
  19.  
  20. printf ("i, p, *pp, **ppp: %i, %u, %u, %u\n",
  21. i, (unsigned int) p, (unsigned int) *pp,
  22. (unsigned int) **ppp);
  23.  
  24. printf ("i, *p, **pp, ***ppp: %i, %i, %i, %i\n",
  25. i, *p, **pp, ***ppp);
  26.  
  27. return 0;
  28. }
  29.  
Success #stdin #stdout 0.01s 1720KB
stdin
Standard input is empty
stdout
i, p, pp, ppp: 123, 3218046628, 3218046624, 3218046620
i, p, pp, *ppp: 123, 3218046628, 3218046624, 3218046624
i, p, *pp, **ppp: 123, 3218046628, 3218046628, 3218046628
i, *p, **pp, ***ppp: 123, 123, 123, 123