Page 71 - DCAP404 _Object Oriented Programming
P. 71
Object-oriented Programming
Notes {
…
one(); //Correct!! Function one is defined before calling
…
}
Another elegant alternative to this problem is to include a function prototype before it called no
matter where the function has been actually defined as shown below:
void one(void); //prototype of function one()
void main()
{
…
one(); //Correct!! Function one is defined before calling
…
}
void one()
{
//function definition
}
Did u know? What are function signatures?
The portion of a function prototype that includes the name of the function and the types of
its arguments is called the function signature or simply the signature.
Self Assessment
Fill in the blanks:
13. A default parameter is a function parameter that has a ……………………. value provided
to it.
14. Default arguments facility allows easy development and ………………………. of programs.
15. Function-prototype are usually written at the …………………… of a program.
Caselet IEEE Tutorial on Advanced Computing
he IEEE Computer Society and IEEE Kerala Section have announced a one-day
tutorial in the series, “Frontiers in computing practice: AOP and JML - Novel
Tprogramming paradigms for the Java programmer.”
Contd...
64 LOVELY PROFESSIONAL UNIVERSITY