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