28 views3 pages

Document Summary

-a piece of code to accomplish specific task. For examples: pow() and sqrt(), found in math. h. - it follows the divide and conquer paradigm. Recursively break down a problem into two or more sub problems of the same or related type, until these become simple enough to be solved directly. -abstraction: process by which data and programs are defined with a representation that emphasizes its meaning, while hiding the implementation details. - writing programs as a collection of function calls, makes it easier to write, debug and maintain. - choose a name that expresses what the function does. If not possible, break the function into smaller functions(decomposition) - a large number of arguments, may indicate that the function is trying to do so much; break it in smaller pieces. *- return-data-type indicates the type of value that function should be. *- parameter list is a comma separated list, that should be passed to the function when it is called.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents