Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

proglang fa1-3

Total questions: 179

Worksheet time: 45hrs 45mins

Name
Class
Date
1.
The ML is a general-purpose functional programming language developed by Robin Milner and others in the early 1970s at the University of Edinburgh. ML stands for MetaLanguage.
a)
True
b)
False
2.
A computer program that links and merges various object files together in order to make an executable file.
a)
LINKER
b)
INTERPRETER
c)
None of the Above
d)
COMPILER
3.
In MetaLanguage(ML), help you understand first-class functions/closures, streams, catch and throw, symbol internals.
a)
False
b)
True
4.
An assembler translates assembly language programs into machine code.
a)
True
b)
False
5.
An Interpreter reads the whole source code at once, creates tokens, checks semantics, generates intermediate code, executes the whole program and may involve many passes.
a)
False
b)
True
6.
A general-purpose, imperative programming language that is especially suited to numeric computation and scientific computing.
a)
FORTRAN
b)
C LANGUAGE
c)
None of the Above
d)
MODULA-3
7.
The language is intended for the way of thinking and way of expressing algorithms
a)
True
b)
False
8.
If an error occurs, an interpreter stops execution and reports it; whereas a compiler reads the whole program even if it encounters several errors.
a)
True
b)
False
9.
The __________Analyzer breaks the sentence into tokens.
a)
LINEAR
b)
None of the Above
c)
SEMANTIC
d)
SYNTAX
10.
The compiler merely produces the machine language instructions that correspond to the source code file that was compiled.
a)
True
b)
False
11.
A compiler hides further steps; a pre-processor does not hide steps.
a)
True
b)
False
12.
The main C language compiler produces .NET Common Intermediate Language (CIL), which is then translated into machine code immediately prior to execution.
a)
False
b)
True
13.
Assembly-level instruction set is not implemented in hardware; it runs on an interpreter.
a)
True
b)
False
14.
The Intermediate Form (IFs) are often chosen for machine independence, ease of optimization, or compactness.
a)
True
b)
False
15.
The Lexcial Analyzer removes spaces and other unnecessary things like comments.
a)
True
b)
False
16.
What is the Language developed for backing of a powerful sponsor?
a)
COBOL
b)
PASCAL
c)
FORTRAN
d)
None of the Above
17.
A modern programming language designed for large, long-lived applications – and embedded systems in particular – where reliability and efficiency are essential.
a)
ADA
b)
FORTRAN
c)
None of the Above
d)
COBOL
18.
A programming language conceived as a successor to an upgraded version of Modula-2 known as Modula-2+.
a)
MODULA-3
b)
C LANGUAGE
c)
None of the Above
d)
FORTRAN
19.
The interpreter stays around for the execution of the program.
a)
True
b)
False
20.
The Common Lisp (CL) is a dialect of the Lisp programming language, published in ANSI standard document.
a)
True
b)
False
21.
An imperative and procedural programming language, which Niklaus Wirth designed in 1968–69 and published in 1970.
a)
PASCAL
b)
FORTRAN
c)
MODULA-3
d)
None of the Above
22.
A preprocessor is generally considered as a part of compiler, is a tool that produces input for compilers.
a)
True
b)
False
23.
The __________ takes an intermediate-code program and produces another one that does the same thing faster, or in less space.
a)
OPTIMIZATION
b)
None of the Above
c)
ABSTRACTION
d)
ENCAPSULATION
24.
Scanning divides the program into "tokens", which are the smallest meaningful units; this saves time, since character-by-character processing is slow
a)
True
b)
False
25.
The recursive rules known as parsing define the ways in which these constituents combine.
a)
False
b)
True
26.
The interpreter does what is called STATIC semantic analysis.
a)
False
b)
True
27.
What is the Language possible to compile to very good (fast/small) code?
a)
FORTRAN
b)
PASCAL
c)
None of the Above
d)
COBOL
28.
The minor task of a linker is to search and locate referenced module/routines in a program
a)
False
b)
True
29.
The compiler is the point of control during execution.
a)
False
b)
True
30.
A programming language that is wide dissemination at minimal cost like Pascal and Java.
a)
True
b)
False
31.
FORTRAN is originally developed by IBM in the 1950s for scientific and engineering applications.
a)
True
b)
False
32.
The output of an assembler is called an object file, which contains a combination of machine instructions as well as the data required to place these instructions in memory.
a)
True
b)
False
33.
The term ___________refers to the processing of source code files (.c, .cc, or .cpp) and the creation of an 'object' file.
a)
COMPILATION
b)
INTERPRETATION
c)
None of the Above
d)
LINKER
34.
Compilation is translation from one language into another, with full analysis of the meaning of the input.
a)
True
b)
False
35.
The Java language definition defines a machine-independent intermediate form known as byte code.
a)
True
b)
False
36.
The Intermediate form (IF) done after semantic analysis.
a)
True
b)
False
37.
The interpreter can be figured out at compile time.
a)
False
b)
True
38.
ALGOL 69 (short for ALGOrithmic Language 1969) is an imperative computer programming language that was conceived as a successor to the ALGOL 60 programming language
a)
False
b)
True
39.
The interpretation allows greater flexibility while Compilation use for better performance.
a)
True
b)
False
40.
An interpreter uses a linker program to merge the appropriate library of subroutines.
a)
False
b)
True
41.
Interpreter is written in low-level instructions.
a)
True
b)
False
42.
The term parsing is part of the recognition of a regular language.
a)
False
b)
True
43.
In parsing it finds the structure you can describe with syntax diagrams.
a)
True
b)
False
44.
In C programming language , help you understand unions, arrays & pointers, separate compilation, var args, catch and throw.
a)
True
b)
False
45.
A program that converts high-level language to assembly language
a)
COMPILER
b)
TRANSLATOR
c)
INTERPRETER
d)
None of the Above
46.
An interpreter, like a compiler, translates high-level language into low-level machine language
a)
True
b)
False
47.
A program that converts the assembly language to machine-level language.
a)
ASSEMBLER
b)
None of the Above
c)
INTERPRETER
d)
TRANSLATOR
48.
The parsing organizes tokens into a parse tree that represents higher-level constructs in terms of their constituents.
a)
True
b)
False
49.
The __________ looks for compiler directives and removes the comments and white space.
a)
PREPROCESSOR
b)
None of the Above
c)
INTERPRETER
d)
LEXICAL ANALYZER
50.
Parsing is recognition of a context-free language.
a)
True
b)
False
51.
Algol 68 is a functional programming language and one of the two main dialects of the programming language Lisp.
a)
False
b)
True
52.
The main C# compiler produces .NET Common Intermediate Language (CIL), which is then translated into machine code immediately prior to execution.
a)
True
b)
False
53.
The preprocessor deletes portions of code, which allows several versions of a program to be built from the same source
a)
True
b)
False
54.
FORTRAN is a programming language intended for numerical computations.
a)
True
b)
False
55.
A general-purpose, object-oriented programming language. It supports both static and dynamic typing.
a)
COBRA
b)
MODULA-3
c)
None of the Above
d)
C LANGUAGE
56.
The ________code is the standard format for distribution of Java programs.
a)
BYTE
b)
BIT
c)
WORD
d)
None of the Above
57.
Most language implementations include a mixture of both compilation and interpretation.
a)
True
b)
False
58.
Scanning discovers the "context free" structure of the program.
a)
False
b)
True
59.
The parser analyzes the ____________(token stream) against the production rules to detect any errors in the code.
a)
SOURCE CODE
b)
PROGRAM CODE
c)
LIST CODE
d)
None of the Above
60.
A program may have the following kinds of errors at various stages: Lexical, Syntactical, Semantical and the ______________.
a)
LOGICAL
b)
ANALYTICAL
c)
None of the Above
d)
SEMANTIC
61.
A parser should be able to detect and report any error in the program.
a)
True
b)
False
62.
A type of error about name of some identifier typed incorrectly.
a)
LEXICAL
b)
LOGICAL
c)
SEMANTIC
d)
None of the Above
63.
A syntax analyzer or parser is a program that groups sequences of tokens from the lexical analysis phase into phrases each with an associated phrase type.
a)
True
b)
False
64.
In the statement mode, When parser encounters an error anywhere in the statement, it ignores the rest of the statement by not processing input from erroneous input to delimiter, such as semi-colon.
a)
False
b)
True
65.
In error handling, the lexical errors state: important, compiler can easily recover and continue.
a)
True
b)
False
66.
In panic mode, when a parser encounters an error anywhere in the statement, it ignores the rest of the statement by not processing input from erroneous input to delimiter, such as semi-colon.
a)
True
b)
False
67.
The Dynamic semantic errors: hard or impossible to detect at compile time, runtime checks are required.
a)
True
b)
False
68.
Expression: a := x * y + z After lexical analysis, this statement has the structure: id1 assign id2 binop1 id3 binop2 id4
a)
True
b)
False
69.
String: a group of characters having a collective meaning.
a)
False
b)
True
70.
A grammar is a set of strings over an alphabet.
a)
False
b)
True
71.
In Finite Automata, Vertices – represents the states and ________ – represents transitions.
a)
EDGES
b)
None of the Above
c)
ROOT
d)
VERTEX
72.
Tokens are specified by regular expressions.
a)
True
b)
False
73.
The Semantic analyzer: reads input characters and produces a sequence of tokens as output.
a)
True
b)
False
74.
Error production: Some common errors are known to the compiler designers that may occur in the code.
a)
True
b)
False
75.
It is not important to detect errors as soon as possible without further consuming unnecessary input.
a)
False
b)
True
76.
It is expected that when an error is encountered, the parser should be able to handle it and carry on parsing the rest of the input.
a)
True
b)
False
77.
The grammar designers have to be careful here because one wrong correction may lead to an infinite loop.
a)
False
b)
True
78.
The parser considers the program in hand as a whole and tries to figure out what the program is intended to do and tries to find out a closest match for it, which is error-free.
a)
True
b)
False
79.
In syntax analysis, a parser is not required to detect and report any error in the program.
a)
False
b)
True
80.
According to handling errors, the logical errors: hard or impossible to detect.
a)
True
b)
False
81.

