Programming Languages

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/300

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 10:45 AM on 7/19/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

301 Terms

1
New cards

A data type can be defined as a collection of values from a _ _.

A. syntax

B. token

C. structure

D. domain

DOMAIN

2
New cards

The structural approach defines a type based on the _ _ of data.

A. syntax

B. value

C. internal structure

D. execution

INTERNAL STRUCTURE

3
New cards

The implementer's approach groups types into _ _ classes.

A. equivalence

B. execution

C. syntax

D. logical

EQUIVALENCE

4
New cards

The abstraction approach defines a type as a set of _ _.

A. operations

B. syntax rules

C. tokens

D. variables

OPERATIONS

5
New cards

Computers are naturally _ _.

A. logical

B. typed

C. structured

D. untyped

UNTYPED

6
New cards

Type checking ensures that _ _ operations do not occur.

A. syntax

B. valid

C. meaningful

D. meaningless

MEANINGLESS

7
New cards

Strong typing prevents _ _ operations on incompatible data)

A. valid

B. inappropriate

C. syntax

D. correct

INAPPROPRIATE

8
New cards

Static typing performs checks at _ _ time.

A. load

B. runtime

C. execution

D. compile

COMPILE

9
New cards

A violation of type rules is called a type _ _.

A. error

B. token

C. clash

D. syntax

CLASH

10
New cards

Coercion is the conversion of a value into another _ _.

A. variable

B. operator

C. syntax

D. data type

DATA TYPE

11
New cards

A data type provides meaning by defining:

A. tokens

B. operations on data

C. syntax

D. memory

OPERATIONS ON DATA

12
New cards

Denotational approach focuses on:

A. structure

B. values and domains

C. execution

D. syntax

VALUES AND DOMAINS

13
New cards

Structural approach emphasizes:

A. execution

B. values

C. internal organization

D. syntax

INTERNAL ORGANIZATION

14
New cards

Type checking is used to:

A. speed execution

B. reduce memory

C. prevent invalid operations

D. parse tokens

PREVENT INVALID OPERATIONS

15
New cards

Strong typing ensures:

A. faster execution

B. type safety

C. tokenization

D. syntax correctness

TYPE SAFETY

16
New cards

Static typing differs from dynamic typing because:

A. it uses syntax

B. it checks at runtime

C. it ignores types

D. it checks at compile time

IT CHECKS AT COMPILE TIME

17
New cards

Python is considered:

A. weak typed

B. untyped

C. static typed

D. strong dynamic typed

STRONG DYNAMIC TYPED

18
New cards

Java uses:

A. dynamic only

B. weak typing

C. no typing

D. mixed typing (static + dynamic)

MIXED TYPING (STATIC + DYNAMIC)

19
New cards

Expressions have:

A. tokens

B. values

C. syntax only

D. no value

VALUES

20
New cards

Objects are:

A. tokens

B. entities with names

C. syntax

D. operators

ENTITIES WITH NAMES

21
New cards

3 * 5 produces a _ _ in denotational semantics.

A. token

B. structure

C. syntax

D. domain value

DOMAIN VALUE

22
New cards

int x = 10, float y = x demonstrates:

A. coercion

B. syntax

C. iteration

D. recursion

COERCION

23
New cards

a + b where a is int and b is string causes:

A. syntax error

B. token error

C. valid operation

D. type error

TYPE ERROR

24
New cards

Boolean is classified as:

A. reference type

B. dynamic type

C. composite type

D. discrete type

DISCRETE TYPE

25
New cards

Arrays are:

A. tokens

B. scalar types

C. composite types

D. syntax

COMPOSITE TYPES

26
New cards

Records consist of:

A. operators

B. fields

C. tokens

D. loops

FIELDS

27
New cards

Union allows:

A. no values

B. multiple values simultaneously

C. syntax only

D. one value at a time

ONE VALUE AT A TIME

28
New cards

Enumeration type represents:

A. numeric values

B. strings

C. predefined constants

D. syntax

PREDEFINED CONSTANTS

29
New cards

Type inference determines:

A. tokens

B. memory

C. syntax

D. type of expressions

TYPE OF EXPRESSIONS

30
New cards

Type compatibility checks:

A. syntax

B. parsing

C. valid usage

D. tokens

VALID USAGE

31
New cards

Structural equivalence compares:

A. names

B. structure

C. tokens

D. syntax

STRUCTURE

32
New cards

Name equivalence compares:

A. declarations

B. syntax

C. structure

D. execution

DECLARATIONS

33
New cards

Type inference depends on:

A. tokens

B. syntax

C. operand types

D. memory

OPERAND TYPES

34
New cards

Coercion relaxes:

A. type checking

B. execution

C. parsing

D. syntax

TYPE CHECKING

35
New cards

