Results 1 to 4 of 4

Thread: What are the File Inclusion directives in C?

  1. #1
    Join Date
    Jan 2010
    Posts
    26

    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!

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    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"-'

  3. #3
    Join Date
    Nov 2005
    Posts
    1,323

    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.

  4. #4
    Join Date
    Oct 2005
    Posts
    2,393

    Directives in C :

    I think you have to go through the following code of lines that will help you. Example : The following file defs.h contains several definitions and an inclusion of an additional file of declarations:
    /* defs.h */
    #define TRUE 1
    #define FALSE 0
    #define BUFFERSIZE 612
    #define MAX_ROW 77
    #define MAX_COLUMN 90
    int hr;
    int mins;
    int secs;
    #include "mydefs.h"
    You can also embed the definitions that will appear in defs.h with the following directive:
    #include "defs.h"

Similar Threads

  1. Inclusion Property in Multilevel Caches
    By Charioteer in forum Motherboard Processor & RAM
    Replies: 4
    Last Post: 22-09-2010, 02:53 PM
  2. What is the core php.ini directives?
    By Dwarner in forum Software Development
    Replies: 4
    Last Post: 28-02-2010, 12:25 AM
  3. What are the conditional compilation directives in C?
    By Tailor in forum Software Development
    Replies: 3
    Last Post: 22-01-2010, 08:56 AM
  4. What are the Miscellaneous directives in C?
    By D-Mon in forum Software Development
    Replies: 3
    Last Post: 21-01-2010, 09:49 AM
  5. Paint.NET inclusion of a graphic into a PPT presentation
    By CLONEOPS in forum Windows Software
    Replies: 3
    Last Post: 21-11-2008, 05:19 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,943,284.20995 seconds with 17 queries