Search Header Logo

Functional Programming Quiz

Authored by Jimy Mathew

Computers

12th Grade

Used 4+ times

Functional Programming Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main focus of imperative programming?

What should happen

How to do it

Using pattern matching

None of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which language is an example of a declarative language?

C

Java

SQL

Assembly

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a key characteristic of declarative programming?

a) Programs describe what the result should look like

b) Programs prescribe a sequence of steps

c) Programs use only loops

d) Programs must have side effects

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does referential transparency mean?

a) A function always produces the same result for the same input

b) A function changes its return value based on external conditions

c) A function modifies external variables

d) A function uses mutable state

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following violates referential transparency?

a) A function that returns the sum of two numbers

b) A function that modifies a global variable

c) A function that always returns the same output for a given input

d) A function that calculates the square of a number

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a characteristic of functional programming?

a) Referential transparency

b) Mutable state

c) First-class functions

d) Pattern matching

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?