top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

What is the difference between include <> and include "" in C and what is the recommended way?

+2 votes
80 views
What is the difference between include <> and include "" in C and what is the recommended way?
posted Aug 6, 2015 by anonymous

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

2 Answers

+2 votes

If a developer has created a header file then he should use " " and also should include the path while compiling the code.
In company level project, it is very common to find user defined header files and use of " " in .c files .

Double quotes " " instructs compiler to search for header files in user defined path and look into standard path if header file is not found. Angular brace <> is used when a standard header file is included in a program. And compiler also looks into standard path of header file.

answer Aug 6, 2015 by Harshita
+1 vote

Its a way of telling the compile to look for the header file i.e filename.h in to respective directory.
So, If you are including a header file using " " then at the time compilation the compiler looks for the header file into the current directory and if the header file is not found there then it will look into the standard include directory.
while if you have included the header file using < > then the compiler looks for the header file into the standard include directory.

answer Aug 7, 2015 by Arshad Khan
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...