Defining of Functions in C++

A function definition has two principal components: the first line (including the argument declaration), and the body of the function In general, the first line can be written as: 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. The data-types are assumed to be of the type int if they are not shown explicitly. However, the omission of the data type is considered poor programming practice, even if the data items are integers. The arguments are called formal arguments, because they represent the names of the data items that are transferred into the function from the calling portion of the program. The names of...