I did that, but I got "[Linker error] undefined reference to `function_name'".
I used Dev-C++ compiler.

I did a simple code.
Code:
/*
* add.h
*/
#ifndef ADD1_H
#define ADD1_H

int addnum(int a, int b);


#endif
Code:
/*
* add.c
*/
#include "add.h"

int addnum(int a, int b)
{
return a+b;
}
Code:
/*
* main.cpp
*/
#include <stdio.h>
#include "add.h"

int main (void) {
int i,j,z;
i=4;
j=5;
z = addnum(i,j);
printf("%d\n", z);
return 0;
}