Composite types differ from scalar types because:

A. single value

B. multi-valued

C. syntax

D. tokens

MULTI-VALUED

36
New cards

Discrete types are:

A. dynamic

B. countable

C. syntax

D. continuous

COUNTABLE

37
New cards

Floating-point types represent:

A. syntax

B. tokens

C. integers

D. real numbers

REAL NUMBERS

38
New cards

Type systems enforce:

A. tokens

B. rules for types

C. execution

D. syntax

RULES FOR TYPES

39
New cards

Type clash occurs when:

A. execution stops

B. syntax fails

C. tokens fail

D. types mismatch

TYPES MISMATCH

40
New cards

Strong typing reduces:

A. flexibility

B. tokens

C. syntax

D. runtime errors

RUNTIME ERRORS

41
New cards

Strong typing is preferred because it:

A. slows execution

B. increases safety

C. reduces syntax

D. ignores errors

INCREASES SAFETY

42
New cards

Static typing improves:

A. syntax

B. runtime flexibility

C. compile-time error detection

D. tokens

COMPILE-TIME ERROR DETECTION

43
New cards

Dynamic typing is useful because:

A. tokens

B. syntax

C. faster compile

D. flexible runtime

FLEXIBLE RUNTIME

44
New cards

Coercion can be risky because it:

A. hides errors

B. improves syntax

C. reduces memory

D. speeds execution

HIDES ERRORS

45
New cards

Composite types improve:

A. parsing

B. syntax

C. tokens

D. data organization

DATA ORGANIZATION

46
New cards

Designing a type system requires:

A. rules and operations

B. syntax only

C. tokens only

D. memory

RULES AND OPERATIONS

47
New cards

Creating new data types involves:

A. abstraction

B. tokens

C. syntax only

D. execution

ABSTRACTION

48
New cards

Efficient type design ensures:

A. correctness and safety

B. parsing

C. syntax

D. tokens

CORRECTNESS AND SAFETY

49
New cards

Advanced languages integrate:

A. static and dynamic typing

B. syntax only

C. parsing

D. tokens only

STATIC AND DYNAMIC TYPING

50
New cards

A complete type system includes:

A. syntax only

B. tokens only

C. execution

D. equivalence, compatibility, inference ,

EQUIVALENCE, COMPATIBILITY, INFERENCE

51
New cards

Control flow refers to the _ _ of execution in a program.

A. Structure

B. Syntax

C. Memory

D. Order

ORDER

52
New cards

Sequencing means:

A. Recursion

B. Looping

C. Order of execution

D. Conditional execution

ORDER OF EXECUTION

53
New cards

Selection is also known as:

A. Alternation

B. Recursion

C. Iteration

D. Execution

ALTERNATION

54
New cards

Iteration refers to:

A. Loops

B. Branching

C. Memory

D. Functions

LOOPS

55
New cards

Recursion is defined as:

A. Assignment

B. Selection

C. Function calling itself

D. Looping

FUNCTION CALLING ITSELF

56
New cards

Procedural abstraction involves:

A. Functions

B. Tokens

C. Memory

D. Syntax

FUNCTIONS

57
New cards

Exception handling deals with:

A. Runtime anomalies

B. Tokens

C. Syntax errors

D. Parsing

RUNTIME ANOMALIES

58
New cards

Operator precedence determines:

A. Order of evaluation

B. Memory usage

C. Syntax

D. Execution time

ORDER OF EVALUATION

59
New cards

Associativity determines the following:

A. Execution

B. Tokens

C. Memory

D. Operator grouping

OPERATOR GROUPING

60
New cards

Infix notation places operators:

A. Between operands

B. Before operands

C. After operands

D. Outside operands

BETWEEN OPERANDS

61
New cards

Control flow structures guide:

A. Tokens

B. Execution path

C. Syntax

D. Memory

EXECUTION PATH

62
New cards

Selection statements include:

A. recursion

B. if, case

C. for, while

D. assignment ,

IF, CASE

63
New cards

Iteration structures include:

A. loops

B. syntax

C. if

D. recursion

LOOPS

64
New cards

Recursion differs from iteration because it:

A. Uses loops

B. Calls itself

C. Uses syntax

D. Uses memory

CALLS ITSELF

65
New cards

Operator precedence resolves:

A. Evaluation ambiguity

B. Syntax errors

C. Compilation

D. Runtime errors

EVALUATION AMBIGUITY

66
New cards

Parentheses are used to:

A. Execute faster

B. Avoid syntax

C. Override precedence

D. Reduce memory

OVERRIDE PRECEDENCE

67
New cards

Prefix notation places operators:

A. After operands

B. Inside operands

C. Before operands

D. Between operands

BEFORE OPERANDS

68
New cards

Postfix notation places operators:

A. Between operands

B. After operands

