Lesson 6: C++ Functions Flashcards

1
Q

It is a block of code that performs some operation.

A

Function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

It can optionally define input parameters that enable callers to pass arguments into the function.

A

Function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the 5 advantages of using C++ functions?

A
  1. Easier to code
  2. Easier to modify
  3. Easier to maintain and debug
  4. Reusability
  5. Less programming time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the 2 types of C++ functions?

A
  1. Pre-defined, library, or built-in
  2. User-defined
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

These functions are part of the compiler package.

A

Pre-defined/library/built-in

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

These functions are created as per the requirements of your program.

A

User-defined functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

It is a variable in a function definition. It is a placeholder and hence does not have a concrete value.

A

Parameter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

It is a value passed during function invocation.

A

Argument

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the 4 types of user-defined functions?

A
  1. Functions with no argument and no return value
  2. Functions with arguments and a return value
  3. Functions with arguments and no return value
  4. Functions with arguments and a return value
How well did you know this?
1
Not at all
2
3
4
5
Perfectly