Skip to content

Functions, parameters, and return values · ⁨函数、参数与返回值⁩

English

Why functions

  • A function is a named piece of work. You write it once and call it whenever you need it.
  • Functions keep programs short and clear, and let you build big jobs from small ones.
  • You have already used printf — a function from <stdio.h>. Now you write your own.
中文

为什么要用函数

  • 函数是一段有名字的工作。你只写一次,需要时就调用它。
  • 函数让程序更短、更清晰,也让你用小的工作拼出大的工作。
  • 你已经用过 printf —— 它是 <stdio.h> 里的一个函数。现在你来写自己的。

Handout

Log in or create account · ⁨登录或创建账户⁩

IGCSE, A-Level · ⁨IGCSE、A-Level⁩ & AP · ⁨与 AP⁩