0

The statement says "declare" a function... but i think should be "defining"

difference between declaring and defining

11th Nov 2016, 8:06 PM
Diego
Diego - avatar
2 Answers
+ 1
function declaration includes only type of function, its name and types of arguments, while the definition describes the logic and behavior of function. for example, "int sum (int a, int b);" is declaration, and definition of it will be later, for example, as "int sum (int a, int b) { return a+b; }"
11th Nov 2016, 9:46 PM
Nick V. Kondratiev
Nick V. Kondratiev - avatar
0
declaring a function is saying there is a function. defining the function is saying how the function works.
12th Nov 2016, 5:04 AM
kiwiyou
kiwiyou - avatar