If the function is not a void function then the code

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: rn type goes before the od od function name. If the function is not a void function, then the code inside the function must use r t r somew here, returning a value of the proper type. A void function does not need the eun r t r command; it can include the r t r command (this causes the function to finish) but eun eun cannot use r t r to return a value. eun A function may have arguments. But it need not. A function that has no arguments has empty parentheses. A function that has two i targuments would have i t x i t yin the parentheses. n n ,n The xand yare usually not typed in the function prototype (though they can be). The xand y should be included, however, when the function is being defined. The xand yvariable names exist only inside the function. Assume a function is called a dand it d takes two i targuments. This is what it looks like: n itadita itb n d(n , n ) { rtr ab eun +; } Then when the function is called (say, from some code in m i ( ), two integer values must be an) provided: a d 4 1 )(the resul...
View Full Document

This note was uploaded on 05/23/2013 for the course CSE 203 taught by Professor Eckroth during the Spring '10 term at Ohio State.

Ask a homework question - tutors are online