opl 2

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

In a bottom up parser, what does it mean to perform a shift action? a. bits are moved n digit positions to the left/right b. values are popped from the parser's stack c. the next input token is placed onto the parser's stack d. lowercase characters are converted to uppercase characters e. bottom up parsers don't perform shifts, top down parsers do

the next input token is placed onto the parser's stack

A bottom-up parser construct a? a. Parse tree beginning at the leaves towards the root b. Parse tree beginning at the root and towards the leaves c. Parse tree from root and all the way to the LHS. d. Parse tree from root and all the way to the RHS. e. Parse tree from the LHS leaves to the root.

Parse tree beginning at the leaves towards the root

Which of the following is an advantage of using BNF? a. BNF descriptions of the syntax of programs are clear and concise, for both human and computers b. BNF descriptions can be used as the direct basis for the syntax analyzer c. Implementations based on BNF are easy to maintain d. All of the above are advantages e. None of the above are advantages

All of the above are advantages

Binding can be ___. A. coercing or casting B. implicit or explicit C. static or dynamic D. local or global E. internal or external

static or dynamic

Which of the following is a similarity between top down and bottom up parsers? a. Many only have 1 token ahead in the input b. They both start at the leaves c. They both start at the root d. Their order is leftmost derivation e. They share the same time complexity

Many only have 1 token ahead in the input

What is an advantage of LR parsers? a. They will work for all grammars that describe programming languages b. They can detect inferential errors quickly c. They are as efficient at any other top-bottom parsers d. LR class of grammars is a superset of the class parse able by nLR parsers e. They are recursive parsers which allows fast analysis than non-recursive

They will work for all grammars that describe programming languages

With this binding, binding of subscript ranges and storage allocation is dynamic and can change any number of times. The advantage is flexibility (as arrays can grow or shrink during program execution). A. static B. fixed stack-dynamic C. stack-dynamic D. fixed heap-dynamic E. heap-dynamic

heap-dynamic

Array ___ is a mapping from indices to elements. A. Indexing B. Range C. Length D. Initializing E. Ordering

indexing

To store a fixed number of decimal digits, in coded form (BCD), it uses ___ bits for a decimal digit. A. 2 B. 4 C. 8 D. 16 E. 32 F. 64

4

Which one of the following statements is NOT correct? A. In many languages, notably the C-based languages, names are case sensitive. B. For example, the following three names are distinct in C++: rose, ROSE, and Rose. C. To some people, "name being case sensitive" is a serious detriment to orthogonality, because names that look very similar in fact denote different entities. D. With "name being case sensitive", case sensitivity violates the design principle that language constructs that look similar should have similar meanings. E. The problems of case sensitivity in C are avoided by the convention that variable names do not include uppercase letters.

To some people, "name being case sensitive" is a serious detriment to orthogonality, because names that look very similar in fact denote different entities.

A variable can be characterized by a collection of properties, or attributes, the most important of which is ____. A. Abstraction B. Attribute C. Class D. Lifetime E. Object F. Scope G. Type

Type

Which of the following statements about top-down parsing is true? a. Oriented around rightmost derivation tracing b. Parse tree creation/traversal or is a reversal of the postorder approach c. Parse tree creation/traversal follows the postorder approach d. Parse tree creation/traversal follows the inorder approach e. Parse tree creation/traversal follows the preorder approach

Parse tree creation/traversal follows the preorder approach

Which of the following is not a component of a Context-Free Grammar? a. Non-terminals b. Terminal symbols c. Productions d. Simple phrases e. A start symbol

Simple phrases

Which one of the following statements is NOT correct? A. Special words in programming languages are used to make programs more readable by naming actions to be performed. B. Special words also are used to separate the syntactic parts of statements and programs. C. In most languages, special words are classified as reserved words, which means they cannot be redefined by programmers. D. Some of the special words are only keywords, which means they can be redefined. E. Special words in programming languages tend to be long in length.

