To understand the nouns, let's focus on the verbs first.
declare - to announce officially; proclaim
define - to show or describe (someone or something) clearly and completely
So, when you declare something, you just tell what it is.
// declaration
int sum(int, int);
This line declares a C function called sum
that takes two arguments of type int
and returns an int
. However, you can't use it yet.
When you provide how it actually works, that's the definition of it.
// definition
int sum(int x, int y)
{
return x + y;
}