34_array_assignment.c 299 B

123456789101112131415161718192021222324
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int a[4];
  5. a[0] = 12;
  6. a[1] = 23;
  7. a[2] = 34;
  8. a[3] = 45;
  9. printf("%d %d %d %d\n", a[0], a[1], a[2], a[3]);
  10. int b[4];
  11. b = a;
  12. printf("%d %d %d %d\n", b[0], b[1], b[2], b[3]);
  13. return 0;
  14. }
  15. /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/