main.c 285 B

123456789101112131415161718192021222324
  1. #include <stdint.h>
  2. #include <stdio.h>
  3. #include <string.h>
  4. #define SIZE 26
  5. int main() {
  6. uint8_t a[SIZE];
  7. memset(a, 1, SIZE);
  8. uint32_t result;
  9. result = 0;
  10. for (int i = 0; i < SIZE; i++) {
  11. result += a[i] * (1 << i);
  12. }
  13. printf("%u (0x%x)\n", result, result);
  14. return 0;
  15. }