From 74819d23befe6344eb2ad0c3efbfe727bebb4100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=9E=A5=EC=9B=90?= <wkddnjs3268@ajou.ac.kr> Date: Thu, 6 Aug 2020 16:40:28 +0900 Subject: [PATCH] 8.5 --- 8.5/three_files/func.c | 11 +++++++++++ 8.5/three_files/func.h | 3 +++ 8.5/three_files/main.c | 18 ++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 8.5/three_files/func.c create mode 100644 8.5/three_files/func.h create mode 100644 8.5/three_files/main.c diff --git a/8.5/three_files/func.c b/8.5/three_files/func.c new file mode 100644 index 0000000..8f2a8a6 --- /dev/null +++ b/8.5/three_files/func.c @@ -0,0 +1,11 @@ +#include "func.h" + +int func1(int a) +{ + return (a * 10); +} + +int func2(int a) +{ + return (a * 2); +} \ No newline at end of file diff --git a/8.5/three_files/func.h b/8.5/three_files/func.h new file mode 100644 index 0000000..0aa7479 --- /dev/null +++ b/8.5/three_files/func.h @@ -0,0 +1,3 @@ +#pragma once +#define DF(a) ((a)*(a)) +extern int func1(int x); \ No newline at end of file diff --git a/8.5/three_files/main.c b/8.5/three_files/main.c new file mode 100644 index 0000000..2f2c882 --- /dev/null +++ b/8.5/three_files/main.c @@ -0,0 +1,18 @@ +#include <stdio.h> +#include "func.h" + +int func_name_or_id() +{ +#ifdef PRINT_ID + printf("201920756"); + return 0; +#else + printf("�����"); + return 1; +#endif +} + +int main() +{ + func_name_or_id(); +} -- GitLab