A function declaration identifies a function, while a function definition adds the function body. In C, the declaration and the body together specify what the function does; the body is written as a compound statement enclosed in braces. section 2.1 section 2.3
A function definition
int main(int argc, [[maybe_unused]] char* argv[argc+1]) { ... } Here, the declaration begins with the return type and function name, includes the parameter list, and is followed by braces containing the function's code. The special function main must be present because it starts program execution. section 2.1 section 2.3
Keep these distinctions in view:
- A declaration specifies the identifier and the kind of entity it refers to. section 2.3
- A function has a definition when its declaration is followed by braces containing its code. section 2.3
- The function body describes the operations the function is supposed to perform. section 2.1





