Why is function mentioned in global declaration?
Those are called function prototypes.  They mean "These functions exist somewhere else".  That "somewhere else" could be later on in the same file, or a different file entirely.

Usually these kind of things are provided by header (.h) files, or are automatically created (for functions in the INO file) by the IDE and hidden from you, so you never really see them. But if you're not using the IDE then you need to have them so your code (which is parsed linearly) knows that these functions exist before the parser comes across them.