COSC95 | MIDTERMS Flashcards

1
Q

a set of instructions that enables humans to communicate with computers using a series of symbols that serve as a bridge that allows humans to turn our ideas into instructions computer can understand

A

programming language

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

portion of the language that a computer can understand is called

A

binary

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

translating programming language into binary is known as

A

compiling

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

focuses on analyzing data, building machine learning models, and extracting insights

A

data science

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

focuses for creating video games

A

game development

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

focuses on creating application for mobile devices

A

mobile app development

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

focuses on build websites and web applications

A

web development

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

it scans the entire program and translates it as a whole into machine code

A

compiler

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

it transforms the codes written in the programming language into machine code

A

compiler

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

it generally occupies a larger part of the memory and the program run-time is longer

A

compiler

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

it translates program one statement at a time

A

interpreter

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

it converts high-level language to an intermediate language

A

interpreter

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

it usually takes less amount of time to analyze the source code

A

interpreter

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

interpreter’s execution time is comparatively __ than compilers

A

slower

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

a type of computer program where it translates assembly language into machine code

A

assembler

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

it uses mnemonics to represent machine instructions, making it more human-readable than raw machine code

A

assembly language

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

assembly language uses?

A

mnemonics

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

they are short, easy-to-remember abbreviations that represent machine instructions

A

mnemonics

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

they are like symbolic codes as a stand in for the actual binary instructions

A

mnemonics

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

it is a utility program that takes the object files and other code to join them into a single executable file

A

linker

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

two types of linker

A

static linker and dynamic linker

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

it merges all object files and libraries into a single executable and the final executable contains all required code

A

static linker

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

it links necessary libraries at runtime instead of compile time

A

dynamic linker

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

it executes the programs or the executable file into memory for execution by the CPU

A

