Page 15 - 6437
P. 15

#include <stdio.h>


                            // Variable

                            declaration:
                            extern int a, b;

                            extern
                            int c;

                            extern
                            float

                            f;


                            int main ()
                            {

                              /* variable
                              definition: */ int

                              a, b;
                              i

                              n
                              t

                              c
                              ;

                              f
                              l

                              o
                              a

                              t

                              f
                          When the above code is compiled and executed, it produces the following result:

                 value of c : 30
                 value of f : 23.333334


                          The same concept applies on function declaration where you provide a function name at
                   the time of its declaration and its actual definition can be given anywhere else. For example:







                                                                                                      17
   10   11   12   13   14   15   16   17   18   19   20