Author name: admin

What is “lazy evaluation” in functional programming?

What is “lazy evaluation” in functional programming? a) A function that runs slower than expected b) An evaluation strategy where expressions are evaluated only when their value is needed c) A method of memorizing function calls d) A technique to create recursive loops Answer: b) An evaluation strategy where expressions are evaluated only when their

What is “lazy evaluation” in functional programming? Read More »

In functional programming, which statement is true about loops?

In functional programming, which statement is true about loops? a) Loops are commonly used b) Loops are replaced with recursion or higher-order functions like map or reduce c) Loops modify global state d) Loops are used to introduce side effects Answer: b) Loops are replaced with recursion or higher-order functions like map or reduce Explanation:

In functional programming, which statement is true about loops? Read More »

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

Which of the following is discouraged in functional programming? Read More »

What is “referential transparency” in functional programming?

What is “referential transparency” in functional programming? a) The ability to reference global variables b) When a function consistently yields the same result given the same inputs c) A property of functions that return nothing d) The use of object-oriented features in functions Answer: b) When a function consistently yields the same result given the

What is “referential transparency” in functional programming? Read More »

Which of the following is a common functional programming language?

Which of the following is a common functional programming language? a) Python b) Java c) Haskell d) HTML Answer: c) Haskell Explanation: Haskell is a purely functional programming language known for its strong support for immutability and higher-order functions. Reference: Functional Programming Quiz – MCQ Questions and Answers

Which of the following is a common functional programming language? Read More »

Which of the following is a key feature of functional programming?

Which of the following is a key feature of functional programming? a) Object inheritance b) Mutable state c) Higher-order functions d) Imperative loops Answer: c) Higher-order functions Explanation: Higher-order functions are functions that take other functions as arguments or return them as results, which is a fundamental feature of functional programming. Reference: Functional Programming Quiz

Which of the following is a key feature of functional programming? Read More »

What does the “.env” file in Laravel contain?

What does the “.env” file in Laravel contain? a) Database and application configuration b) Controller logic c) HTML templates d) CSS styles Answer: a) Database and application configuration Explanation: The .env file in Laravel contains environment-specific configuration settings such as database credentials, app URL, and mail settings. Reference: Laravel Quiz – MCQ – Multiple Choice

What does the “.env” file in Laravel contain? Read More »

What is a Laravel event?

What is a Laravel event? a) A PHP error b) An action triggered by a specific occurrence in the application c) A database query d) A migration command Answer: b) An action triggered by a specific occurrence in the application Explanation: Events in Laravel are triggered by certain occurrences in the application, such as user

What is a Laravel event? Read More »

How does Laravel handle dependency injection?

How does Laravel handle dependency injection? a) Using the service container b) Using Blade templating c) Using middleware d) Using controllers Answer: a) Using the service container Explanation: Laravel uses the service container to manage class dependencies, allowing developers to inject objects and services into classes. Reference: Laravel Quiz – MCQ – Multiple Choice Questions

How does Laravel handle dependency injection? Read More »

Scroll to Top