fork(3) download
  1. #include <iostream>
  2. #include <string.h>
  3.  
  4. using namespace std;
  5.  
  6.  
  7. int main()
  8. {
  9. const int TAB_SIZE = 200;
  10. int * tab = (int *)malloc (TAB_SIZE * sizeof(int));
  11. memset(tab, -1, sizeof(int) * TAB_SIZE);
  12. printf("Adres %u dwie przykladowe wartosci: %d %d\n",(unsigned int)tab, tab[5], tab[100]);
  13. delete [] tab;
  14. tab = (int *)malloc (TAB_SIZE * sizeof(int));
  15. printf("Adres %u dwie przykladowe wartosci: %d %d\n",(unsigned int)tab, tab[5], tab[100]);
  16. delete [] tab;
  17. return 0;
  18. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
Adres 152599056 dwie przykladowe wartosci: -1 -1
Adres 152599056 dwie przykladowe wartosci: -1 -1