Source file One.c
int multiply(int a, int b)
{ return a * b; }
Header file One.h
#ifndef ONE_H
#define ONE_H
int multiply(int a, int b);
#end if
File Main.c
#include <stdio.h>
#include "one.h"
int main (void)
{
int x = 10;
int y = 20;
int result;
result = multiply(x,y);
printf("The result is %d",result);
return 0;
}
Make a new console project.
Add both .c files.
Build
Run
see Result = 200