Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. #include <stdio.h>
  2.  
  3. static int fred = 1234;
  4. static int joe;
  5.  
  6. void henry()
  7. {
  8.    static int fred = 4567;
  9.  
  10.    printf("%d\n", fred);
  11.    fred++;
  12. }
  13.  
  14. int main()
  15. {
  16.    printf("%d\n", fred);
  17.    henry();
  18.    henry();
  19.    henry();
  20.    henry();
  21.    printf("%d\n", fred);
  22.    fred = 8901;
  23.    joe = 2345;
  24.    printf("%d\n", fred);
  25.    printf("%d\n", joe);
  26.  
  27.    return 0;
  28. }
  29.  
  30. /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/
  31.