A (a)   over an alphabet is a finite sequence of symbols drawn from that alphabet.

82.
There are a number of algebraic laws that are obeyed by regular expressions, which can be used to manipulate regular expressions into equivalent forms.
a)
True
b)
False
83.
An expression can be the sum of two expressions, or the product of two expressions, or a parenthesized subexpression.
a)
True
b)
False
84.
Lexical analyzer does not have to be an individual phase. But having a separate phase simplifies the design and improves the efficiency and portability.
a)
True
b)
False
85.
The Union of two languages L and M is written as L U M = {s | s is in L or s is in M}.
a)
True
b)
False
86.
A ___________is a logical unit with respect to the rules of the source language.
a)
PHRASE
b)
WORD
c)
SYNTAX
d)
None of the Above
87.
In error recovery choose a minimal sequence of changes to obtain a global least- cost correction.
a)
True
b)
False
88.
One of the major roles of the parser is not to produce an intermediate representation (IR) of the source program using syntax-directed translation methods.
a)
False
b)
True
89.
A type of error about the incompatible value assignment.
a)
SEMANTICAL
b)
LOGICAL
c)
ANALYTICAL
d)
None of the Above
90.
Parsers use error recovering strategies.
a)
True
b)
False
91.
The pattern is the rule describing how a token can be formed.
a)
True
b)
False
92.

