Thursday, 26 April 2012

FORWARD REFERENCE In C | Hinting In C

During Declaration space is never reserved for the variable or instance in the program's memory; it simply a hint to the compiler that a use of the variable or instance is expected in the program. This hinting is technically called "forward reference"

Example : STANDARD C LIBRARY contains definition of header files whereas #include<stdio.h> is just a declaration.


During declaration we tell about the datatype of Variable used. While definition the value is initialized.
Declaration can done only once in the program whereas Definition can occur many times in the program.

EXAMPLE :        int a;            // declaration

                          int a=421;    // definition


0 comments:

Post a Comment