Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



What are the File Inclusion directives in C?

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 22-01-2010
Member
 
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!

Reply With Quote
  #2  
Old 22-01-2010
Member
 
Join Date: May 2008
Posts: 2,291
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"-'
Reply With Quote
  #3  
Old 22-01-2010
Member
 
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.
Reply With Quote
  #4  
Old 22-01-2010
Member
 
Join Date: Oct 2005
Posts: 2,389
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"
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "What are the File Inclusion directives in C?"
Thread Thread Starter Forum Replies Last Post
Inclusion Property in Multilevel Caches Charioteer Motherboard Processor & RAM 4 22-09-2010 02:53 PM
What is the core php.ini directives? Dwarner Software Development 4 27-02-2010 11:25 PM
What are the conditional compilation directives in C? Tailor Software Development 3 22-01-2010 07:56 AM
What are the Miscellaneous directives in C? D-Mon Software Development 3 21-01-2010 08:49 AM
Paint.NET inclusion of a graphic into a PPT presentation CLONEOPS Windows Software 3 21-11-2008 04:19 PM


All times are GMT +5.5. The time now is 01:57 PM.