//extern.c
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
extern int multiply();
extern int sum();
int a, b;
int result;
printf("Please input a and b: ");
scanf("%d, %d", &a, &b);
result = multiply(a, b);
printf("The result of multiply is: %d",result);
result = sum(a, b);
printf("\nThe result of sum is: %d\n", result);
system("pause");
return 0;
}
//file.c
#include <stdio.h>
extern int multiply(int a, int b)
{
int c;
c = a * b;
return c;
}
//file2.c
#include <stdio.h>
extern int sum(int a, int b)
{
int c;
c = a + b;
return c;
}
|