I just talking with a colleague (University instructor) who teaches C (Fundamental of programming Course). He said I won't give score to a student, if he uses I/O (scanf or printf or cin count) in a function (it shows he hasn't understood it well) or if he writes a function which does two things (for example to return the maximum of an array, he shouldn't sort the array and return the first element, however he can use two functions, one for sorting and another for returning the first element ...)... I thought these are related to his teaching method but he claimed they are the principles of functions in structured programming.Are there really such constraints and definitions for functions? What are those?If yes, in which topic are they discussed?  Should they be discussed in a C or C++ teaching course?
Are there constraints for functions in structured programming?
functions;definition