types 567 B

123456789101112131415161718192021222324252627282930313233
  1. struct A {
  2. int a;
  3. };
  4. void main() {
  5. int* a = new int[4];
  6. float* b = new float[4];
  7. bool* c = new bool[4];
  8. A* d = new A[4];
  9. int** e = new int*[4];
  10. float** f = new float*[4];
  11. bool** g = new bool*[4];
  12. A** h = new A*[4];
  13. int test = -243;
  14. a[2] = -test;
  15. b[2] = 23.5;
  16. c[2] = true;
  17. d[2].a = 64564;
  18. e[2] = &a[2];
  19. f[2] = &b[2];
  20. g[2] = &c[2];
  21. h[2] = &d[2];
  22. print a[2];
  23. print b[2];
  24. print c[2];
  25. print d[2].a;
  26. print *e[2];
  27. print *f[2];
  28. print *g[2];
  29. print (*h[2]).a;
  30. }