initial import
[staff/goc4/2018bti7061.git] / c-3-libraries / examples / c-variables / external.c
1 #include <stdio.h>
2
3 /* This is the declaration of an external variable that will be linked later.
4 The variable is defined in the file global2.c, where the function
5 printVar is actually used. */
6
7 extern int myVar1;
8
9 void printVar(void){
10 extern int myVar2;
11 printf("myVar1 =%d\n",myVar1);
12 printf("myVar2 =%d\n",myVar2);
13 }