Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

What is the difference between #include <file> and #include ?file?
In C we can include file in program using 2 type:
1.#include<file>
2.#include?file?

1.#include<file>:In this which file we want to include surrouded by angled brakets(< >).In this method preprocessor directory search the file in the predefined default location.For instance,we have given include variable
INCLUDE=C:COMPILERINCLUDE;S:SOURCEHEADERS;
In this compiler first checks the C:COMPILERINCLUDE directory for given file.When there it is not found compiler checked the S:SOURCEHEADERS directory.If file is not found there also than it checked the current directory.

#include<file> method is used to include STANDARDHEADERS, like:stdio.h,stdlib.h. 

2.#include?file?:In this which file we want to include surrouded by quotation marks(" ").In this method preprocessor directory search the file in the current location.For instance,we have given include variable
INCLUDE=C:COMPILERINCLUDE;S:SOURCEHEADERS;
In this compiler first checks the current directory.If there it is not found than it checks
C:COMPILERINCLUDE directory for given file.When there it is not found compiler,than checked the S:SOURCEHEADERS directory.

#include?file?method is used to include NON-STANDARDHEADERS.These are those header files that created by programmers for use .