
Quiz on Declarative and Imperative Programming Languages
Authored by Nurmanap Kolohanov
Computers
12th Grade
Used 10+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is declarative programming?
A programming paradigm that uses loops extensively
A programming paradigm focused on changing program state
A programming paradigm that expresses the logic of a computation
A programming paradigm that describes how to perform tasks
Answer explanation
Declarative programming focuses on expressing the logic of a computation without detailing the control flow. This contrasts with imperative programming, which describes how to perform tasks step by step.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an example of a declarative language?
Java
Prolog
Python
C++
Answer explanation
Prolog is a declarative programming language, focusing on logic and facts rather than control flow. In contrast, Java, Python, and C++ are imperative languages that require explicit instructions for execution.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does imperative programming focus on?
How the program should achieve the result
What the program should accomplish
The efficiency of the program
The structure of the programming language
Answer explanation
Imperative programming focuses on how to achieve a result by specifying the steps or commands to be executed. This contrasts with declarative programming, which emphasizes what the program should accomplish.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a characteristic of declarative programming?
Focuses on how to achieve results
Provides less flexibility
Simplifies the program
Expresses logic without control flow
Answer explanation
Declarative programming emphasizes what the program should accomplish rather than how to achieve it. Therefore, the statement 'Focuses on how to achieve results' is NOT a characteristic of declarative programming.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a key feature of imperative programming?
Uses a knowledge base
Focuses on what the program should accomplish
Changes program state through statements
Is less complex than declarative programming
Answer explanation
A key feature of imperative programming is that it changes program state through statements. This means it focuses on how to achieve a result by executing a sequence of commands, unlike declarative programming which describes what to accomplish.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following languages is considered imperative?
HTML
Haskell
SQL
PHP
Answer explanation
PHP is considered an imperative programming language because it allows for commands to be executed in a specific order, enabling developers to control the flow of execution. In contrast, HTML, Haskell, and SQL are not imperative.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the term 'execution is not clearly delineated' refer to in declarative programming?
The program is executed in a single step
The order of instructions is well-defined
The execution order is not explicitly stated
The program's control flow is easy to understand
Answer explanation
In declarative programming, 'execution is not clearly delineated' means that the execution order of instructions is not explicitly stated, allowing the underlying system to determine how to execute the program.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
Design your website
Quiz
•
7th - 12th Grade
13 questions
INTERNET CONNECTION
Quiz
•
12th Grade
11 questions
Unit 2, 1.3 Types of information access and storage devices
Quiz
•
12th Grade
20 questions
STS Informatika
Quiz
•
10th Grade - University
15 questions
Problem Solving : Design Solution
Quiz
•
12th Grade
15 questions
Virtual Private Server
Quiz
•
12th Grade
17 questions
Security and Ethics
Quiz
•
9th - 12th Grade
10 questions
IT Quiz
Quiz
•
11th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade