Which of the following is discouraged in functional programming?

Which of the following is discouraged in functional programming?

a) Immutable data
b) Side effects
c) Higher-order functions
d) Pure functions

Answer:

b) Side effects

Explanation:

Side effects, such as modifying global variables or performing I/O operations, are discouraged in functional programming because they can make the behavior of programs less predictable.

Reference:

Functional Programming Quiz – MCQ Questions and Answers

Scroll to Top