fork(1) download
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3.  
  4. #define NUMINTS 3
  5.  
  6. int main() {
  7. int *list, i;
  8. list = (int *)calloc(NUMINTS, sizeof(int));
  9. *list = 421;
  10. *(list + 1) = 53;
  11. *(list + 2) = 1806;
  12. printf("Lista adreselor:");
  13. for (i=0; i<NUMINTS; i++)
  14. printf("%4p ",(list+i));
  15. printf("\n Lista valorilor:");
  16. for (i=0; i<NUMINTS; i++)
  17. printf("%4d ",*(list+i));
  18. printf("\n");
  19. return 0;
  20. }
Success #stdin #stdout 0s 2184KB
stdin
Standard input is empty
stdout
Lista adreselor:0x920f008 0x920f00c 0x920f010 
 Lista valorilor: 421   53 1806