Skip to content
Snippets Groups Projects
Select Git revision
  • a24dd28cdb489746a3da64dcf071e281758a1184
  • 2024ws default
  • 2023ws
  • 2022ws
  • 2021ws
  • 2020ws
  • 2018ws
  • 2019ws
  • 2017ws
  • 2016ws
10 results

alignment-5.c

Blame
  • Peter Gerwinski's avatar
    Peter Gerwinski authored
    Beispiel-Programme 21.1.2021
    a24dd28c
    History
    alignment-5.c 256 B
    #include <stdio.h>
    #include <stdint.h>
    
    int main (void)
    {
      uint8_t a = 42;
      uint16_t b = 1117;
      uint8_t c = 23;
      printf ("a = %d, b = %d, c = %d\n", a, b, c);
      uint64_t *p = (uint64_t *) &a;
      *p = 0;
      printf ("a = %d, b = %d, c = %d\n", a, b, c);
    }