logo

Global functions in multi-file projects in C

#include <stdlib.h> #include <stdio.h> #include "global.h" int otherFunction(int x, int y); int otherFunction2(int x, int y); int main(int argc, char* argv[]) { printf("Sum from main is %d\n", getSum(15, 20)); printf("Sum from main2 is %d\n", otherFunction(20, 20)); printf("Sum from main3 is %d\n", otherFunction2(25, 20)); return 0; }