In C, what are the differences between the # include command and the # include command?

Source: Internet
Author: User

A: "# include <stdlib. h>" is used for the standard library file or the header file provided by the system. You can find the header file at the location where the system standard header file is saved.

And "# include" userdefined. H "for user-defined header files, first from the current directory to find whether there is a specified name of the header file, if the current directory does not find this header file, then from the standard file directory to find. These two methods have their essential differences.

The header files included in the C language program can be divided into the system standard header files and custom header files in the user project. The system standard library header files can be included in these two methods, however, we recommend that you use the first method to save time. Only the second method can be used to include custom header files (stored in the project path, otherwise, an error occurs. (You can also place the header files required in the project you have defined under the path of the standard header file, but this is against the regular operation ).

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.