Browse Source

添加c文件

master
永攀 张 2 days ago
parent
commit
926e0d129c
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      hello.c

+ 1
- 0
hello.c View File

@@ -9,5 +9,6 @@ int main() {
MathFunc f = add; // 将加法函数赋值给函数指针
int result = f(3, 5); // 通过函数指针调用加法函数
printf("3 + 5 = %d\n", result); // 输出:3 + 5 = 8
result = f(2,8);
return 0;
}

Loading…
Cancel
Save