answersLogoWhite

0


Best Answer

You can include a file with the #include directive at any place you want to. You just have to consider that the compiler will see the total source file as if you had copied the contents of each include file at the point where you included it, and it will parse and process the total source file accordingly.

That said, header files, a subset of included files, are generally #include'd at the top of the source file. Again, it all depends on what is in the include file.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

If you wanted to ask whether an #included file can contain other #include directives, then the answer is yes.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Where you can include a header file in the program?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How is the header file include within a program?

#include or#include "nameoftheader"


What is another name for an include file in c program?

Include files are also known as header files.


How can you create a c program without using header file?

C programs do not require header files. If you want a C program without header files, you can simply not create them. However, you may or may not be able to include your non-header file source files.


How do you include classes and structures in header files in c plus plus?

Classes and structures can be put in a header file the same way you would use them in a main program; the only difference is that they are placed in a separate file, called a header file. Then, after creating a new file, include that new file with the definition by the use of the preprocessor #include statement.


Which header file needs to be included in a program that uses the data types ifsteam and ofsteam?

#include <fstream>


Can you use header files on the bottem of the program?

You can use header files (more specifically "include" files) anywhere in a program. You just have to consider what type of statements, declarative or definitive, there are in the include file, and what your effective scope is. That is why they are generally at the top.


How do you include a system header file called sysheader.h in a c source file?

There is no system header called share.h, but if there were, it would be: #include <share.h>


How do you create a user defined header file?

Header files are not much different from usual cpp files. There are basically two different things. It's file extension: you need to choose "header file" when you create it or save as .h file. Second is header files do not have main() function. When you are done with you header file do not forger to include it in your project by writing preprocessor directive:#include "your_header_file.h"


What is the use of myconstant.h header file?

You can include it into your source.


What should be the header file for printf?

# include <stdio.h>


What should be header file for printf?

#include <stdio.h>


Can you compile program without header file?

Yes,we can compile our program without header file without any error,but we can not use any predefine functions like printf,scanf.