day7 coding: 变量存储、预处理

This commit is contained in:
2023-07-11 19:52:53 +08:00
parent 1ad50f4df7
commit ff10f99477
22 changed files with 302 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
#include "a.h"
int sum(int a, int b)
{
return a + b;
}
int sub(int a, int b)
{
return a - b;
}
+4
View File
@@ -0,0 +1,4 @@
#include <stdio.h>
extern int sum(int, int);
extern int sub(int, int);
+9
View File
@@ -0,0 +1,9 @@
#include "./a.h"
int main(int argc, char const *argv[])
{
int ret = sum(100, 200);
printf("100 + 200 = %d\n", ret);
printf("ret - 60 = %d\n", sub(ret, 60));
return 0;
}