(a)   is a state machine that takes a string of symbols as input and changes its state accordingly.

93.
The Lexical analyzer: reads input characters and produces a sequence of tokens as output.
a)
True
b)
False
94.
In verifying the validity of expressions in Lexical Analysis, a well-accepted solution is to use finite automata for verification.
a)
True
b)
False
95.
A syntax analyzer or parser takes the input from a lexical analyzer in the form of token streams.
a)
True
b)
False
96.
A type of error about some missing semicolon or unbalanced parenthesis.
a)
SYNTACTICAL
b)
ANALYTICAL
c)
LOGICAL
d)
None of the Above
97.
Type of mode which is the easiest way of error-recovery and also, it prevents the parser from developing infinite loops.
a)
PANIC MODE
b)
PARITY MODE
c)
ERROR MODE
d)
None of the Above
98.
In handling errors, the ______________ : most important for compiler, can almost always recover.
a)
SYNTAX ERRORS
b)
PARITY MODE
c)
None of the Above
d)
ERROR MODE
99.
The regular expression is a set of rules that say how to build a tree—a parse tree.
a)
False
b)
True
100.
The viable-prefix property of parsers allows early detection of syntax errors.
a)
True
b)
False
101.
According to handling errors, the lexical errors: important, can sometimes recover.
a)
False
b)
True
102.
It is not expected from the parser to check for errors but errors may be encountered at various stages of the compilation process.
a)
False
b)
True
103.
The regular expressions is an algebraic notation for describing sets of strings.
a)
True
b)
False
104.
In Lexical analysis, a well-accepted solution is to use finite automata for verification.
a)
True
b)
False
105.
The lexical analyzer filters out whatever separates the tokens, lay-out characters and comments.
a)
True
b)
False
106.
A __________is a group of characters having a collective meaning.
a)
TOKEN
b)
STRING
c)
NODE
d)
None of the Above
107.
In Notation, the Union: (r)(s) is a regular expression denoting L(r)L(s).
a)
False
b)
True
108.
The time of translation of high-level constructs to machine code and choice of memory layout for object.
a)
COMPILE TIME
b)
None of the Above
c)
RUN TIME
d)
EXECUTION TIME
109.
It is difficult to overstate the importance of binding times in programming languages.
a)
True
b)
False
110.
In storage management, in the heap variables can be resized using realloc().
a)
True
b)
False
111.
The binding lifetime - (or life cycle) of an object is the period between the object creation and destruction.
a)
False
b)
True
112.
According to object storage management, the ____________ objects are allocated in last-in first-out order, usually in combination with subroutine calls and returns
a)
STACK
b)
STATIC
c)
None of the Above
d)
HEAP
113.
The run time happens during which a program executes.
a)
True
b)
False
114.
In the storage allocation mechanism, it includes the static, stack and __________.
a)
HEAP
b)
DYNAMIC
c)
REALLOC
d)
None of the Above
115.
The scope time is the point at which a binding is created or, more generally, the point at which any implementation decision is made.
a)
False
b)
True
116.
A __________is a maximal region of the program where no bindings are destroyed.
a)
SCOPE
b)
BIND
c)
RULE
d)
None of the Above
117.
The lexical scoping (sometimes known as _________ scoping) is a convention used with many programming languages that sets the scope of a variable.
a)
STATIC
b)
SEMANTIC
c)
SYNTACTIC
d)
None of the Above
118.
In programming language, _______________happens when a variable declared in a block is accessible in the block and all inner blocks of that block, but not accessible outside the block
a)
BLOCK SCOPE
b)
LOCAL SCOPE
c)
None of the Above
d)
GLOBAL SCOPE
119.
The binding time is determined when the code is compiled.
a)
False
b)
True
120.
The _______________________ active bindings are determined by the flow of execution at run time.
a)
DYNAMIC SCOPING
b)
CONSTANT SCOPING
c)
None of the Above
d)
STATIC SCOPING
121.
A scope in any programming is a region of the program where a defined variable can have its existence and beyond that variable cannot be accessed.
a)
True
b)
False
122.
The term Referencing environment of a statement at run time is the set of active bindings.
a)
True
b)
False
123.
Compilation entails semantic understanding of what is being processed.
a)
True
b)
False
124.
The compilation does NOT have to produce machine language for some sort of hardware.
a)
True
b)
False
125.
The Lexical analyzer does not have to be an individual phase.
a)
True
b)
False
126.

