segments.c 423 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Demonstrate different segments.
  3. */
  4. #include <unistd.h>
  5. #define N (200)
  6. int x = 0xdeadbeef;
  7. int t1;
  8. int t2;
  9. int t3;
  10. int array[4096];
  11. char const *str = "Hello World\n";
  12. const int z = 0xabcddcba;
  13. struct example {
  14. int ypos;
  15. int xpos;
  16. };
  17. int
  18. main()
  19. {
  20. int count = 0;
  21. const int value = 1;
  22. t1 = N;
  23. t2 = 2;
  24. count = x + t1;
  25. t2 = z + t2 + value;
  26. reboot(RB_POWEROFF);
  27. return 0; /* avoid compiler warnings */
  28. }