Category: Function prototypes in C++

Function-Prototypes-in-Cpp 1

Function Prototypes in C++

All the functions in C++ (which are used first and defined later in the program) need to be prototyped. Function prototypes are usually written at the beginning of the program, ahead of any programmer-defined functions (including main()). The general form of a function prototype is: data-type function_name(type 1 arg 1, type 2 arg 2, …, type n arg n); Where, data-type represents the data-type of the item that is returned by the function, function_name represents the function name, and type 1, type 2, …, type n represents the data-type of the arguments arg 1, arg 2, …, arg n. Notice...