What are the File Inclusion directives in C?
Hi, I am the student of first year of MCA. I don't have the knowledge C language. I have the C language related stuff in in syllabus. But I want to know about the File Inclusion directives in C. I want to know the what are the uses of File Inclusion directives in C and How they can work. I also want to know how can I make the use of File Inclusion directives in C program. So, Is there Anyone who can help me? If you have the answer then reply me. Than you!
File Inclusion directives
Hi, I think atleast you heard about the preprocessor directives. A File Inclusion Directive is the preprocessor directive. File Inclusion directive causes the preprocessor to replace the directive with the contents of the specified file. File Inclusion directives are represented by the #include. File Inclusion directives has the following syntax :
>>-#include--+-<filename>-+------------------------------------><
'-"filename"-'
Usage : File Inclusion directives
Hello, I suggest you to use the File Inclusion directives when you are working on the large project that contains large number of lines. So, If there are a number of declarations used by several other files then you can place all these definitions in one file and #include that file in each file that uses the definitions. For example :
#include <stdio.h>
#include "myheader.h"
Hope you understand form the above example.