Test 1 Flashcards

1
Q

Why do we study programming languages?

A
  1. Increased ability to express idea
  2. Improved background for choosing appropriate languages
  3. Increased ability to learn new languages
  4. Better understanding of implementation
  5. Better use of known languages
  6. Overall advancement of computing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

4 Properties of Programming Languages are?

A
  1. Syntax
  2. Names
  3. Types
  4. Semantics
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The precise description of all its grammatically correct programs is called what?

A

Syntax

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

Variables, functions, parameters, classes, and objects are all examples of what in a programming language?

A

Names

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

Named entities are bound to what in a running program

A
  1. Scope
  2. Visibility
  3. Type
  4. Lifetime
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A collection of values and a collection of operations on those values is called what?

A

Types

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

A language’s type system can help do what?

A
  1. Determine legal operations
  2. Detect type errors
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The meaning of a program is called what?

A

Semantics

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

What programming languages is used for scientific applications

A

Fortran

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

What programming languages is used for business applications

A

COBOL

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

What programming languages is used for systems programming

A

C

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

What programming languages is used for artificial intelligence?

A

LISP

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

What programming languages is used for web software?

A

HTML, PHP, Java, Etc

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

A small instruction set and simple syntax fall into what of a good programming language

A

Simplicity and readability

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

a relatively small set of primitive constructs can be combined in a relatively small number of ways to build the control and data
structures is called what?

A

Orthogonality

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

A language element is bound to a property at the time that property is defined for it is an example of what

A

Clarity about binding

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

When a program behavior is the same under all conditions, this is known as what?

A

Reliability

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

How easily a language can be used to create programs is known as:

A

Writability

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

The ease with which programs can be moved from one implementation to another is:

A

Portability

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

The applicability to a wide range of applications is:

A

Generality

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

The completeness and precision of the language’s official definition is:

A

well-definedness

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

What architecture are languages primarily developed around?

A

Von Neumann Architecture

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

What type of languages are most dominant thanks to Von Neumann’s architecture?

A

Imperative

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

What are the four programming paradigms?

A
  1. Imperative
  2. Object-oriented
  3. Functional
  4. Logic
25
Q

What is the old programming paradigm

A

Imperative programming

26
Q

Give an example of an imperative programming language

A

Fortran, Cobol, C, Ada, Perl

27
Q

What programming paradigm is a collection of objects that interact by passing messages that transform the state?

A

Object-Oriented

28
Q

Give an example of an object-oriented language

A

Java, C++, C#, Python

29
Q

What programming paradigm is defined by a collection of mathematical functions

A

Functional

30
Q

Give an example of a functional language

A

Lisp, Scheme, ML, Haskell

31
Q

What programming paradigm declares what the outcome of the program should be rather than how it should be accomplished

A

Logic Programming

32
Q

What is an example of a logic programming language

A

Prolog

33
Q

What is the compilation process

A
  1. Lexical analysis (lexical units)
  2. Syntax analys (parse trees)
  3. Semantic analysis (intermediate code)
  4. Code generation (machine code)
34
Q

Give an example of a compiled language

A

Fortran, Cobol, C, C++

35
Q

Give an example of an interpreted language

A

Scheme, Haskell, Python

36
Q

Give an example of a hybrid language

A

The Java Virtual Machine

37
Q

What was the first significantly widespread high level language

A

Fortran (very fast code)

38
Q

What language is used in AI research

A

Lisp (data types of atoms and list)

39
Q

what language pioneered functional programming

A

Lisp

40
Q

What language came as a result of trying to design a universal language?

A

ALGOL

41
Q

What language are all imperative languages now based on?

A

ALGOL

42
Q

What language was first ever to be required by the DoD?

A

COBOL

43
Q

What programming language was designed by Ken Iverson at IBM?

A

APL

44
Q

What language was designed as a string manipulation language at Bell Labs by Farber

A

SNOBOL

45
Q

What language was designed as a system simulation language in Norway by Nygaard and Dahl?

A

SIMULA 67

46
Q

What language was named after Blaise Pascal and was designed for teaching structured programming?

A

Pascal

47
Q

What language was designed for systems programming and had a powerful set of operators

A

C

48
Q

What language was known as history’s largest design effort and contracted by the DoD?

A

Ada

49
Q

What programming language was based on C and supported both procedural and OO programming?

A

C ++

50
Q

What programming language eliminated many unsafe features of C++?

A

Java

51
Q

A string of characters over some alphabet is known as a:

A

sentence

52
Q

A set of sentences is known as a :

A

language

53
Q

Languages can be formally defined in what two distinct ways?

A

Recognition and Generation

54
Q

What type of grammar was meant to describe the syntax of natural languages?

A

Context-Free Grammars

55
Q

Who invented Backus-Naur Form?

A

John Backus and Peter Naur

56
Q

Grammar is considered ambiguous if what?

A

It generates a sentential form that comes from two or more distinct parse trees!

57
Q

How do you denote optional parts of an EBNF?

A

with brackets( eg. if() [else]

58
Q

How do you denote alternative parts of an EBNF?

A

with parentheses (showing an or relationship(