Lesson 6: C++ Functions Flashcards
1
Q
It is a block of code that performs some operation.
A
Function
2
Q
It can optionally define input parameters that enable callers to pass arguments into the function.
A
Function
3
Q
What are the 5 advantages of using C++ functions?
A
- Easier to code
- Easier to modify
- Easier to maintain and debug
- Reusability
- Less programming time
4
Q
What are the 2 types of C++ functions?
A
- Pre-defined, library, or built-in
- User-defined
5
Q
These functions are part of the compiler package.
A
Pre-defined/library/built-in
6
Q
These functions are created as per the requirements of your program.
A
User-defined functions
7
Q
It is a variable in a function definition. It is a placeholder and hence does not have a concrete value.
A
Parameter
8
Q
It is a value passed during function invocation.
A
Argument
9
Q
What are the 4 types of user-defined functions?
A
- Functions with no argument and no return value
- Functions with arguments and a return value
- Functions with arguments and no return value
- Functions with arguments and a return value