Special words in programming languages tend to be long in length.

The lexical-analysis process includes skipping ¬¬¬_______ and _____________ outside lexemes, as they are not relevant to the meaning of the program. a. Comments, white spaces b. White spaces, commas c. Commas, comments d. Commas, semicolons e. Semicolons, colons

Comments, white spaces

A rule that has ε as its RHS is called a(n)... a. Erasure Rule b. Direct Right Rule c. Pairwise disjointedness d. Right Factoring e. Removal Rule

Erasure rule

______ programming languages allow expressions to be named. A. Abstract B. Functional C. Imperative D. Logical E. Object-Oriented F. Agile

Functional

An LR parser uses a(n) ________, a(n) __________, and a(n) ____________. a. Parse Table, Input Buffer, Stack of "sticks" b. Shift, Reduce, "got to new state" c. Parse Table, Reduce, Stack of "blocks" d. Shift, Input Buffer, Stack of "Contents" e. Parse Table, Input Buffer, Stack of "states"

Parse Table, Input Buffer, Stack of "states"

At ____, a variable in a Java program is bound to a particular data type. A. language design time B. language implementation time C. compile time D. load time E. link time F. run time. G. termination time

compile time

The asterisk symbol (*) is usually bound to the multiplication operation at ___. A. language design time B. language implementation time C. compile time D. load time E. link time F. run time. G. termination time

language design time

A data type, such as int in C, is bound to a range of possible values at ____. A. language design time B. language implementation time C. compile time D. load time E. link time F. run time. G. termination time

language implementation time

The handle of a right sentential form is its _____ simple phrase. a. rightmost b. topmost c. bottommost d. second most e. leftmost

leftmost

A lexical analyzer is a pattern matcher that isolates the small-scale parts of a program, which are called ____. a. Tokens b. Symbols c. lexemes d. Characters e. Keywords

lexemes

For length option(s) of string data type, some languages (e.g., C and C++), it is ___. In these languages, a special character is used to indicate the end of a string's characters, rather than maintaining the length. A. Static Length B. Limited Dynamic Length C. Dynamic Length (no maximum) D. Heap Length E. Stack-dynamic Length

limited dynamic length

A variable may be bound to a storage cell when the program is loaded into memory at ____. A. language design time B. language implementation time C. compile time D. load time E. link time F. run time. G. termination time

load time

Bottom-up parsers are often called ______ because shift and reduce are the two most common actions they specify a. shift-small algorithms b. shift-reduce algorithms c. parse-reduce algorithms d. SR algorithms e. pushdown algorithms

shift-reduce algorithms

What is the one thing that language implementation system must analyzed, regardless of the specific implementation approach? a. source code b. data c. range d. syntax analysis e. lexical

source code

With this binding, array subscript ranges are dynamically bound and the storage allocation is dynamic (done at run-time). The advantage is flexibility as the size of an array need not be known until the array is to be used. A. static B. fixed stack-dynamic C. stack-dynamic D. fixed heap-dynamic E. heap-dynamic

stack-dynamic

A binding is ____ if it first occurs before run time begins and remains unchanged throughout program execution. A. dynamic B. immutable C. global D. local E. physical F. static G. statistical

static

Arrays can be ___, as in C++ arrays whose definition includes the static specifier. A. static B. stack-dynamic C. fixed stack-dynamic D. fixed heap dynamic E. physical memory F. virtual memory

static

With this binding, array subscript ranges are statically bound and storage allocation is static (before run-time). The advantage is efficiency (for no dynamic allocation). A. static B. fixed stack-dynamic C. stack-dynamic D. fixed heap-dynamic E. heap-dynamic

static

___ scoping provides a simple, reliable, and efficient method of allowing visibility of nonlocal variables in subprograms. A. flexible B. stack-dynamic C. static D. heap-dynamic E. heap-static

static

