Module 1 Flashcards

FUNCTIONS & FUNCTIONS PARAMETERS

1
Q
  • in programming, are collections of statements that work together to complete tasks.
A

Functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  • Library Functions
  • User Defined Functions
A

Types of Functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
  • may return a value or perform an action without returning a value (void functions)
A

Function Structure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
  • Declarations of functions before their actual use in program
A

Function Prototypes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
  • invoking a user-defined function to execute its code
  • passing arguments to the function if required.
A

Function Call

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
  • actual implementation of the function, including its body.
  • contains parameters if any, local variables, and return statements.
A

Function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  • Function with no argument and no return value
  • Function with no argument but returns a value
  • Function with argument but no return value
  • Function with argument and return value
A

Types of User Defined Functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
  • also known as non-value returning functions
  • stand-alone statement
A

Void Functions

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

variables created within a function.

A

Local Variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
  • act as variables inside the function.
  • multiple parameters separated by commas are allowed.
  • are specified after the function name, inside the parenthesis
A

Function Parameters

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

variable in the declaration of function

A

Parameter

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

actual value of this variable that gets passed to function

A

Argument

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
  • functions without a returning value.
  • return statement gathers value from the function and returns it to the caller.
A

Void Functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
  • values specified in function declarations
  • assigned by the compiler if no value is specified in the function call.
  • default value can be overridden by passing a value
A

Default Arguments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
  • Functions can accept parameters and return values.
  • Parameters specified in function prototypes and definitions.
  • Arguments passed to functions during function calls.
A

User Defined Functions with Parameters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
  • Occurs when a function name is used for multiple tasks with different arguments.
  • Same function name but different parameters.
A

Function Overloading

17
Q

return_type function_name(parameter1_type parameter1_name, parameter2_type parameter2_name, …);

A

Syntax for function prototype with parameters:

18
Q

return_type function_name(parameter1_type parameter1_name, parameter2_type parameter2_name, …) {
// Function body
}

A

Syntax for function definition with parameters:

19
Q

function_name(argument1, argument2, …);

A

Syntax for passing arguments to a function: