alloc 380 B

1234567891011121314151617181920212223242526
  1. void main() {
  2. int start = 0;
  3. int* a = new int[4];
  4. int** b = &a;
  5. int* c = *b;
  6. test(a == c);
  7. test(&start != a);
  8. test(length(a));
  9. test(length(b));
  10. test(length(c));
  11. a[0] = 50;
  12. a[1] = 60;
  13. a[2] = 70;
  14. a[3] = 80;
  15. test(a[0]);
  16. test(a[1]);
  17. test(a[2]);
  18. test(a[3]);
  19. test(*a);
  20. delete a;
  21. }