What are the complete rules for header file searching?



What are the complete rules for header file searching?..

Answer / Saurabh Sharma

In C, the header files are searched using a predefined sequence of directories. Here's the standard search order: 1) The directory containing the current file (where your .c or .h file is located). 2) The set of include paths specified with the -I option to the compiler. 3) An implementation-defined set of system directories. When including a header, if it's not found in the standard search order, compilation errors occur.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What is the difference between exit() and _exit() function in c?

1 Answers  


Explain what are binary trees?

1 Answers  


Add Two Numbers Without Using the Addition Operator

1 Answers  


What is restrict keyword in c?

1 Answers  


what is the purpose of the code, and is there any problem with the code? int f( int n, int l, int r ) { return (n << l) >> r; }

2 Answers   Google,


What is the exact difference between '\0' and ""

3 Answers  


Explain what is the difference between a free-standing and a hosted environment?

1 Answers  


How can you determine the maximum value that a numeric variable can hold?

1 Answers  


Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.

1 Answers  


What is union and structure?

1 Answers  


How can I set an array's size at run time?

9 Answers  


what is a NULL Pointer? Whether it is same as an uninitialized pointer?

1 Answers   TISL,


Categories