Hello,all.
I have just writed a example for practice the key word "extern" which is used in aspect of function.
I typed it in a file that named main.c and the codes are shown as in following.

error info:
Code:
/tmp/......
undefined reference 'ret'
main.c:
Code:
#include <stdio.h>

extern int ret(int);

int main(void)
{
      int   i,j;
      printf("i:");
      scanf("%d",&i);
      j=ret(i);
      printf("\n%d\n",j);
      return 0;
}
test.c
Code:
int ret(int a)
{
     return a*a;
}