瀏覽代碼

添加c语言

master
永攀 张 3 天之前
父節點
當前提交
d58ce75182
共有 1 個檔案被更改,包括 13 行新增0 行删除
  1. +13
    -0
      hello.c

+ 13
- 0
hello.c 查看文件

@@ -0,0 +1,13 @@
int add(int a, int b) {
return a + b;
}




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

Loading…
取消
儲存