loader

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
each assembly language file is assembled into an
object code
26
it is a collection of object files
static library
27
they generally make use of libraries for things such as I/O, math, etc.
application programmers
28
it can use some specialized tools that help in implementing various phases of a compiler
compiler construction/writer
29
these tools assist in the creation of an entire compiler or its parts
compiler construction/writer
30
compiler operates in ?
phases
31
it operates in phases
compiler
32
it is a logically interrelated operation that takes source program in one representation and produces output in another representation
phases
33
two phases of compilation
analysis and synthesis
34
machine independent/language dependent
analysis
35
machine dependent/language independent
synthesis
36
it is partition into no-of-sub processes called “Phases”
compilation process
37
no-of-sub processes is also known as?
phases
38
it reads the source program one character at a time
lexical analysis/scanners
39
sequence of atomic units called?
tokens
40
it is a sequence of characters that can be treated as a unit in the grammar of the programming languages
lexical token
41
it generally breaks the input into tokens
lexical analysis
42
it generates parsers that check whether the input follows the language’s syntax
syntax analysis
43
it checks whether the sequence of tokens follows the correct grammar
syntax analysis
44
this phase ensures that declarations and statements of the program are semantically correct
semantic analysis
45
it is an important part of semantic analysis where compiler makes sure that each operator has matching operands
type checking
46
a compiler must check that the source program follows both syntactic and semantic conventions of the source language
type checking
47
it ensures that data types are used in a way consistent with their definition
type checking
48
it converts the high-level source code into an intermediate representation
intermediate code generators
49
intermediate code generators converts the __ into an __
high-level source code intermediate representation
50
this phase bridges the analysis and synthesis phases of translation
intermediate code generators
51
intermediate code generators bridges what phases of translation?
analysis and synthesis phases
52
it generates a machine-independent intermediate representation
intermediate code generation
53
it improves the performance of the generated code by optimizing memory usage, execution time, and redundancy
code optimization
54
this is an optional phase – in which it improves the intermediate code, so that the output runs faster and takes less space
code optimization
55
this is the last phase of translation
code generators
56
a number of optimizations to reduce the length of machine language program are carried out during this phase
code generators
57
this phase generates the final machine code
code generators
58
it converts optimized intermediate code into assembly/machine code
code generation
59
code generation converts optimized intermediate code into?
assembly/machine code
60
the __executes on the processor
final machine code
61
it keeps the names used by the program and records essential information about them
table management
62
they are invoked when a flaw error in the source program is detected
error handlers
63
it reads and converts the input into a stream of tokens to be analyzed by parser
lexical analysis
64
lexical analysis is also known as?
scanning
65
it serves as a bridge between the source code and syntax analysis
lexical analysis
66
it collects characters into logical groupings and assigns internal codes to the groupings according to their structure
lexical analyzer
67
it is the sequence of characters that form a meaningful unit
lexeme
68
it is a classification of a lexeme
token
69
it is a set of strings in the input for which the same token is produced as output
pattern
70
the main task of it is to read the input character and produce as output of sequence of tokens that the parser uses for syntax analysis
lexical analyzer
71
upon receiving a __command from the parser, the lexical analyzer reads the input character until it can identify the next token
‘get next token’
72
lexical analysis also performs certain secondary tasks as the
user interface
73
it includes removal of white spaces and comments
lexical-analysis process
74
these are the errors thrown by the lexer when unable to continue
lexical errors
75
the simplest recovery strategy
'panic mode' strategy
76
error-recovery actions are
delete insert replace transpose
77
it is a sequence of characters in the source program that is matched by the pattern for a token
lexemes
78
it is the lowest-level unit of meaning in a program
lexemes
79
it is a set of strings in the input for which the same token is produced as output
pattern
80
pattern is typically designed using
regular expressions or finite automata
81
it is a sequence of characters that can be treated as a single logical entity
token
82
it is a sequence of characters that define a search pattern
regular expression
83
it is mainly used for matching substrings in text
regular expressions
84
for any grammar is program that takes as input string w and produces as output either a parse tree for w
parser
85
its goal is to determine the syntactic validity of a source string is valid
parser
86
types of parsers
top-down parser bottom-up parser
87
build parse trees from top to bottom
top-down parser
88
build parse trees from leaves and work up to top
bottom-up parser
89
it is a type of formal language generated by a context-free grammar
context-free language
90
it is a set of recursive rules used to generate strings in a language
context-free grammar
91
CFG is defined by a
4-tuple
92
set of variables (non-terminals)
V
93
alphabet (terminals)
Σ
94
set of production rules
R
95
start variable
𝑆∈V
96
the symbol from left-hand side of production rules are called
non-terminal symbols
97
the symbol from right-hand side of production rules are called
terminal symbols
98
it defines what strings can be use as replacement to a variable
production rule
99
it is the process of transforming the start variable S to a string w containing only terminal symbols such as S -> w
derivation
100
it is a derivation that always replaces the leftmost variable in a string
leftmost derivation
101
it is a derivation that always replaces the rightmost variable in a string
rightmost derivation
102
it is a graphical depiction of a derivation
parse tree
103
it is a hierarchical, tree-like representation of the structure of a string generated by a context-free grammar (CFG)
parse tree
104
inner nodes of a parse tree are
non-terminal symbols
105
the leaves of a parse tree are
terminal symbols
106
it always expands the leftmost non-terminal first
leftmost derivation
107
it always expands the rightmost non-terminal first
rightmost derivation
108
it occurs when a single grammar (or string) can be derived in more than one way
ambiguity
109
it leads to multiple interpretations of the same grammar
ambiguity
110
it is a formal method for describing the syntax of programming language
backus naur form notation
111
it provides a precise and unambiguous way to define the structure of language constructs
backus naur form notation
112
backus naur form notation was introduced and refined by?
introduced by john backus and refined by peter naur in the 1960s
113
symbol ∷= means
may expand into or may get replaced with
114
every name in BNF is surrounded by
angle brackets < >
115
it is an expression containing terminal symbols and non-terminal symbols
expansion
116
they are separated by a vertical bar |, meaning OR
alternatives
117
abstract symbols representing language constructs
non-terminal
118
actual symbols or tokens in the language
terminal
119
define how non-terminals expand into sequences of terminals and non-terminals
production rule
120
it is the top-level non-terminal that represents a valid sentence in the language
start symbol