How to use extern : Extern « Language Basics « C / ANSI-C






How to use extern

  
//File: file f2.c

#include <stdio.h>
#include <f1.c>

extern int i;        

main() {
    i =0;
    printf("value of i %d\n",i);
}

//File: f1.c

int i =7;


           
       








Related examples in the same category