For length option(s) of string data type, some languages (e.g., COBOL, Java's String class), it is ___. A. Static Length B. Limited Dynamic Length C. Dynamic Length (no maximum) D. Heap Length E. Stack-dynamic Length

static length

Variables can be characterized by the sextuple of attributes. Which is not one of these six attributes? A. name B. type C. lifetime D. storage E. scope

storage

Which one of the following statements is NOT correct? Bindings can take place at ____. A. language design time B. language implementation time C. compile time D. load time E. link time F. run time. G. termination time

termination time

For variable, the term ____ is often used interchangeably with name. A. alias B. attribute C. identifier D. property E. scope F. symbol

Identifier

Which of the following makes a parsing algorithm more efficient? a. Making the algorithm work for any unambiguous grammar b. Backing up parts of a sentence more often c. Making the algorithm work for only a subset of all possible grammars d. Designing the parser for a language with many types of syntax errors e. Increasing sentence length

Making the algorithm work for only a subset of all possible grammars

___ data types are not defined in terms of other data types A. Static B. Dynamic C. Heap D. Primitive E. Generic

primitive

Aliasing is a hindrance to ____ because it allows a variable to have its value changed by an assignment to a different variable. A. complexity B. orthogonality C. conformance D. readability E. writability

readability

The binding of a variable to a storage cell may not happen until ____ in some cases, as with variables declared in Java methods. A. language design time B. language implementation time C. compile time D. load time E. link time F. run time. G. termination time

run time

____ type equivalence means the two variables have equivalent types if they are in either the same declaration or in declarations that use the same type name. A. simple B. name C. strong D. weak E. anonymous

name

Consdier the following program. What value of x is displayed in function sub1? Select one best answer. /* program begins here */ var x; function sub1( ) { document.write("x = " + x + "<br />"); } function sub2( ) { var x; x = 10; sub1( ); } x = 5; sub2( ); /* program ends here */ A. 5 with static scoping, 10 with dynamic scoping B. 10 with static scoping, 5 with dynamic scoping C. 5 with static or dynamic scoping D. 10 with static or dynamic scoping E. undefined for static scoping F. undefined with dynamic scoping

5 with static scoping, 10 with dynamic scoping

Which is NOT a problem associated with Top down parsers? a. Finding all syntax errors b. Producing a parse tree c. Choosing the correct A-rule to get the next sentential form in the rightmost derivation d. Choosing the correct A-rule using only the first token produced by A e. Recovering after finding errors

Choosing the correct A-rule to get the next sentential form in the rightmost derivation

Parsers are categorized according to which feature? a. The order in which the nodes are examined b. Direction in which the parse trees are created c. Point of derivation tracing d. Tree completeness e. Time complexity of performing a search

Direction in which the parse trees are created

____ programming languages are, to varying degrees, abstractions of the underlying von Neumann computer architecture. A. Abstract B. Functional C. Imperative D. Logical E. Object-Oriented F. Programmable

Imperative

Which of the following true about parsing? a. Parsers that work for any unambiguous grammar are complex and inefficient b. All parsers have a run time of O(n) c. Compilers use parsers for all grammars d. Parsers produce syntax errors e. Parsers do not produce error messages when an error is found

Parsers that work for any unambiguous grammar are complex and inefficient

Consider the following Java assignment statement: count = count + 5; The meaning of the operator symbol + is bound at ____, when the types of its operands have been determined. A. language design time B. compiler design time C. compile time D. load time E. link time F. run time. G. termination time

compile time

Consider the following Java assignment statement: count = count + 5; The type of count is bound at ____. A. language design time B. language implementation time C. compile time D. load time E. link time F. run time. G. termination time

compile time

Consider the following Java assignment statement: count = count + 5; The internal representation of the literal 5 is bound at _____. A. language design time B. compiler design time C. compile time D. load time E. link time F. run time. G. termination time

compiler design time

In general, ___ binding allows greater flexibility but at the expense of readability, efficiency, and reliability. A. static B. local C. compile-time D. dynamic E. stack

dynamic

Scalar variables can be separated into four categories by considering their lifetimes. Which is not one of them? A. static B. dynamic C. stack dynamic D. explicit heap dynamic

explicit heap dynamic

A variable's value is sometimes called its ____ because it is what is required when the name of the variable appears in the right side of an assignment statement. A. address B. alias C. l-value D. r-value E. reference F. nonterminal

r-value

A(n) ____ is a possibly heterogeneous aggregate of data elements in which the individual elements are identified by names A. array B. object C. bag D. record E. table

record

What are the most common top down parsing algorithms a. recursive descent and LL parsers b. top-down and bottom-up c. recursive descent and bottom-up d. top-down and LL parsers e. lexical

recursive descent and LL parsers

EBNF is ideally suited for _____ parsers. a. recursive-descent b. recursive- ascend. c. backtracking d. All of the above e. None of the above

recursive-descent

The ___ environment of a statement is the collection of all of the variables that are visible to that statement. A. binding B. referencing C. static D. dynamic E. symbolic

referencing

Consider the following Java assignment statement: count = count + 5; The value of count is bound at ___ with this statement. A. language design time B. compiler design time C. compile time D. load time E. link time F. run time. G. termination time

run time

Based on the following grammar, which option will pass the Pairwise Disjointness test? 1. A → aB | c | cBB 2. B → aB | bA | cBb 3. C → aaA | b | baB a. 1 b. 2 c. 3 d. All of the above e. Only 1 and 3

2

Static scoping is a central feature of ___ and some of its descendants. A. ALGOL 60 B. COBOL C. FORTRAN D. LISP E. ADA

ALGOL 60

What are the approaches to building a lexical analyzer? a. Write a formal description of the token patterns of the language using a descriptive language related to regular expressions. b. Design a state transition diagram that describes the token patterns of the language and write a program that implements the diagram. c. Design a state transition diagram that describes the token patterns of the language and hand-construct a table-driven implementation of the state diagram. d. All of the above e. None of the above

All of the above

Which one of the following statements is NOT correct? A. An explicit declaration is a statement in a program that lists variable names and specifies that they are a particular type. B. An implicit declaration is a means of associating variables with types through default conventions, rather than declaration statements. C. With an implicit declaration, the first appearance of a variable name in a program constitutes its implicit declaration. D. Explicit declarations create dynamic bindings to types. E. Implicit variable type binding is done by the language processor, either a compiler or an interpreter.

Explicit declarations create dynamic bindings to types

Which of the following is an incorrect match? a. Terminal symbols - lowercase letters at the beginning of alphabet b. Nonterminal symbols - uppercase letters at the beginning of alphabet c. Terminal or nonterminal - uppercase letters at the end of alphabet d. Strings of terminals - lowercase letters at the end of alphabet e. Mixed strings (terminals and/or nonterminals) - uppercase Greek letters

Mixed strings (terminals and/or nonterminals) - uppercase Greek letters

Which one of the following statements is NOT correct? A. Fortran 95+ allows up to 31 characters in its names. B. C99 has no length limitation on its internal names, but only the first 63 are significant. C. External names in C99 are restricted to 31 characters. D. Names in Java have no length limit and all characters in them are significant. E. Names in C# have no length limit and all characters in them are significant. F. Names in C++ have no length limit and all characters in them are significant.

Names in C++ have no length limit and all characters in them are significant.

What is the time complexity of CFG? What is the Big-O of a parser works for a subset of unambiguous grammars? a. O(n) b. O(n^2) c. O(n^3) d. O(1) e. O(n!)

O(n^3)

Which of the following is not an action an LR parser may take? a. Pop b. Shift c. Accept d. Error e. Reduce

Pop

What is not the goal of the parser given an input program? a. Find all syntax errors b. Produce a diagnostics message c. Recover quickly d. Produce a parse tree e. Produce a syntax list

Produce a syntax list

Which of the following is NOT a reason that lexical analysis is separated from syntax analysis? a. Simplicity b. Efficiency c. Readability d. Portability e. None of the above

Readability

Using the following parsing table and grammar, which of the following would be used as an Action based on the Stack and Input? Grammar: 1. E → E + T 2. E → T 3. T → T * F 4. T → F 5. F → (E) 6. F → id Stack: 0 T 9 * 4 F 10 Input: ) $ a. Reduce 1 (use GOTO[0,T]) b. Reduce 3 (use GOTO[0,T]) c. Reduce 3 (use GOTO[2,T]) d. Reduce 3 (use GOTO[0,F]) e. Reduce 1 (use GOTO[2,T])