The word (a)   in terms of programming languages, words are objects like variable names, numbers, keywords.

127.
A lexeme is a particular instant of a token.
a)
True
b)
False
128.
Finite automata is a not recognizer for regular expressions.
a)
False
b)
True
129.
The language defined by regular grammar is known as Irregular language.
a)
True
b)
False
130.
___________It is defined as the grammar in each programming language.
a)
SYNTAX
b)
LOGICAL
c)
SEMANTICAL
d)
None of the Above
131.

The generated lexers are in a class of extremely simple programs called (a)   .

132.
The grammar defined by regular expressions is known as regular grammar.
a)
False
b)
True
133.
In Notation, Union : (r)|(s) is a regular expression denoting L(r) U L(s).
a)
True
b)
False
134.
The regular expressions have the capability to express finite languages by defining a pattern for finite strings of symbols.
a)
True
b)
False
135.
A lexical analyzer, or ______ for short, will as its input take a string of individual letters and divide this string into tokens.
a)
LEXER
b)
LEXAL
c)
None of the Above
d)
LEXIS
136.
The time at which multiple object codes (machine code files) and libraries are combined into one executable.
a)
LINK TIME
b)
EXECUTION TIME
c)
RUN TIME
d)
None of the Above
137.
The time at which the operating system loads the executable in memory.
a)
LOAD TIME
b)
LINK TIME
c)
None of the Above
d)
RUN TIME
138.
The __________ allows variables to be accessed globally and no guaranteed efficient use of space, memory may become fragmented over time as blocks of memory are allocated.
a)
HEAP
b)
STACK
c)
STATIC
d)
None of the Above
139.
The prologue typically sets up any pointer to parameters that might be passed on the stack.
a)
True
b)
False
140.
According to Referencing environments the scope rules determine that collection and its order.
a)
True
b)
False
141.
The determination of scopes can be made by the compiler is called static scoping.
a)
True
b)
False
142.
The determination of scopes cannot be made by the compiler is called dynamic scoping.
a)
True
b)
False
143.
Many properties of a programming language are defined during its creation.
a)
True
b)
False
144.
The program __________time the programmer's choice of algorithms and data structures.
a)
WRITING
b)
None of the Above
c)
EXECUTION
d)
READING
145.
In declaration of the form “int a;”: It means that variable with identifier “a” as integer and some memory allocated to it is created in the stack.
a)
True
b)
False
146.
The heap – is a large area of memory from which the programmer can allocate blocks as needed, and deallocate them when no longer needed.
a)
True
b)
False
147.
The key idea in semantic scope rules is that bindings are defined by the physical (lexical) structure of the program
a)
False
b)
True
148.
According to dynamic scopes, the determination of scopes cannot be made by the compiler.
a)
True
b)
False
149.
In static scope rules are usually encountered in interpreted languages.
a)
False
b)
True
150.
According to scope of an identifier is the part of the program where the identifier may not directly be accessible.
a)
False
b)
True
151.
In dynamic scope rules, bindings depend on the current state of program execution.
a)
True
b)
False
152.
The term that refer to variables, constants, operations, and types using identifier called _________.
a)
NAMES
b)
CONSTANT
c)
STRING
d)
None of the Above
153.
According to object storage management, the _______objects may be allocated and deallocated at arbitrary times but require an expensive storage management algorithm.
a)
HEAP
b)
None of the Above
c)
STATIC
d)
STACK
154.
The static objects have an absolute storage address that is retained throughout the execution of the program
a)
True
b)
False
155.
The object destruction simply consists of deallocating the memory.
a)
True
b)
False
156.
The period of time from creation to destruction is called the ____________ of a binding.
a)
LIFETIME
b)
EXECUTION TIME
c)
LIFESPAN
d)
None of the Above
157.
In C programming, the scope rules can be covered under following two categories. Global scope and local scope.
a)
False
b)
True
158.
The most common use of dynamic scope rules is to provide implicit parameters to subroutines.
a)
True
b)
False
159.
In static scoping, most recent scan of the program from top to bottom.
a)
True
b)
False
160.
In ___________is an association between two things, such as a name and the thing it names.
a)
BINDING
b)
SCOPE
c)
None of the Above
d)
NAME
161.
Binding Time is the point at which a binding is created or, more generally, the point at which any implementation decision is made.
a)
True
b)
False
162.
The type of scoping that active bindings are determined using the text of the program is called _____________________.
a)
STATIC SCOPING
b)
None of the Above
c)
DYNAMIC SCOPING
d)
CONSTANT SCOPING
163.
A referencing environment corresponds to a collection of scopes that are examined (in order) to find a binding.
a)
True
b)
False
164.
The scope of a binding is the part of the program or time interval(s) in the program’s execution during which the binding is active.
a)
True
b)
False
165.
A binding is dynamic if it occurs before run time and remains unchanged throughout program execution.
a)
False
b)
True
166.
The static scoping means that the active bindings are determined using the text of the program.
a)
True
b)
False
167.
In Pascal language they introduced the term elaboration for the process of creating bindings when entering a scope.
a)
False
b)
True
168.
The run time at which the operating system loads the executable in memory and choice of physical addresses.
a)
False
b)
True
169.
According to storage management, the term ________ is use for local variables only and the space is managed efficiently by CPU, memory will not become fragmented.
a)
STACK
b)
HEAP
c)
STATIC
d)
None of the Above
170.
The epilogue and prologue of a function are simply the set of instructions that 'set up' the context for the function when it's called and clean up when it returns.
a)
True
b)
False
171.
The ______________ rules determine which instance of a scope should be used to resolve references when calling a procedure that was passed as a parameter=.
a)
BINDING
b)
SCOPE
c)
None of the Above
d)
STATIC
172.
Some overloading happens in almost all languages example the read and write in Pascal language.
a)
True
b)
False
173.
The term binding is determined when the code is compiled.
a)
False
b)
True
174.
The compiled languages tend to have early binding times.
a)
True
b)
False
175.
A binding is an association, such as between an attribute and an entity or between an operation and a symbol.
a)
True
b)
False
176.
The term ____________ scope can be accessed anywhere in a program.
a)
GLOBAL
b)
None of the Above
c)
LOCAL
d)
BLOCK
177.
In static scoping, the determination of scopes can be made by the _______________.
a)
COMPILER
b)
None of the Above
c)
LINKER
d)
INTERPRETER
178.
Some languages get into overloading in a big way like Ada and C++ programming language.
a)
True
b)
False
179.
Most compiled languages employ static scope rules.
a)
True
b)
False