Exam 6: Programming Languages
Exam 1: Data Representation64 Questions
Exam 2: Data Representation63 Questions
Exam 3: Operating Systems47 Questions
Exam 4: Networks and the Internet62 Questions
Exam 5: Algorithms53 Questions
Exam 6: Programming Languages54 Questions
Exam 7: Software Engineering54 Questions
Exam 8: Data Abstractions53 Questions
Exam 9: Database Systems52 Questions
Exam 10: Computer Graphics47 Questions
Exam 11: Artificial Intelligence52 Questions
Exam 12: Theory of Computation51 Questions
Select questions type
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:
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:
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:
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."

(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)
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
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)