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
2
Q
Advantages of function
A
- code reusability
- increases program readability
- program testing becomes easy
3
Q
Disadvantages of function
A
- performance overhead
- memory usage
- debugging challenges
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
5
Q
User-defined functions
A
a function created by the user, allowing for custom logic and functionality.