
Quiz on Declarative and Imperative Programming Languages

Quiz
•
Computers
•
12th Grade
•
Hard
Nurmanap Kolohanov
Used 6+ times
FREE Resource
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.
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Programming Paradigms Quiz

Quiz
•
12th Grade
20 questions
SC025 - Topic 1 (Introduction to Programming

Quiz
•
KG - 12th Grade
10 questions
C# Programming Quiz

Quiz
•
12th Grade
20 questions
Functional Programming Quiz

Quiz
•
12th Grade
12 questions
1.2.4. Types of Programming Language

Quiz
•
12th Grade
17 questions
1.4 principles of programming

Quiz
•
6th - 12th Grade
15 questions
Programming Paradigms

Quiz
•
12th Grade - University
20 questions
20.1 Programming Paradigms Cambridge iA 9618

Quiz
•
12th Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
62 questions
Spanish Speaking Countries, Capitals, and Locations

Quiz
•
9th - 12th Grade
20 questions
First Day of School

Quiz
•
6th - 12th Grade
6 questions
Maier - AMDM - Unit 1 - Quiz 1 - Estimation

Quiz
•
12th Grade
21 questions
Arithmetic Sequences

Quiz
•
9th - 12th Grade
21 questions
9th Grade English Diagnostic Quiz

Quiz
•
9th - 12th Grade
7 questions
Characteristics of Life

Interactive video
•
11th Grade - University