208 Day 13 Functions3 - 4002-208 Intro to Prog[in C Day 13...

Info icon This preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
4002-208 Intro. to Prog. [in C++] Day 13 Yet More on Functions
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Objectives Review of Functions Storage classes Scope Rules Separate Compilation using projects 4002-208 2
Image of page 2
Writing a function Function header Return type or void if no return type Name of function ( 0 or more parameters separated by commas ) Examples double doIt(int x, double y) void doSomething(double a, int n) 4002-208 3
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Writing a function (cont.) Function body { Block of code } If a function has a return type, there must be a return statement return expression_to_be_returned ; If a function has void return type, the } acts as the end of the function or a return; 4002-208 4
Image of page 4