Declarations is specifying the properties of an identifier. In c++, the declaration have five parts:
• Optional prefix specifiers like static, extern etc
• A base type like int, char, const float etc
• A declarator like p[7] , n etc
• Optional suffix function specifiers like const, noexcept etc
• An optional initializer or function body like =34, (2), {1}, { return 1;} etc
A specifier is an initial keyword, such as virtual, extern or constexpr that specifies some non-type attribute of what is being declared.
So, Any declaration whether it is variable or function will have above five parts which three are optional parts.
e.g.
static int function() const { return x; }
int a = 12;
Except for function and namespace definitions, a declaration is terminated by a semicolon.