implicit vs explicit declaration


unschoolingcode

If a  function is declared at run time it is called implicit declaration.

Here the function multiply() is said to be implicitly declared because the function is not declared above main() function.But still the function works fine(depends on the compiler).Had the function multiply() declared before main() function there would be no error with the old compiler though it works perfectly fine with the higher version of compiler.And also in such case the function is said to be explicitly declared.

so,whats this implicit and explicit declaration?
If you first declare the function and then call later, it is called explicit declaration
If your function is directly called before previous declaration, it is called implicit declaration.

example:

Here you added the function declaration before main function.So,its explicit declaration.

View original post

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s