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

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -