Multiple choice
QUESTION 1
A grammar with the following characteristic cannot be used with a top-down parsing algorithm?
A) The grammar contains left recursive rules
B) The grammar s left linear
C) The grammar chooses the correct right hand side based on the next token
D) The grammar is right-linear
QUESTION2
For a formal language what is a language recognize
A) A language recognizer accepts valid language sentences
B) within the NET framework, a language recognize determines which NET- supported language a source file contains
C) A language recognize sentences all valid language sentence
D) A language recognize determines the type of the language with typical categorization of imperative, function, and logical
QUESTION 3
what ae the FT sets for this grammar rule C?aaA | b | caB
A)[a],[b],[c]
B)[A],[B]
c)[aa],[b],[caB]
D)[aaA],[b].[caB]
QUESTION 4
What are the subprograms in a recursive decent parser equivalent to?
A)Each recursive rule in its associated grammar
B)Each non terminal in ts associated grammar
C)Each terminal in its associated grammar
D) Each factored rule in its associated grammar
QUESTION 5
What s an ambiguous grammar?
A) A grammar that generates a sentimental form for which there are two or more distinct parsetrees
B) A grammar that enforces precedence level of operators
C) A Grammar that is set recursive
D) A grammar that uses recursion to minimize complexity
QUESTION6
In a compiler, what is the role of the symbol table?
A) A database of optimization rules for the hardware on which the program s being compiled.
B) A database of the syntax rules for the language
C) A database of the available machine-level instructions for the hardware on which the program is being compiled
D) A database of information about the programs user defined names
QUESTION 7
What is the primary use of attribute grammar ?
A)To describe the static semantic rules of a language
B)To make grammars smaller and easier to understand
C)To describe the syntax rules of a language
D)To describe context-sensitive computer languages
QUESTION8
What is the primary platform on which C is used?
A)Microsoft Windows
B)Applie IOS
C)Applie OSX
D)Ubuntu Linux
QUESTION9
what two common data structures were included in Plankalikul?
A) Records and binary trees
B)Arrays and records
C) Binary trees and lists
D) Lists and arrays
QUESTION10
Type checking the parameters of a subprogram s an important characteristic for which language criteria?
A)Desirability
B)Readability
C)Writ ability
D)Reliability
QUESTION11
What two things must be defined for each language entity in order to construct a denotational description of the language?
A)Loop invariant and weakest Precondition
B)Inference Rule and an Axiom
C)Precondition and Post condition
D)Mathematical Object and a Mapping Function
QUESTION 12
what three concepts are the basis for object-oriented programming?
A)Data abstraction, inheritance. Dynamic method binding
B)Method abstraction inheritance, dynamic procedure calling
C)Data abstraction functional displacement, dynamic compilation
D)Concept abstraction, inheritance. dynamic arithmetic binding
QUESTION 13
What is the primary danger of case sensitive names?
A)increased parsing time for names that differ only in capitalization
B)Large grammar sizes
C)Large Symbol tables
D)Programmer confusion with names that differ only in capitalization
QUESTION 14
what language used orthogonality as a primary design criterion?
A)Python
B)Fortran
C)ALGOL 6
D) C
QUESTION 15
what is the name of the Category of programming languages whose structure is dictated by the in von Neumann computer architecture?
A)imperative
B) Functional
C)Object Oriented
D)Structured
QUESTION 16
For this question, in addition to whether or not you list ideas discussed in the book and in lectures, your answer will also be graded on criteria such as legibility and grammar.
Why are character classes used, rather than individual characters. for the letter and digit transitions of a state diagram for a lexical analyzer?
QUESTION 17
For this question, in addition to whether or not you list ideas discussed in the book and in lectures, your answer will also be graded on criteria such as legibility and grammar.
Many recently introduced scripting languages have been implemented with pure interpretation. Outline some of the reasons why pure interpretation remains popular for new languages.
QUESTION 18
For this question, in addition to whether or not your answer is correct, your answer will also be graded on criteria such as legibility and grammar.
Distinguish between static semantics and dynamc semantics. How are they similar, and how are they different
QUESTION 19
For this question, in addition to whether or not you ist ideas discussed in the book and in lectures, your answer will also be graded on criteria such as legibility and grammar,
In mathematics, the associative property of addition tells us that the order in which numbers are added together does not matter: the sum of those numbers will always be the same. Is this also true when a computer adds numbers together? Explain why or why not.
QUESTION 20
For this question, in addition to whether or not you list ideas discussed in the book and in lectures, your answer will also be graded on criteria such as legibility and grammar.
Discuss the cons of using one programming language across all programming domains.
QUESTION 21
Fill in the trace table based on the input string below using the following grammar and parse table. Each blank corresponds to a blank in the trace table image. The first two blanks are filled in with the correct answers to help get you started. Copy those into the blanks. Input String: (id + id) * id
Grammar:
1.E • E+ T
2.E - T
3.T • T*F
4.T . F
5. F . (E)
6.F - i
QUESTION 22
Fill in each blank to fully leftmost derivation of the statement:A-(A C • B) usang the grammar below. Grammar:
assign- id = expr
id - A | B IC
expr- expr + term term
term- term * factor l factor
factor - ( expr ) | id
use this starting point to fill out the rest blanks
assign ?
QUESTION 23
Fill in each blank fully trace out a parse tree of the statement A = (A * C B) using the grammar below. assign -. id = expr
id ? A BIC
expr- expr + | term
term- term * factor l factor
factor - ( expr ) | use this starting point to fill out the rest blanks
GET ANSWERS / LIVE CHAT