Tarjetas de memoria: Programming Language Paradigms — 30 tarjetas

Todas las tarjetas

1Pregunta

What is a programming paradigm?

Respuesta

A fundamental style or approach for structuring computer code.

2Pregunta

What distinguishes a programming language from a programming paradigm?

Respuesta

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

3Pregunta

What is true about most modern programming languages regarding paradigms?

Respuesta

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

4Pregunta

What does state mean in programming?

Respuesta

Data stored in memory at a specific moment during execution.

5Pregunta

What is state mutation in programming?

Respuesta

Changing memory values in place over time during execution.

6Pregunta

What are the two primary programming paradigm branches?

Respuesta

Imperative and declarative.

7Pregunta

How are imperative and declarative paradigms classified?

Respuesta

By how they handle state and control flow.

8Pregunta

What does the imperative paradigm specify?

Respuesta

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

9Pregunta

Which sub-paradigms belong to the imperative branch?

Respuesta

Procedural and object-oriented programming.

10Pregunta

What does the declarative paradigm specify?

Respuesta

What result is required without detailing execution steps.

11Pregunta

Which sub-paradigms belong to the declarative branch?

Respuesta

Functional programming, logic programming, and database querying.

12Pregunta

What type of state do imperative programs generally use?

Respuesta

Mutable state.

13Pregunta

What type of state do declarative programs use?

Respuesta

Immutable state.

14Pregunta

Which control flow constructs are common in imperative programming?

Respuesta

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

15Pregunta

Which control flow methods are used in declarative programming?

Respuesta

Recursion, higher-order functions, and pattern matching.

16Pregunta

How are side effects treated in imperative programming?

Respuesta

They are common and expected.

17Pregunta

How does declarative programming handle side effects?

Respuesta

It minimizes or eliminates them.

18Pregunta

What are the primary units used in imperative programming?

Respuesta

Statements, procedures, and objects.

19Pregunta

Name some representative declarative programming languages.

Respuesta

Haskell, Prolog, SQL, and HTML.

20Pregunta

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

Respuesta

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

21Pregunta

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

Respuesta

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

22Pregunta

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

Respuesta

They filter out even numbers before summing.

23Pregunta

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

Respuesta

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

24Pregunta

What benefit does functional immutability provide in multithreaded systems?

Respuesta

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

25Pregunta

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

Respuesta

Object-oriented models are used for domain entities.

26Pregunta

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

Respuesta

Functional pipelines are used for ETL data-stream processing.

27Pregunta

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

Respuesta

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

28Pregunta

What does referential transparency mean for a function?

Respuesta

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

29Pregunta

Why is add(x, y) referentially transparent?

Respuesta

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

30Pregunta

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

Respuesta

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

Ponte a prueba con el cuestionario

Pon a prueba tus conocimientos con 18 preguntas sobre 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?

Realiza el cuestionario →

Lee la hoja de repaso

Revisa el curso completo en la hoja de repaso para Programming Language Paradigms.

Ver hoja de repaso →

Similar courses

Crea tus propias tarjetas de memoria

Importa tu curso y la IA genera tarjetas de memoria en 30 segundos.

Generador de tarjetas de memoria