Tuesday 14 May 2013

External Linkage

Here let us discuss about  what is external linkage ? .

In global scope, identifiers for the following kinds of entities declared without the static storage class specifier have external linkage:
  • Anobject --- variable
  • A function -- always external, there is no function can be defined within another function 
External linkage is just a linkage for the function declared in another file, means references to the same name..


We can do consider soft links - can say symbolic soft link

ln -s dest src file

here we create symbolic link for the file exists. it just a replicate of existing file, for convenient and version library changes we create symbolic links .. however the reference to the library is same ...

I think this would be best example for the external linkage ..

External linkage - is a linkage to the global scope identities declared on different files.

Ex:  extern int sum(int); extern int number;

 

No comments:

Post a Comment