C. Around operands

D. Before operands

AFTER OPERANDS

69
New cards

Expressions produce:

A. Values

B. Syntax

C. No output

D. Side effects only

VALUES

70
New cards

Statements are executed for:

A. Tokens

B. Value

C. Side effects

D. Syntax

SIDE EFFECTS

71
New cards

(a + b) * c uses parentheses to:

A. Change precedence

B. Increase speed

C. Avoid syntax

D. Reduce memory

CHANGE PRECEDENCE

72
New cards

In a + b * c
multiplication occurs:

A. Simultaneously

B. Randomly

C. Last

D. First

FIRST

73
New cards

Postfix of A + B is:

A. A+B

B. BA+

C. AB+

D. +AB

AB+

74
New cards

Prefix of A * B is:

A. AB

B. BA*

C. A*B

D. AB*

AB

75
New cards

Short-circuit evaluation occurs in:

A. Arithmetic

B. Assignment

C. Syntax

D. Logical operators

LOGICAL OPERATORS

76
New cards

In AND operation if first is false:

A. Continue

B. Stop evaluation

C. Error

D. Restart

STOP EVALUATION

77
New cards

Assignment x += 5 is equivalent to:

A. x = 5

B. x = x - 5

C. x = 5 + x

D. x = x + 5

X = X + 5

78
New cards

Multiple assignment a = b = 0 means:

A. Only b zero

B. Only a zero

C. Both zero

D. Error

BOTH ZERO

79
New cards

Expression b + c produces:

A. Syntax

B. Value

C. Side effect

D. Error

VALUE

80
New cards

Statement list.sort() produces:

A. Side effect

B. Value

C. Token

D. Syntax

SIDE EFFECT

81
New cards

Precedence ensures:

A. Correct evaluation order

B. Execution

C. Memory allocation

D. Syntax correctness

CORRECT EVALUATION ORDER

82
New cards

Associativity determines:

A. Memory

B. Order of same precedence operators

C. Syntax

D. Order of different operators

ORDER OF SAME PRECEDENCE OPERATORS

83
New cards

Infix is most common because:

A. Binary

B. Human-readable

C. Machine-friendly

D. Faster

HUMAN-READABLE

84
New cards

Prefix avoids:

A. Execution

B. Ambiguity

C. Memory

D. Syntax

AMBIGUITY

85
New cards

Postfix is used in:

A. Compilers/intermediate code

B. High-level languages

C. Syntax only

D. Hardware

COMPILERS/INTERMEDIATE CODE

86
New cards

Short-circuit improves:

A. Syntax

B. Memory

C. Compilation

D. Efficiency

EFFICIENCY

87
New cards

Value-oriented languages treat variables as:

A. References

B. Values

C. Tokens

D. Objects

VALUES

88
New cards

Reference-oriented languages treat variables as:

A. Syntax

B. Values

C. Tokens

D. References

REFERENCES

89
New cards

Expressions differ from statements because:

A. Produce tokens

B. Produce syntax

C. Produce memory

D. Produce values

PRODUCE VALUES

90
New cards

Statement-oriented languages focus on:

A. Tokens

B. Expressions

C. Execution steps

D. Values

EXECUTION STEPS

91
New cards

Which is clearer for humans?

A. Binary

B. Infix

C. Prefix

D. Postfix

INFIX

92
New cards

Parentheses improve:

A. Syntax

B. Memory

C. Clarity

D. Speed

CLARITY

93
New cards

Short-circuiting is beneficial because:

A. Increases memory

B. Saves computation

C. Complicates syntax

D. Slows execution

SAVES COMPUTATION

94
New cards

Assignment is critical because it:

A. Reduces memory

B. Changes program state

C. Avoids execution

D. Defines syntax

CHANGES PROGRAM STATE

95
New cards

Recursion is powerful because it:

A. Eliminates loops

B. Reduces syntax

C. Avoids memory

D. Simplifies problems

SIMPLIFIES PROBLEMS

96
New cards

Designing control flow requires:

A. Memory

B. Execution structure

C. Syntax only

D. Tokens

EXECUTION STRUCTURE

97
New cards

Combining iteration and recursion improves:

A. Syntax

B. Tokens

C. Problem solving

D. Memory

PROBLEM SOLVING

98
New cards

Efficient control flow design focuses on:

A. Syntax

B. Tokens

C. Execution clarity

D. Parsing

EXECUTION CLARITY

99
New cards

A new evaluation model must define:

A. Memory

B. Precedence and associativity

C. Tokens

D. Syntax only

PRECEDENCE AND ASSOCIATIVITY

100
New cards

Advanced control flow integrates:

A. Syntax only

B. Selection, iteration, recursion

C. Memory only

D. Tokens only ,

SELECTION, ITERATION, RECURSION