PPL PRELIM Flashcards

HEHE PU

1
Q

What Are Programming Paradigms?

A

IMPERATIVE PARADIGM/PROCEDURAL PARADIGM
OBJECT-ORIENTED PARADIGM
FUNCTIONAL PARADIGM
LOGIC PARADIGM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Giving step-by-step instructions to the computer, like following a recipe.
Examples: Fortran, C.

A

IMPERATIVE PARADIGM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Using functions to process data without changing it, like using a machine to get results.
Examples: Lisp, Haskell.

A

FUNCTIONAL PARADIGM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Organizing data and actions into “objects,” like sorting items into categories.
Examples: C++, Java.

A

OBJECT-ORIENTED PARADIGM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Using rules and facts to answer questions, like solving puzzles with clues.
Example: Prolog.

A

LOGIC PARADIGM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The abilities and tools the language provides for programming.

A

LANGUAGE FEATURES

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Different kinds of data the language can handle (e.g., numbers, text)

A

DATA TYPES

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

3 types of STRUCTURE

A

LEXICAL
SYNTACTIC
SEMANTIC

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How symbols and words are combined into instructions.

A

SYNTACTIC

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The meaning of these instructions.

A

SEMANTIC

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Basic symbols and words.

A

LEXICAL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

3 types of PROCESSING

A

COMPILATION
INTERPRETATION
PREPROCESSING

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Initial setup tasks like including extra files.

A

PREPROCESSING

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The process of translating the whole program into machine code before running it.

A

COMPILATION

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

The process of translating and running the program line by line.

A

INTERPRETATION

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Understanding needs, planning, coding, testing, and ensuring it works.

A

PROGRAM DEVELOPMENT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Languages have advanced and become more complex over time.

A

EVOLUTION

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What programming language uses both imperative and object-oriented styles.

A

C++

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

A programming language that is mainly object-oriented but includes imperative features.

A

JAVA

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

It is a programming language that is functional with some extra features.

A

LISP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

How straightforward and easy the language is to use.

A

Simplicity/Orthogonality

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Tools for managing the flow of the program (e.g., loops, conditionals).

A

CONTROL STRUCTURES

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Types of data and how they are organized.

A

DATA TYPES AND STRUCTURES

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

These are the rules for writing code and its readability.

A

SYNTAX DESIGN

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Hiding complex details behind simpler interfaces.

A

SUPPORT FOR ABSTRACTION

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

How well the language allows for complex ideas to be written.

A

EXPRESSIVENESS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Comparing and managing different data types.

A

TYPE EQUIVALENCE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Managing errors and unexpected conditions.

A

EXCEPTION HANDLING

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Limiting how variables refer to the same memory location.

A

RESTRICTED ALIASING

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

The features of a language support effective coding practices, impacting program performance.

A

PROGRAM FEATURES

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

The way algorithms and data structures are chosen and implemented also affects reliability, readability, writability, reusability, and efficiency

A

PROGRAMMER’S ROLE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

These are the first-generation languages in binary, directly understood by computers but hard for humans to use.

A

MACHINE LANGUAGES

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

These languages introduced mnemonics for binary instructions, making programming more manageable. Assemblers translate these into machine code.

A

ASSEMBLY LANGUAGES

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

Konrad Zuse’s early high-level language, used for complex calculations on early computers.

A

Plankalkül (1946)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

First high-level language for electronic computing devices, required manual compilation.

A

Short Code (1949)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

She developed the A0 compiler, a crucial advancement in language translation.

A

Grace Hopper (1951)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

Early compiler by Alick E. Glennie for the Manchester Mark I, handling symbolic statements.

A

Autocoder (1952)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

Developed by John Backus, introduced variables and simple control structures. Evolved through versions like Fortran II, IV, and later.

A

Fortran (1950s)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

Introduced block structure and structured programming. Influenced many future languages.

A

Algol (1958-1968)

40
Q

Designed by Niklaus Wirth, emphasized structured programming and type safety. Evolved into Modula and Oberon.

A

Pascal (1970)

41
Q

Introduced OOP concepts like classes and inheritance, influential though not widely used.

A

Simula (1960s)

42
Q

Developed at Xerox PARC, advanced OOP concepts and integrated some functional features.

A

Smalltalk (1970s-1980s)

43
Q

Created by Bjarne Stroustrup, combined C with OOP features from Simula.

A

C++ (1983)

44
Q

Developed by Sun Microsystems, streamlined OOP from C++ and introduced bytecode for cross-platform compatibility.

A

Java (1995)

45
Q

Developed by John McCarthy, focused on AI and symbolic computation. Evolved into various dialects including Scheme and Common Lisp.

A

Lisp (1958)

46
Q

Strongly typed functional language with type inference.

A

ML (1980s)

47
Q

Purely functional with strong typing, built on earlier languages like SASL and KRC.

A

Miranda (1985-1986)

48
Q

Created by Alain Colmerauer and Philippe Roussel, designed for natural language processing and AI. Became a major language in logic programming.

A

Prolog (1971)

49
Q

Structured sets of instructions for machines.

A

DEFINITION

50
Q

Tools for directing machine actions and solving problems through algorithms.

A

PURPOSE

51
Q

The process of creating programs and software that control machines.

A

PROGRAMMING

52
Q

A formal system for writing instructions to a computer.

A

PROGRAMMING LANGUAGE

53
Q

Rules for writing valid instructions.

A