Reduce 3 (use GOTO[0 T])

Finite automata can be designed to recognize members of a class of languages called: a. CNF b. Regular languages c. Tokens d. Digits e. Lexemes

Regular languages

LR parsers are table driven and the table has two components, ACTION table and GOTO table. Which best describes the ACTION table? a. The ACTION table specifies which state to put on top of the parse stack after a reduction action is done. Rows are state names columns are terminals. b. The ACTION table specifies which state to put on top of the parse stack after a reduction action is done. Rows are state names columns are non-terminals. c. The ACTION table specifies the action of the parser, given the parser state and the next token. Rows are state names columns are non-terminals. d. The ACTION table specifies the action of the parser, given the parser state and the next token. Rows are state names columns are terminals. e. The ACTION table performs three operations: shift, reduce, go to a new state.

The ACTION table specifies the action of the parser, given the parser state and the next token. Rows are state names columns are terminals.

LR parsers are table driven and the table has two components, ACTION table and GOTO table. Which best describes the GOTO table? a. The GOTO table specifies the action of the parser, given the parser state and the next token. Rows are state names columns are non-terminals. b. The GOTO table specifies the action of the parser, given the parser state and the next token. Rows are state names columns are terminals. c. The GOTO table performs three operations: shift, reduce, go to a new state. d. The GOTO table specifies which state to put on top of the parse stack after a reduction action is done. Rows are state names columns are terminals. e. The GOTO table specifies which state to put on top of the parse stack after a reduction action is done. Rows are state names columns are non-terminals.

