wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

rees

Total questions: 61

Worksheet time: 46mins

Name
Class
Date
1.


Feature multiplicity increases readability.

a)

True

b)

False

2.

Pure Interpretation was one of the programming domains discussed in class.

a)

True

b)

False

3.

Logical was one of the language evaluation criteria we discussed in class.

a)

False

b)

True

4.

Readability was one of the language evaluation criteria we discussed in class

a)

True

b)

Flase

5.

A language's reliability is based upon its readability, writability, ability to block aliasing, and its ability to perform type checking and exception handling.

a)

True

b)

False

6.

Compilation was one of the programming domains discussed in class.

a)

True

b)

False

7.

Interpreters provide the tradeoff of harder implementation for faster execution

a)

True

b)

False

8.


Business applications was one of the programming domains discussed in class.

a)

True

b)

False

9.

The von Neumann bottleneck is the primary limiting factor in the speed of memory.

a)

True

b)

False

10.

Cost was one of the language evaluation criteria we discussed in class.

a)

True

b)

False

11.

Pure interpretered languages are easier to implement because all run-time error messages can refer to source-level units.

a)

True

b)

False

12.


Systems Programming was one of the programming domains discussed in class.

a)

True

b)

False

13.

The cost of a language is based upon the reliability of the language and the time spent training, writing, maintaining, and executing programs in the language.

a)

True

b)

False

14.

Hybridness was one of the language evaluation criteria we discussed in class.

a)

True

b)

False

15.


A language's reliability is based solely upon its ability to perform type checking and exception handling.

a)

True

b)

False

16.


Register allocation was one of the optimizations discussed in class that some compilers implement.

a)

True

b)

False

17.

Relinking was one of the optimizations discussed in class that some compilers implement.

a)

True

b)

False

18.


Loop optimizations, such as loop expansion, was one of the optimizations discussed in class that some compilers implement.

a)

True

b)

False

19.


Loop optimizations, such as loop expansion, was one of the optimizations discussed in class that some compilers implement

a)

True

b)

False

20.

Copy propagation was one of the optimizations discussed in class that some compilers implement.

a)

True

b)

False

21.

Compilation process order: Lexical analyzer

(a)  

22.

Compilation process order: Syntax analyzer

(a)  

23.

Compilation process order: Intermediate code generator and semantic analyzer

(a)  

24.

Compilation process order: Optimization (optional)

(a)  

25.

Compilation process order: Machine code generator

(a)  

26.

What is the name of the command to change into a directory?

(a)  

27.

What is the name of the command that prints its arguments to the standard output?

(a)  

28.

What is the name of the command that shows the contents of a file or files?

(a)  

29.


What is the name of the command for paging through text a screenful at a time, forwards or backwards?

(a)  

30.

What is the name of the command to remove files permanently?

(a)  

31.

What is the symbol(s) for the current directory?

(a)  

32.

Well-refinedness was one of the language evaluation critera we discussed in class

a)

True

b)

False

33.

Cost was one of the language evaluation critera we discussed in calss

a)

True

b)

False

34.

Readability is based solely upon the orthogonality of the language

a)

True

b)

False

35.


Writability of a language is based solely upon the language's simplici

a)

True

b)

False

36.

Compilation provides the tradeoff of slow translation for fast execution.

a)

True

b)

False

37.

What is the name of the command that counts the number of lines, words, and characters in a text file?

(a)  

38.


The strings that comprise a language built from characters over some alphabet.

(a)  

39.

Describes how a valid program is interpreted as sequences of computational steps.

(a)  

40.

In BNF, a special element of the nonterminals that often represents a complete program.

(a)  

41.

n axiomatic semantics, logic expressions are also known as (a)   .

42.

(a)   are associated with grammar rules and are also known as semantic functions.

43.


The set of rules that a sequence of characters in a source code file must follow to be considered a conforming programing in that language.

(a)  

44.

The name of the assertion before a statement that states the relationships and constraints among variables that are true at that point in execution.

(a)  

45.


In BNF, these are used to describe syntactic variables and are often enclosed in angle brackets.

(a)  

46.

(a)   are associated with grammar symbols and have values assigned to them.

47.


A category of lexemes.

(a)  

48.

Use the grammar and denotation semantics below, determine the integer value generated by the string "cba"
Grammar
<abc>::='a'|'b'|'c'
<abc>::=<abc>'a'|<abc>'b'|<abc>'c'
Semantics
Mabc('a')=1

Mabc('b')=4

Mabc('c')=7

Mabc(<abc>'a')=2*Mabc(<abc>)+2

Mabc(<abc>'b')=3*Mabc(<abc>)+1

Mabc(<abc>'c')=1*Mabc(<abc>)+3

(a)  

49.

Use the grammar and denotation semantics below, determine the integer value generated by the string "acb"
Grammar
<abc>::='a'|'b'|'c'
<abc>::=<abc>'a'|<abc>'b'|<abc>'c'
Semantics
Mabc('a')=3

