Functions Flashcards

1
Q

What is a function?

A

reusable block of code designed to perform a specific task, which can be called multiple times from different parts of a program, promoting modularity and code organization

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

Advantages of function

A
  • code reusability
  • increases program readability
  • program testing becomes easy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Disadvantages of function

A
  • performance overhead
  • memory usage
  • debugging challenges
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Built-in function

A

pre-defined functions that come with a programming language, ready for use without requiring external libraries or imports, simplifying common tasks and enhancing coding efficiency

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

User-defined functions

A

a function created by the user, allowing for custom logic and functionality.

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