Define Function Prototype | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Define Function Prototype

explain briefly

13th Apr 2019, 7:57 AM
Josy Skymax
Josy Skymax - avatar
2 Answers
+ 4
A function prototype is the same as a function declaration. It looks like the actual function definition without the function body (and the parameter names can be missing). Function definition with function body: int add(int a, int b) { // function body return a+b; } Function declaration / protoype: int add(int, int);
13th Apr 2019, 9:49 AM
Anna
Anna - avatar
+ 2
Like the header of a function giving it's name and types of input and output data.
13th Apr 2019, 1:50 PM
Sonic
Sonic - avatar