Skip to content
Snippets Groups Projects
Select Git revision
  • aeadb66c6d0dad0f3bff78acbb0c79ea05d061d4
  • master default protected
  • 2018ws
  • 2017ws
  • 2016ws
5 results

loesung-3-2.c

Blame
  • Forked from Peter Gerwinski / hp
    Source project has a limited visibility.
    functions-9.c 410 B
    #include <stdio.h>
    
    int a;
    int b = 3;
    
    void foo (void)
    {
      b++;
      static int a = 5;
      int b = 7;
      printf ("foo(): a = %d, b = %d\n", a, b);
      a++;
    }
    
    int main (void)
    {
      printf ("main(): a = %d, b = %d\n", a, b);
      return 0;
    
      foo ();
      printf ("main(): a = %d, b = %d\n", a, b);
      a = b = 12;
      printf ("main(): a = %d, b = %d\n", a, b);
      foo ();
      printf ("main(): a = %d, b = %d\n", a, b);
      return 0;
    }