SYNTAX

54
Q

Meaning of each instruction.

A

SEMANTICS

55
Q

How the language runs on real or virtual machines.

A

IMPLEMENTATION

56
Q

Converting code into machine language.

A

TRANSLATION

57
Q

Converting the entire program into machine language before running it.

A

COMPILATION

58
Q

Executing the program line-by-line without full conversion.

A

INTERPRETATION

59
Q

A law that is about hardware capabilities, like the number of transistors, double roughly every 2.5 years, affecting programming needs and designs.

A

MURPHY’S LAW

60
Q

Introduced the method of solving equations by removing negative units (algebra).

A

Abu Ja’far Muhammad ibn Musa (780-850)

61
Q

Developed the idea of Calculus ratiocinator: Formal symbolic language for reasoning and invented the mechanical calculator.

A

Gottfried Wilhelm Leibniz (1646-1716)

62
Q

Developed Predicate Logic: Foundation for proof theory and automated theorem proving.
Pioneered Logic Programming: Computation as logical deduction.

A

Gottlob Frege (1848-1925)

63
Q

Developed concepts in Imperative Programming: Sequences of commands and state transitions.
Introduced Turing Machines: A theoretical model of computation.

A

Alan Turing

64
Q

Developed Lambda Calculus: Foundation for functional programming and type theory.
Advanced Functional Programming: Pure expressions and evaluation, without assignment operators.

A

Alonzo Church (1903-1995)

65
Q

Developed Recursive Functions and Automata.
Introduced Regular Expressions, Finite-State Machines, and Pushdown Automata (PDAs), crucial for

A

Stephen Kleene (1900-1994)

66
Q

First computer science Ph.D. (1951).
Worked on Automatic Computing with EDSAC.
Authored influential paper on writing correct, reusable, and maintainable code.

A

David Wheeler (1927-2004)

67
Q

Designed the C language.
Brian Kernighan (1942-): Co-authored the seminal book on C programming.

A

Dennis Ritchie (1941-2011)

68
Q

Developed combinatory logic.

A

Moses Schönfinkel (1889-1942) and Haskell Curry (1900-1982)

69
Q

Known for Post Production Systems.

A

Emil Post (1897-1954)

70
Q

Developed Markov Algorithms.

A

Andrey Markov (1903-1979)

71
Q

Co-inventor of the Simula language, which laid the foundation for object-oriented programming.

A

Kristen Nygaard (1926-2002)

72
Q

EVOLUTION OF PROGRAMMING LANGUAGES

A

MACHINE LANGUAGE
ASSEMBLY LANGUAGE
3RD GEN LANGUAGE (3G)
4TH GEN LANGUAGE (4G)
5TH GEN LANGUAGE (5G)

73
Q

The most basic computer language made up of binary code (0s and 1s) that the computer can directly understand.

A

MACHINE LANGUAGE

74
Q

A slightly more user-friendly version of machine language that uses symbols (mnemonics) instead of binary.

A

ASSEMBLY LANGUAGE

75
Q

2 components of machine language

A

OPCODE
OPERAND

76
Q

2 components of assembly language

A

MNEMONICS
ASSEMBLER

77
Q

These languages use syntax that is closer to human language, making them easier to write and understand.

A

Third-Generation Languages (3GLs)

78
Q

Examples of 3rd gen languages

A

Fortran
COBOL
C/C++
Java

79
Q

a language for scientific calculations.

A

Fortran

80
Q

a language for business applications.

A

COBOL

81
Q

General-purpose languages.

A

C/C++

82
Q

a language known for its portability across different systems.

A

Java

83
Q

Focus on ease of use, often with graphical tools or simple text-based environments. They may not need a compiler.

A

Fourth-Generation Languages (4GLs)

84
Q

Examples of 4th gen languages

A

Visual Basic
SQL
R
Matlab

85
Q

For easy-to-create applications with a graphical interface.

A

Visual Basic

86
Q

For managing and querying databases.

A

SQL

87
Q

For statistical analysis.

A

R

88
Q

For mathematical and engineering tasks.

A

Matlab

89
Q

Still developing, these languages use AI to solve problems, focusing on constraints rather than step-by-step algorithms.

A

Fifth-Generation Languages (5GLs)

90
Q

Used for logic-based programming and AI.

A

Prolog

91
Q
  • Translates a high-level language into machine language.
  • Checks for errors in the code before creating an executable file.
  • The compiled code is saved and can be run anytime.
  • If the code changes, it needs to be compiled again.
A

COMPILERS

92
Q

-Translates and runs code line-by-line.
- Executes each line immediately after translating it.
- Shows errors as they occur during execution.

A

INTERPRETER

93
Q

Types of programming languages

A

PROCEDURAL
OBJECT-ORIENTED
FUNCTIONAL
LOGIC

94
Q

Code is executed based on a sequence of statements or procedures.
Users write instructions step-by-step for the computer to follow.
Procedures can be reused throughout the program.
Examples: COBOL, Algol.

A

Procedural Programming

95
Q

Organizes code into objects that combine data and behavior.
Objects interact with each other through methods.
A class serves as a blueprint for creating objects.
Examples: C++, Java, Swift.

A

Object-Oriented Programming

96
Q

Focuses on passing data between functions to achieve results.
Functions are treated as data and can be passed around or returned.
Emphasizes immutability and avoids shared state.
A pure function always produces the same output for the same input.

A

Functional Programming

97
Q
A