Exam 6: Programming Languages

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Which of the following is not a parse tree of an expression based on the following grammar? Which of the following is not a parse tree of an expression based on the following grammar?

Free
(Multiple Choice)
4.9/5
(34)
Correct Answer:
Verified

C

List three items of information that would be contained in a typical parser's symbol table. ________________________ ________________________ ________________________

Free
(Short Answer)
4.9/5
(45)
Correct Answer:
Verified

Possible answers include: names of variables,data types associated with variables,data structures associated with variables,and others.

Which of the following is a means of nullifying conflicts among data types?

Free
(Multiple Choice)
4.8/5
(29)
Correct Answer:
Verified

C

In programming languages that use + to mean concatenation of character strings,the expression "2x" + "3x" will produce what result? ________________

(Short Answer)
4.9/5
(33)

Show that the grammar below is ambiguous by drawing two distinct parse trees for the string "drip drip drip."  Leak: \text { Leak: }  Show that the grammar below is ambiguous by drawing two distinct parse trees for the string drip drip drip.   \text { Leak: }

(Short Answer)
4.9/5
(34)

Which of the following is not associated with the concept of data type?

(Multiple Choice)
4.8/5
(41)

Which of the following can Prolog conclude from the following program? parent(jill,sue). Parent(jill,sally). Parent(john,sue). Parent(john,sally). Sibling(X,Y):- parent(Z,X),parent(Z,Y).

(Multiple Choice)
4.9/5
(38)

Which of the following is not a way of referring to a value in a program?

(Multiple Choice)
4.9/5
(41)

Which of the following is an example of a language that is based on the functional paradigm?

(Multiple Choice)
4.8/5
(30)

Which of the following is not associated with object-oriented programming?

(Multiple Choice)
4.8/5
(34)

Rewrite the following instructions using a single if- else statement. if (X == 5)goto 50 goto 60 50 print(Z) goto 100 60 print(Y) 100 ...

(Short Answer)
4.7/5
(34)

The following is a program segment and the definition of a function named sub. = def sub(): sub() =2 print () \cdot . \cdot A. What value will be printed by the program segment if X of function sub is a global variable? ___________ B. What value will be printed by the program segment if X of function sub is a local variable? ___________

(Short Answer)
4.8/5
(34)

Explain the distinction between a formal parameter and an actual parameter.

(Short Answer)
4.9/5
(31)

What encoding system is commonly used to encode data of each of the following types? A. Integer ___________________________ B. Real __________________________ C. Character ___________________________

(Short Answer)
4.9/5
(32)

In contrast to _______________ languages such as English and Spanish,programming languages are considered _______________ languages and are rigorously defined by their grammars.

(Short Answer)
4.7/5
(29)

Which of the following is a means of defining similar yet different classes in an object-oriented program?

(Multiple Choice)
4.9/5
(38)

What does it mean to say that a programming language is machine independent?

(Short Answer)
4.7/5
(38)

Explain the distinction between global and local variables.

(Short Answer)
4.8/5
(37)

Explain the distinction between fruitful and void functions.

(Short Answer)
4.9/5
(34)

Based on the Prolog program below,what goal should be used to find the siblings of sue? parent(jill,sue). parent(jill,sally). parent(john,sue). parent(john,sally). sibling(X,Y):- parent(Z,X),parent(Z,Y).

(Short Answer)
4.9/5
(32)
Showing 1 - 20 of 54
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)