its #include%26lt;stdio.h%26gt;
In 'C 'headerfile this way is cuurect or not Q:#include"stdio.h"?
Both #include%26lt;stdio.h%26gt; and #include "stdio.h" are correct.
The difference between both is very fine but useful i.e
When you use %26lt;stdio.h%26gt;, the C Preprocessor searches for the file in the standard "Include" directory i.e. for example if you have C in a directory called c:\turboc2\ then there is a directory called "Include" which stores all header files. This is the default location where the file is searched for when you write %26lt;stdio.h%26gt; .This is mostly the requirement of a programmer.
But, when you write "stdio.h" , the file stdio.h is searched in whole directory of c:\turboc2 including all subfolders. This may be the case when you define your own headers and you do not store them inside the Include directory.
Thus either you write %26lt;stdio.h%26gt; or "stdio.h" the file still gets included ( unless the header is not present ), but the difference between them is very fine.
Hope It will help.!!!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment