Page 25 - 6437
P. 25

printf("count is %d\n", count);

                            }

                          Here, extern is being used to declare count in the second file, whereas it has its definition
                   in the first file, main.c. Now, compile these two files as follows:


                  $gcc main.c support.c

                          It will produce the executable program a.out. When this program is executed, it produces
                   the following result:
                            5


































































                                                                                                      27
   20   21   22   23   24   25   26   27   28   29   30