Mabc('b')=5

Mabc('c')=6

Mabc(<abc>'a')=2*Mabc(<abc>)+2

Mabc(<abc>'b')=3*Mabc(<abc>)+1

Mabc(<abc>'c')=1*Mabc(<abc>)+3

(a)  

50.

Use the grammar and denotation semantics below, determine the integer value generated by the string "acb"
Grammar
<abc>::='a'|'b'|'c'
<abc>::=<abc>'a'|<abc>'b'|<abc>'c'
Semantics
Mabc('a')=1

Mabc('b')=4

Mabc('c')=7

Mabc(<abc>'a')=2*Mabc(<abc>)+2

Mabc(<abc>'b')=3*Mabc(<abc>)+1

Mabc(<abc>'c')=1*Mabc(<abc>)+3

(a)  

51.

Use the grammar and denotation semantics below, determine the integer value generated by the string "cab"
Grammar
<abc>::='a'|'b'|'c'
<abc>::=<abc>'a'|<abc>'b'|<abc>'c'
Semantics
Mabc('a')=3

Mabc('b')=5

Mabc('c')=6

Mabc(<abc>'a')=2*Mabc(<abc>)+2

Mabc(<abc>'b')=3*Mabc(<abc>)+1

Mabc(<abc>'c')=1*Mabc(<abc>)+3

(a)  

52.

Use the grammar and denotation semantics below, determine the integer value generated by the string "bca"
Grammar
<abc>::='a'|'b'|'c'
<abc>::=<abc>'a'|<abc>'b'|<abc>'c'
Semantics
Mabc('a')=1

Mabc('b')=4

Mabc('c')=7

Mabc(<abc>'a')=2*Mabc(<abc>)+2

Mabc(<abc>'b')=3*Mabc(<abc>)+1

Mabc(<abc>'c')=1*Mabc(<abc>)+3

(a)  

53.

[A]?

 int x = 12;     [A]
[B]  int y = x - 8;  [C]
[D]  cout << y;      {y > 4}

(a)  

54.

[B]?

 int x = 12;     [A]
[B]  int y = x - 8;  [C]
[D]  cout << y;      {y > 4}

(a)  

55.

[C]?

 int x = 12;     [A]
[B]  int y = x - 8;  [C]
[D]  cout << y;      {y > 4}

(a)  

56.

[D]?

 int x = 12;     [A]
[B]  int y = x - 8;  [C]
[D]  cout << y;      {y > 4}

(a)  

57.

Match the notational conventions for grammars we used while discussing parsers: Terminal Symbols

a)

Lowercase letters at the beginning of the English alphabet. (a, b, c, …)

b)

Uppercase letters at the beginning of the English alphabet. (A, B, C, …)

c)


Uppercase letters at the end of the English alphabet. (W, X, Y, Z)

d)

Lowercase letters at the end of the English alphabet. (w, x, y, z)

e)

Lowercase Greek letters (α, β, γ, δ)

58.

Match the notational conventions for grammars we used while discussing parsers: Nonterminal symbols

a)

Lowercase letters at the beginning of the English alphabet. (a, b, c, …)

b)


Uppercase letters at the beginning of the English alphabet. (A, B, C, …)

c)

Uppercase letters at the end of the English alphabet. (W, X, Y, Z)

d)

Lowercase letters at the end of the English alphabet. (w, x, y, z)

e)

Lowercase Greek letters (α, β, γ, δ)

59.

Match the notational conventions for grammars we used while discussing parser:Terminals or nonterminals

a)

Lowercase letters at the beginning of the English alphabet. (a, b, c, …)

b)

Uppercase letters at the beginning of the English alphabet. (A, B, C, …)

c)

Uppercase letters at the end of the English alphabet. (W, X, Y, Z)

d)

Lowercase letters at the end of the English alphabet. (w, x, y, z)

e)

Lowercase Greek letters (α, β, γ, δ)

60.

Match the notational conventions for grammars we used while discussing parsers: Strings of terminals

a)

Lowercase letters at the beginning of the English alphabet. (a, b, c, …)

b)

Uppercase letters at the beginning of the English alphabet. (A, B, C, …)

c)

Uppercase letters at the end of the English alphabet. (W, X, Y, Z)

d)

Lowercase letters at the end of the English alphabet. (w, x, y, z)

e)

Lowercase Greek letters (α, β, γ, δ)

61.


Match the notational conventions for grammars we used while discussing parsers: Mixed String (terminals and/or nonterminals)

a)

Lowercase letters at the beginning of the English alphabet. (a, b, c, …)

b)

Uppercase letters at the beginning of the English alphabet. (A, B, C, …)

c)


Uppercase letters at the end of the English alphabet. (W, X, Y, Z)

d)


Lowercase letters at the end of the English alphabet. (w, x, y, z)

e)

Lowercase Greek letters (α, β, γ, δ)