Create a header file for the function prototypes and data declaration, a source file for the function definitions, and a source file for your main.
functions.h
Code:
#ifndef FUNCTIONS_H
#define FUNCTIONS_H
#define ASIZE 5000
int number = 0; /* Global int declaration */
struct data
{
int key;
char *word;
} Data;
/* Functions Prototype */
void function1();
int function2 ();
void function3();
#endif /* FUNCTIONS_H */
functions.c
Code:
#include "functions.h"
/* Functions */
void function1()
{
return;
}
int function2()
{
.....
}
void function3()
{
}
maindriver.c
Code:
#include <stdio.h>
#include "functions.h"
/* Main Program */
int main( void )
{
// main program here......
// and here here here....etc etc
return 0;
}
David