Skip to content
Snippets Groups Projects
Select Git revision
  • 2c5f698589f1effe29a83b19d484806842ffa770
  • master default
2 results

functions-8.c

Blame
  • Forked from Peter Gerwinski / hp
    343 commits behind the upstream repository.
    functions-8.c 406 B
    #include <stdio.h>
    
    int a, 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;
    }