Karteikarten: Programming Language Paradigms — 30 Karten

Alle Karten

1Frage

What is a programming paradigm?

Antwort

A fundamental style or approach for structuring computer code.

2Frage

What distinguishes a programming language from a programming paradigm?

Antwort

A language is a tool, while a paradigm is the guiding philosophy.

3Frage

What is true about most modern programming languages regarding paradigms?

Antwort

They support multiple paradigms like object-oriented, functional, and procedural.

4Frage

What does state mean in programming?

Antwort

Data stored in memory at a specific moment during execution.

5Frage

What is state mutation in programming?

Antwort

Changing memory values in place over time during execution.

6Frage

What are the two primary programming paradigm branches?

Antwort

Imperative and declarative.

7Frage

How are imperative and declarative paradigms classified?

Antwort

By how they handle state and control flow.

8Frage

What does the imperative paradigm specify?

Antwort

How to compute a solution step by step by manipulating program state.

9Frage

Which sub-paradigms belong to the imperative branch?

Antwort

Procedural and object-oriented programming.

10Frage

What does the declarative paradigm specify?

Antwort

What result is required without detailing execution steps.

11Frage

Which sub-paradigms belong to the declarative branch?

Antwort

Functional programming, logic programming, and database querying.

12Frage

What type of state do imperative programs generally use?

Antwort

Mutable state.

13Frage

What type of state do declarative programs use?

Antwort

Immutable state.

14Frage

Which control flow constructs are common in imperative programming?

Antwort

For and while loops, explicit if branching, and jumps.

15Frage

Which control flow methods are used in declarative programming?

Antwort

Recursion, higher-order functions, and pattern matching.

16Frage

How are side effects treated in imperative programming?

Antwort

They are common and expected.

17Frage

How does declarative programming handle side effects?

Antwort

It minimizes or eliminates them.

18Frage

What are the primary units used in imperative programming?

Antwort

Statements, procedures, and objects.

19Frage

Name some representative declarative programming languages.

Antwort

Haskell, Prolog, SQL, and HTML.

20Frage

How does the imperative C solution process the array [1, 2, 3, 4, 5]?

Antwort

It initializes a mutable total, loops explicitly, tests elements conditionally, adds odd numbers, and returns total.

21Frage

How does the declarative Haskell solution compute the sum of odd numbers in [1, 2, 3, 4, 5]?

Antwort

It uses sum of filtered odd numbers without mutable loops or variables.

22Frage

What do both imperative and declarative implementations do with even numbers in [1, 2, 3, 4, 5]?

Antwort

They filter out even numbers before summing.

23Frage

How does matching a programming paradigm to its domain affect bug density?

Antwort

It reduces bug density by aligning the paradigm with system requirements.

24Frage

What benefit does functional immutability provide in multithreaded systems?

Antwort

It prevents race conditions by avoiding in-place state changes.

25Frage

Which programming model is used for domain entities in modern enterprise architectures?

Antwort

Object-oriented models are used for domain entities.

26Frage

What approach is used for ETL data-stream processing in modern enterprise architectures?

Antwort

Functional pipelines are used for ETL data-stream processing.

27Frage

Which declarative markup languages are used for user interfaces and setup configurations?

Antwort

HTML and YAML are used for user interfaces and setup configurations.

28Frage

What does referential transparency mean for a function?

Antwort

It can be replaced by its result without changing program behavior.

29Frage

Why is add(x, y) referentially transparent?

Antwort

It returns the same result for the same inputs and has no side effects.

30Frage

What makes add_with_log(x, y) not referentially transparent?

Antwort

It produces console output as an I/O side effect.

Teste dich mit dem Quiz

Teste dein Wissen mit 18 Fragen zu Programming Language Paradigms.

1. Which statement best defines a programming paradigm in terms of code structure?

2. What distinguishes a programming language from a programming paradigm?

Quiz machen →

Lernzettel lesen

Überprüfe den vollständigen Kurs im Lernzettel zu Programming Language Paradigms.

Lernzettel ansehen →

Similar courses

Erstelle deine eigenen Karteikarten

Importiere deinen Kurs und die KI erstellt in 30 Sekunden Karteikarten.

Karteikarten-Generator