Professional Documents
Culture Documents
Computer Programming
(CSC425)
by
PUAN AFIZA ISMAIL
Faculty of Computer & Mathematical Sciences
UiTM MALAYSIA
2013
1
Function I
Chapter 6
2
Contents
6.1 Introduction
6.2 Function and parameter declaration
- Predefined function
- User-defined function
- Function prototype
- Flow of execution
Called modules
pow(x,y) :
floor(48.79) is 48.0
functionType functionName()
functionName()
October 1, 2013 CSC425 : INTRODUCTION TO COMPUTER 15
PROGRAMMING
6.2
Function and parameter
declaration (cont.)
User-defined function :
return statement :
Once the function computes the value, the function
returns the value via the return statement
The syntax of the return statement is: