Computer Science An Overview 11th Edition Brookshear Test Bank download
Computer Science An Overview 11th Edition Brookshear Test Bank download
https://testbankdeal.com/product/computer-science-an-overview-11th-
edition-brookshear-test-bank/
https://testbankdeal.com/product/computer-science-an-overview-12th-
edition-brookshear-test-bank/
https://testbankdeal.com/product/computer-science-an-overview-12th-
edition-brookshear-solutions-manual/
https://testbankdeal.com/product/family-therapy-an-overview-9th-
edition-goldenberg-test-bank/
https://testbankdeal.com/product/using-financial-accounting-
information-the-alternative-to-debits-and-credits-8th-edition-porter-
solutions-manual/
Practice of Statistics for Business and Economics 4th
Edition Moore Test Bank
https://testbankdeal.com/product/practice-of-statistics-for-business-
and-economics-4th-edition-moore-test-bank/
https://testbankdeal.com/product/fundamentals-of-cost-accounting-4th-
edition-lanen-test-bank/
https://testbankdeal.com/product/maternal-child-nursing-care-
optimizing-outcomes-for-mothers-children-and-families-1st-edition-
ward-test-bank/
https://testbankdeal.com/product/prinicples-of-macroeconomics-7th-
edition-gottheil-test-bank/
https://testbankdeal.com/product/essentials-of-organizational-
behavior-14th-edition-robbins-test-bank/
Essentials of Corporate Finance 4th Edition Ross Solutions
Manual
https://testbankdeal.com/product/essentials-of-corporate-finance-4th-
edition-ross-solutions-manual/
Test Bank—Chapter Six (Programming Languages)
ANSWER: A
2. Which of the following is an example of a language that is based on the object-oriented paradigm?
ANSWER: D
ANSWER: A
4. Which of the following is not a type of statement found in a typical high-level imperative programming
language?
ANSWER: B
ANSWER: C
ANSWER: C
ANSWER: C
ANSWER: A
ANSWER: B
10. Which of the following is not associated with the concept of data type?
ANSWER: C
ANSWER: A
ANSWER: D
A. 4 B. 5 C. 6 D. 10
ANSWER: B
ANSWER: D
ANSWER: B
16. Which of the following is a means of nullifying conflicts among data types?
ANSWER: C
17. Which of the following is not constructed by a typical compiler?
ANSWER: A
18. Which of the following is a means of defining similar yet different classes in an object-oriented
program?
ANSWER: A
19. Which of the following is not a parse tree of an expression based on the following grammar?
A. B. C.
ANSWER: C
20. Which of the following statements is not a resolvent of the following clauses?
P OR Q OR R P OR T Q OR T R OR T
A. Q OR R OR T B. T OR P C. P OR R OR T D. Q OR T
ANSWER: B
21. 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).
ANSWER: C
Fill-in-the-blank/Short-answer Questions
1. In contrast to _______________ languages such as English and Spanish, programming languages are
2. List two disadvantages of both machine languages and assembly languages that are overcome by high-
level programming languages.
_____________________________________
_____________________________________
ANSWER: They are machine dependent and they require that algorithms be expressed in small machine-
related steps rather that larger application-oriented steps.
3. Indicate how each of the following types of programming languages is classified in terms of generation
(first generation, second generation, or third generation).
4. List four data types that occur as primitive types in many high-level programming languages.
____________________ ____________________
____________________ ____________________
ANSWER: Possible answers include: integer, real (or float), Boolean, and character.
5. What encoding system is commonly used to encode data of each of the following types?
A. Integer ___________________________
B. Real __________________________
C. Character ___________________________
6. A data structure in which all elements have the same type is called ___________________, whereas a
________________ may have elements of different types.
“2x” + “3x”
________________
ANSWER: “2x3x”
if (X = 5) goto 50
goto 60
50 print the value of Z
goto 100
60 print the value of Y
100 . . .
9. The following is a program segment and the definition of a procedure named sub.
.
.
X 3; procedure sub (Y)
sub (X); Y 5;
print the value of X;
.
.
A. What value will be printed by the program segment if parameters are passed by value?
____________
B. What value will be printed by the program segment if parameters are passed by reference?
____________
ANSWER: A. 3 B. 5
10. The following is a program segment and the definition of a procedure named sub.
. procedure sub
. .
X 8; .
apply procedure sub; X 2;
print the value of X; .
. .
.
____________
B. What value will be printed by the program segment if X is a declared as a local variable
within the procedure?
____________
ANSWER: A. 8 B. 2
_____________________________________________________________________ .
ANSWER: the grammar allows more than one parse tree for a single string
12. List three items of information that would be contained in a typical parser’s symbol table.
________________________
________________________
________________________
ANSWER: Possible answers include: names of variables, data types associated with variables, data
structures associated with variables, and others.
13. Give three examples of key words that are often found in high-level imperative or object-oriented
languages.
ANSWER: Possible answers are numerous and include: if, while, for, class, int, etc.
14. In addition to the procedure’s name, what other information is contained in a typical procedure header?
____________________________________
15. In the context of the object-oriented paradigm, ____________ are templates from which
____________ are constructed. We say that the latter is an instance of the former.
16. In the context of the object-oriented paradigm, a __________________ is an imperative program unit
that describes how an object should react to a particular stimulus.
17. Based on the sketch of a class definition below, which methods can be invoked from outside an
instance of the class?
class Example
{public void method1( )
{ . . . }
private void method2( )
{ . . . }
public void method3( )
{…}
private void method4( )
{ . . .}
}
_________________________________________________________
P OR R OR S
P OR Q
__________________
ANSWER: Q OR R OR S
19. What general rule should be added to the Prolog program below so that Prolog can conclude that ice
cream is better than spinach?
better(icecream, peanutbutter).
better(peanutbutter, spinach).
___________________________________________________________
20. 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).
_________________________________________
ANSWER: It means that programs written in the language do not refer to properties of a specific machine
and are therefore compatible with any computer.
2. Explain the distinction between the imperative and declarative programming paradigms.
ANSWER: The imperative paradigm requires that a programmer describe an algorithm for solving the
problem at hand. The declarative paradigm requires that the programmer describe the problem.
3. Explain why the generation approach to classifying programming languages fails to capture the full
scope of today’s languages.
ANSWER: The generation approach fails to reflect the array of distinct programming paradigms.
4. Explain the distinction between translating a program (in a high-level language) and interpreting the
program.
5. Why is the straightforward “goto” statement no longer popular in high-level programming languages?
ANSWER: Its use led to poorly structured programs that were hard to understand.
ANSWER: A formal parameter is a term used in a subprogram unit to refer to data that will be given to the
subprogram when it is executed. An actual parameter is the data that is given to the subprogram unit when
it is executed. (A formal parameter is a “place holder” that is “filled in” with an actual parameter when the
subprogram unit is executed.)
ANSWER: A procedure returns values via parameters and global variables whereas a function returns a
value as “the value of the function.”
9. Based on the grammar below, draw a parse tree showing that the string “drip drip drip” is a Leak.
ANSWER:
10. Show that the grammar below is ambiguous by drawing two distinct parse trees for the string “drip drip
drip.”
ANSWER: A constructor is a special “method” that is executed when an object is first constructed,
normally for the purpose of performing initialization activities.
12. Briefly describe the task of each of the following.
A. Lexical analyzer
B. Parser
C. Code Generator
13. Explain why key words in a programming language are often reserved words.
ANSWER: Key words are used to help the parser identify grammatical structures in a program. Thus, using
these words are used for other purposes could confuse the parser.
Random documents with unrelated
content Scribd suggests to you:
Press of Holt Brothers, 119-121 Nassau St., N.Y.
Transcriber’s Notes:
Obvious printer’s punctuation errors correct. Inconsistent
hyphenation retained due the multiplicity of authors.
Changed “misionaries” to “missionaries” in the Funk & Wagnalls
advertisement on the third page of advertisements.
Changed “LeMoyne” to “Le Moyne” on page 137.
*** END OF THE PROJECT GUTENBERG EBOOK THE AMERICAN
MISSIONARY — VOLUME 41, NO. 5, MAY, 1887 ***
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must,
at no additional cost, fee or expense to the user, provide a copy,
a means of exporting a copy, or a means of obtaining a copy
upon request, of the work in its original “Plain Vanilla ASCII” or
other form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.
testbankdeal.com