CS136 Lecture Notes - Lecture 11: Function Pointer, Maintainability, Semicolon

71 views7 pages

Document Summary

Function pointer: stores the (starting) address of a function. Modularization (libraries: primary purpose is to provide functions, re-usability, maintainability, abstraction, provide elements that are not function. Variables: there much be a root (main file) The program file that defines main and runs. Thursday, february 8, 2018: no dependency cycle. Calling module functions: function have to be declared before use. Declaration: includes both the return type and the parameter types. (just saying exist and here is the type: identifier can be declared multiple times. Definition: instructs c to create the identifier. Create space in memory or initialize with some value: definition includes declaration, identifier can only defined once. Function declaration: simply the function header followed by a semicolon; Thursday, february 8, 2018: a declaration is necessary to implement mutual recursion (might not do in 136) Thursday, february 8, 2018: s t a r t s w i th the extern keyword, and is not initialized.

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