The GOTO table specifies which state to put on top of the parse stack after a reduction action is done. Rows are state names columns are non-terminals.

Which of the following is an incorrect statement? a. Two categories of parsers are Top-Down and Bottom-Up b. Many parsers only look one token ahead in the input c. It is more efficient to separate Lexical and Syntax Analysis d. Compilers often use parsers that only work for a subset of unambiguous grammars for efficiency. e. The Pairwise Disjointness test is used before running an LR parse.

The Pairwise Disjointness test is used before running an LR parse.

What are two distinct grammar characteristics preventing a recursive-descent parser from being constructed? a. The left recursion along with the bottom-up parser. b. The right recursion and the failure of the pairwise joint test. c. The right recursion and the success of the pairwise joint test. d. The left recursion and the failure of the pairwise joint test. e. The success of the pairwise joint test and the failure to eliminate through recursions.

The left recursion and the failure of the pairwise joint test.

Which one of the following statements is NOT correct? A. In Java, many of the predefined names include both uppercase and lowercase letters. B. In C#, many of the predefined names include both uppercase and lowercase letters. C. The Java method for converting a string to an integer value is parseInt, and spellings such as ParseInt and parseint are not recognized. D. The need to remember specific case usage for variable names makes it more precise to write correct programs. E. The case sensitivity of variable naming is a kind of intolerance on the part of the language designer, which is enforced by the compiler.

The need to remember specific case usage for variable names makes it more precise to write correct programs.

