home *** CD-ROM | disk | FTP | other *** search
/ C++ for Dummies (3rd Edition) / C_FD.iso / CHAP01 / CHAP01_1.C
C/C++ Source or Header  |  1996-09-02  |  304b  |  15 lines

  1. //Chap01_1.c
  2. void fn(void)
  3. {
  4.    int autoVar;              /*autoVar starts life here*/
  5.    static int staticVar = 0; /*value first time fn() is called*/
  6.    autoVar = 10;
  7.    staticVar = 20;
  8. }                            /*autoVar ends life here*/
  9. int main()
  10. {
  11.    fn();
  12.    fn();
  13.    return 0;
  14. }
  15.