Документ взят из кэша поисковой машины. Адрес оригинального документа : http://jet.sao.ru/hq/sts/linux/book/c_marshall/section2_22_12.html
Дата изменения: Unknown
Дата индексирования: Tue Oct 2 09:23:15 2012
Кодировка:
static.c



Next: malloc.c Up: Program Listings Previous: Makefile

static.c


#include <stdio.h>

void stat();

main() {
    int counter;    /* loop counter */
    
    
    for (counter = 0; counter < 5; counter++) {
        stat();
    }
    
}

void stat()

{ int temporary = 1;
  static int permanent = 1;

        (void)printf("Temporary %d Permanent %d\n",
            temporary, permanent);
        temporary++;
        permanent++;
}


Dave.Marshall@cm.cf.ac.uk
Wed Sep 14 10:06:31 BST 1994