c - why include standard header files? -


What is the reason for including standard header files in C such as stdio.h Stdlib.h and more. The GCC compiler only shows a warning and it clearly declares, such as

the pseudo declaration of the function 'printf'

and the program is successfully executing Is ...
Instead of removing the warning, is there a reason to include header files?

Okay, of course there is no reason.

The reason for this is that with the header, you get appropriate announcements, otherwise you get the vested announcement where to return every function int Because there are many functions (for example) that do not return int , assuming they can be very harmful.

With the declaration function, the compiler can actually examine the logic that returns the value of the return according to the use, which is very good.

In addition, in such cases, the headers declare the data type, enumeration and so on, which in the headers is more than the function.

Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -