C++ Functions: Presented by Kathryne Tarrayo and Jester Tiu
C++ Functions: Presented by Kathryne Tarrayo and Jester Tiu
{
statement;
function1();
return;
function2(); function3();
statement
function2(); statement
statement; function3();
return 0;
} return;
User-defined Function
It consist of the following:
Function Names,
Function Body,
Return Values,
Parameters,
Arguments
return_type function_name ( parameter list )
“
name and the parameter list together
constitute the function signature.
“
will have to call or invoke that function.
When a program calls a function,
program control is transferred to the
called function.
variable_name
Return Statement − A
“
function may return a value.
Some functions perform the
desired operations without
returning a value.
“
“
Library function
Library function
• Library functions are the built-in function in C++
programming.
• Programmer can use library function by invoking
function directly; they don't need to write it
themselves.
• Completely debugged, efficient and always
produce a precise output.
• We need not to declare and define these functions
as they are already written in the C++ libraries
such as iostream, cmath etc.
• Can directly call when needed.
“
Examples of built-in functions
TITLE DESCRIPTION