Tous les livres

Professionnel

Applis À propos Coach Connexion Commencer la lecture

Computer Science · Glossaire

Qu'est-ce que « Function declaration, function definition » ?

Aussi appelé : function declaration · prototype · function definition

Definition 3.1 University Computer Science — Year 1 · Chapitre 3 — Functions and the Call Stack

A function declaration, or prototype, gives a function’s name, the types of its parameters and the type of its result, followed by a semicolon: int digit_sum(unsigned n);. A function definition gives the same heading followed by the body between braces. A function has exactly one definition in a program, and may be declared many times; every call must come after a declaration or the definition.

Lire dans le chapitre →