Tuesday, 25 August 2015

Why do you need to include function prototypes in a program that contains user-defined Functions

You could place all the code in a structured C++ program in main(); but even if the program is relatively small, main() could have hundreds of lines of code; some of this code may be repetitive; and most of it would be difficult to read, maintain, change; the best way to develop and maintain a program is to break to down into smaller, named procedures that perform specific tasks; these procedures are called  functions; functions make code more manageable and easier to read.

No comments:

Post a Comment