My goal is to make a static variable 'val' available to a different .c file (just for experimentation) .
so i made a global pointer which holds the address of the static variable, and by this global pointer, i am trying to access the static variable's value in another file .
static int val=33; int *ptr; ptr = &val;
gives me error.
while if i do it like this, it works .
static int val=33; int *ptr = &val;