Arrays, parameter passing, pointers and dynamic allocation. - ELIS
Arrays, parameter passing, pointers and dynamic allocation. - ELIS
Arrays, parameter passing, pointers and dynamic allocation. - ELIS
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
S Example:<br />
int boxVolume(int side) {<br />
}<br />
return side * side * side;<br />
Functions<br />
S Need to declare a function before it is used. If a function is<br />
defined later than it is used, provide function prototype at<br />
top:<br />
S int boxVolume(int);<br />
S int boxVolume(int side = 1); //can specify default <strong>parameter</strong>s<br />
13