Topic 2 Flashcards
It is a group of statements that performs particular task
Functions
It is declared before its name.
Return type
a function will perform the desired operations without returning a value. Such functions are defined with the keyword ______
Void
it is a basic data type that defines a valueless state
Void
it is a data type of the value returned by the function
return type
It is the name of the function
Function Name
When function is invoked, you pass a value to the ______. This value is referred to as actual ______ or argument.
Parameter
It refers to the type, order, and number of the parameters of a function
Parameter list
These are optional; that is, you can have a function without it
Parameters
A collection of statements defining what the function does
Body of the Functions
It tells the compiler about a function name and how to call the function. The actual body of the function can be defined separately.
Function Prototype
Typically refer to functions, constructor, or methods depending on wheter they take arguments
Parameterized and Non-Parameterized Function
It takes arguments as input, allowing customization or specific behavior
Parameterized Function
it does not take arguments. It has predefined or default behavior.
Non- Parameterized Function
Information can be passed to functions as a _____
Parameter
It acts as variables inside the function
Parameter
For a function to use arguments it must declare ______, which are variables that accept the argument’s values
Formal Parameters
You can define as many parameters as you want for your functions, by separating them with ____
commas