diff --git a/c-basic/foo.c b/c-basic/foo.c new file mode 100644 index 0000000..af54fe7 --- /dev/null +++ b/c-basic/foo.c @@ -0,0 +1,7 @@ +#include + +int foo() { + printf("I am foo\n"); + + return 0; +} diff --git a/c-basic/foo.h b/c-basic/foo.h new file mode 100644 index 0000000..4ec598a --- /dev/null +++ b/c-basic/foo.h @@ -0,0 +1,6 @@ +#ifndef FOO_H +#define FOO_H + +int foo(); + +#endif diff --git a/c-basic/main.c b/c-basic/main.c index 2f1ce6c..450c2ea 100644 --- a/c-basic/main.c +++ b/c-basic/main.c @@ -1,8 +1,8 @@ #include +#include "foo.h" int main() { - - printf("hello world year 2025 !\n"); - - return 0; + foo(); + + return 0; }