1. 程式人生 > >static extern

static extern

code pre ati clu col nbsp extern sta include

/*主程序在a.c*/

//a.c

#include <stdio.h>
#include "b.h"

main(){
printf ("%d\n",a);
a=32;
printf ("%d\n",a);
bb();
}

//a.c end

//b.h

int a;
void bb(void);

//b.h end

//b.c

#include <stdio.h>
#include "b.h"

static int a=3;

void bb(void){
printf ("%d\n",a);
}

//b.c end

static extern