0

Why we need to declare a function

C language What is the point in declare a function before the description when it can run without it.

23rd Apr 2019, 2:45 PM
eilon toledano
2 odpowiedzi
+ 2
Imagine you have two functions that call each other. But if the called function is not at least declared yet, you'll get an error when the name comes up in a function body. By declaring everything at the top, these things don't matter any longer. (This is one of the points.)
23rd Apr 2019, 6:16 PM
HonFu
HonFu - avatar
0
if I get you right, you're trying to say, why not just write everything at the top there, why bother declare and then give description, that depends on your choice, either way works fine to me
23rd Apr 2019, 8:04 PM
✳AsterisK✳
✳AsterisK✳ - avatar