You need to write a header file (.h) with the function prototype for your second function in it, and include the header in your main code, just like you did the stdio.h header...
Code:
// functions.c
int fun(double k) {
return k;
}
Code:
// functions.h
#ifndef FUNCTIONS_H
#define FUNCTIONS_H
int fun(double k);
#endif // functions_h
Code:
// main.c
#incldue <stdio.h>
#include "functions.h"
int main() {
printf("%d",fun(22));
return 0;
}
Then you need to compile both .c files as part of the same project, and link them together into your executable ... The exact mechanism for that is IDE/Compiler specific so you may want to cruise your help files for answers...