Listing 5 Links with linkage2.c

/* linkage1.c */

#include <stdio.h>

static void fl(int);
static void f2(void);

main()
{
   extern void fl(int);   /* Internal Linkage */
   extern void f2(void);  /* Internal Linkage */
   extern void f3(void);  /* External Linkage */
   
   f1(23);
   f2();
   f3();
   return 0;
}

int i = 13;                /* External Linkage */

static void fl(int i)      /* Internal Linkage */
{
   for (;;)
   {
      float i = 33.0;     /* No Linkage */
      
      printf("%f\n",i );
      goto exit;
   }

exit:                      /* No linkage */
   printf("%d\n", i );
}

static void f2(void)       /* Internal Linkage */
{
   printf("%d\n",i );
}

/* Output:
33.000000
23
13
16
*/

/* End of File */