From 8585123ed1634036206cd2a4a171b6df4a83296d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mert=20G=C3=B6r?= Date: Tue, 19 Aug 2025 19:39:53 +0300 Subject: [PATCH] print example --- c-basic/main.c | 5 +++-- c-basic/myprint.c | 13 +++++++++++++ c-basic/myprint.h | 6 ++++++ 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 c-basic/myprint.c create mode 100644 c-basic/myprint.h diff --git a/c-basic/main.c b/c-basic/main.c index fcdb9aa..a6606cc 100644 --- a/c-basic/main.c +++ b/c-basic/main.c @@ -1,10 +1,11 @@ -#include "foo.h" +#include "myprint.h" int main() { - foo(); + myprint(); return 0; } + diff --git a/c-basic/myprint.c b/c-basic/myprint.c new file mode 100644 index 0000000..5945aa2 --- /dev/null +++ b/c-basic/myprint.c @@ -0,0 +1,13 @@ +#include +#include "myprint.h" + +int myprint() { + + int a = 10, b = 20; + + printf("a = %d, b = %d\n", a, b); + printf("a = %d, b = %d\n", b, a); + printf("%d%d\n", a, b); + + return 0; +} diff --git a/c-basic/myprint.h b/c-basic/myprint.h new file mode 100644 index 0000000..9fcc774 --- /dev/null +++ b/c-basic/myprint.h @@ -0,0 +1,6 @@ +#ifndef MYPRINT_H +#define MYPRINT_H + +int myprint(); + +#endif