Answer
A function is a named unit of C code that can receive arguments and return a value. • Its function type describes parameter and return types. • A declaration makes the function type known before a call. • A function returning void does not return a value to its caller.
💡 C Example
int add(int left, int right) {
return left + right;
}
int main(void) {
return add(2, 3) == 5 ? 0 : 1;
}
⚡ Quick Revision
A function packages callable behavior with a declared type.