Which of the following is not a characteristic of Lexical Analysis? a. It is a pattern matcher of character strings. b. It is usually called as a function by the parser. c. The only way to build a lexical analyzer involves creating formal descriptions of tokens and then using software to construct a table-driven analyzer from said description. d. Lexical analysis is kept separate from the syntax analysis to make parsers more efficient, portable, and simple. e. It is considered the "front-end" of a parser.

The only way to build a lexical analyzer involves creating formal descriptions of tokens and then using software to construct a table-driven analyzer from said description.

Which of the following best characterizes the bottom-up parsing problem? a. The parsing problem is finding the correct RHS in a right-sentential form to reduce to get the previous right-sentential form in the derivation b. The parsing problem is finding the correct LHS in a left-sentential form to reduce to get the previous left-sentential form in the derivation c. The parsing problem is finding the minimal syntax search in order to determine the right-sentential form in the derivation d. The parsing problem is finding the minimal syntax search in order to determine the left-sentential form in the derivation e. The parsing problem is finding the reduced BNF in a right-sentential form in order to produce the RHS parse tree

The parsing problem is finding the correct RHS in a right-sentential form to reduce to get the previous right-sentential form in the derivation

Which one of the following statements is NOT correct? Consider the name of a variable. A. Names in most programming languages are in the form of a letter followed by a string consisting of letters, digits, and underscore characters ("_"). B. Although the use of underscore characters to form names was widely used in the 1970s and 1980s, that practice is now far less popular. C. In the C-based languages, it has to a large extent been replaced by the so-called camel notation (e.g., parseInt, myStack, or thisHellWorld). D. The use of underscores and mixed case in names is a programming design issue as well as a programming style issue. E. All variable names in PHP must begin with a dollar sign.

The use of underscores and mixed case in names is a programming design issue as well as a programming style issue.

Consider dynamic binding of a variable. Which one of the following statements is NOT correct? A. The variable being assigned is bound to the type of the value of the expression on the left side of the assignment. B. Any variable can be assigned any type value. C. A variable's type can change any number of times during program execution. D. The type of a variable whose type is dynamically bound may be temporary. E. Languages in which types are dynamically bound are dramatically different from those in which types are statically bound.

The variable being assigned is bound to the type of the value of the expression on the left side of the assignment.

Which of the following is not a benefit of LR parsers? a. They detect syntax errors quickly. b. They work on a smaller class of grammars compared to other bottom-up algorithms. c. The LR class of grammars are a superset of the class parse able by LL parsers. d. They are just as efficient as other bottom-up parsers. e. They work on almost all grammars that are used to describe programming languages.

They work on a smaller class of grammars compared to other bottom-up algorithms.

Which one of the following choices is NOT correct? The phrase "C-based languages" is used to refer to ____. A. C B. C++ C. C# D. Web C++ E. Objective-C F. Java

Web C++

___ are two or more variables bound to the same storage address. A. Alias B. Bindings C. Coercions D. Unions E. Allocations

alias

Which one of the following statements is NOT correct? A. The names of variables are never bound to types. Names can be bound to variables and variables can be bound to types. B. A program to process numeric data in a language that uses dynamic type binding can be written as a generic program, meaning that it is capable of dealing with data of any numeric type. C. Whatever type data is input will be acceptable, because the variables in which the data are to be stored can be bound to the correct type when the data is assigned to the variables after input. D. By contrast, because of static binding of types, one cannot write a C program to process data without knowing the type of that data. E. Before the mid-1990s, the most commonly used programming languages used dynamic type binding

Whatever type data is input will be acceptable, because the variables in which the data are to be stored can be bound to the correct type when the data is assigned to the variables after input.

Which of the following is not a phrase of the following parse tree? a. a b. abcaa c. aa d. b e. c

a

It is possible to have multiple variables that have the same address by using _____. A. address B. alias C. entry point D. heap E. stack

alias

A(n) ___ is a homogeneous aggregate of data elements in which an individual element is identified by its position in the aggregate, relative to the first element. A. Array B. Record C. Object D. Structure E. Union

array

A(n) _____ array is an unordered collection of data elements that are indexed by an equal number of values called keys A. associative B. jagged C. homogeneous D. hetrogeneous E. multi-dimensional

associative

A variable can be characterized as a sextuple of attributes which include everything except ___. A. address B. binding C. lifetime D. name E. scope F. type G. value

binding

A(n) ____ is an association between an attribute and an entity, such as between a variable and its type or value, or between an operation and a symbol. A. aliasing B. addressing C. binding D. naming E. referencing

binding

___ is the association of attributes with program entities. A. Association B. Binding C. Scoping D. Abstraction E. Naming

binding

A(n) ___ defines a collection of data objects and a set of predefined operations on those objects A. Data type B. Polymorphism C. Container D. Program Abstraction E. Data structure

data type

A(n) ___ is the collection of the attributes of a variable A. Array B. Alias C. Data D. Descriptor E. Functor

descriptor

If the binding first occurs during run time or can change in the course of program execution, it is called ____. A. dynamic B. immutable C. global D. local E. physical F. static G. statistical

dynamic

The primary advantage of ____ binding of variables to types is that it provides more programming flexibility. A. dynamic B. global C. local D. permanent E. static F. temporary

dynamic

With _____ binding, the type of a variable is not specified by a declaration statement, nor can it be determined by the spelling of its name. Instead, the variable is bound to a type when it is assigned a value in an assignment statement. A. dynamic B. global C. local D. permanent E. static F. temporary

dynamic

What does $ represent in LL parser? a. dollar sign b. end of input marker c. terminal symbol d. nonterminal symbol e. beginning of input marker

end of input marker

Arrays can be ___, as with Java's objects. A. static B. stack-dynamic C. fixed stack-dynamic D. fixed heap dynamic E. physical memory F. virtual memory

fixed heap dynamic

With this binding, storage binding is dynamic but fixed after allocation (i.e., binding is done when requested and storage is allocated from heap, not stack). A. static B. fixed stack-dynamic C. stack-dynamic D. fixed heap-dynamic E. heap-dynamic

fixed heap-dynamic

Arrays can be ___, as in C functions (without the static specifier). A. static B. temporary stack C. fixed stack-dynamic D. fixed heap dynamic E. physical memory F. virtual memory

fixed stack-dynamic

With this binding, array subscript ranges are statically bound, but the storage allocation is done at declaration time. The advantage is space-efficiency. A. static B. fixed stack-dynamic C. stack-dynamic D. fixed heap-dynamic E. heap-dynamic

fixed stack-dynamic

In several languages that support object-oriented programming, records are supported with ___. A. primitives B. arrays C. objects D. methods E. heaps

objects

A characteristic of grammars that disallows top-down parsing is the lack of _____. a. pairwise disjointness b. pairwise functions c. pairwise comparisons d. pairwise alignment e. pairwise independence

pairwise disjointness

Internal codes for categories of lexemes are called a. tokens b. characters c. chips d. bytes e. numbers

tokens

In many cases, ____________ can be combined to simplify the state diagram. a. parsers b. analyzers c. transitions d. tokens e. none of the above

transitions

Another kind of implicit type declarations uses context. This is sometimes called _____. In the simpler case, the context is the type of the value assigned to the variable in a declaration statement. For example, in C# a declaration of a variable must include an initial value, whose type is made the type of the variable. A. implicit type B. explicit type C. type conversion D. type declaration E. type inference

type inference

Aliases can be created in programs in several different ways. One common way in C and C++ is with their ____ types. A. alias B. common C. extern D. static E. union

union

A program ____ is an abstraction of a computer memory cell or collection of cells. A. address B. name C. scope D. type E. variable

variable


Ensembles d'études connexes

AD Banker DC Life and Health Ch 8

View Set

Computer Science 336: Network Forensics

View Set

Chapter 2: Evaluating Nutrition Information

View Set

Psychology Final Exam Review Questions

View Set