100% found this document useful (25 votes)
96 views

Get C++ How to Program Late Objects Version 7th Edition Deitel Test Bank Free All Chapters Available

The document provides links to various test banks and solutions manuals for C++ and other subjects, including titles by Deitel and Heizer. It includes multiple-choice questions and answers from the C++ How to Program 7th Edition Test Bank, covering topics such as constant objects, composition, friend functions, and static class members. Additionally, it offers resources for immediate download of digital products in PDF, EPUB, and MOBI formats.

Uploaded by

joedthloshak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (25 votes)
96 views

Get C++ How to Program Late Objects Version 7th Edition Deitel Test Bank Free All Chapters Available

The document provides links to various test banks and solutions manuals for C++ and other subjects, including titles by Deitel and Heizer. It includes multiple-choice questions and answers from the C++ How to Program 7th Edition Test Bank, covering topics such as constant objects, composition, friend functions, and static class members. Additionally, it offers resources for immediate download of digital products in PDF, EPUB, and MOBI formats.

Uploaded by

joedthloshak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Full Download Test Bank Get the Latest Study Materials at testbankfan.

com

C++ How to Program Late Objects Version 7th


Edition Deitel Test Bank

https://testbankfan.com/product/c-how-to-program-late-
objects-version-7th-edition-deitel-test-bank/

OR CLICK HERE

DOWLOAD NOW

Download More Test Banks for All Subjects at https://testbankfan.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

C++ How to Program Early Objects Version 9th Edition


Deitel Test Bank

https://testbankfan.com/product/c-how-to-program-early-objects-
version-9th-edition-deitel-test-bank/

testbankfan.com

C++ How to Program Early Objects Version 9th Edition


Deitel Solutions Manual

https://testbankfan.com/product/c-how-to-program-early-objects-
version-9th-edition-deitel-solutions-manual/

testbankfan.com

Java How To Program Late Objects 10th Edition Deitel Test


Bank

https://testbankfan.com/product/java-how-to-program-late-objects-10th-
edition-deitel-test-bank/

testbankfan.com

Operations Management First Canadian Edition Canadian 1st


Edition Heizer Test Bank

https://testbankfan.com/product/operations-management-first-canadian-
edition-canadian-1st-edition-heizer-test-bank/

testbankfan.com
Chemistry A Molecular Approach 2nd Edition Tro Test Bank

https://testbankfan.com/product/chemistry-a-molecular-approach-2nd-
edition-tro-test-bank/

testbankfan.com

Problem Solving Approach to Mathematics for Elementary


School Teachers 12th Edition Billstein Solutions Manual

https://testbankfan.com/product/problem-solving-approach-to-
mathematics-for-elementary-school-teachers-12th-edition-billstein-
solutions-manual/
testbankfan.com

College Algebra in Context 5th Edition Harshbarger


Solutions Manual

https://testbankfan.com/product/college-algebra-in-context-5th-
edition-harshbarger-solutions-manual/

testbankfan.com

Guiding Childrens Social Development and Learning 9th


Edition Kostelnik Test Bank

https://testbankfan.com/product/guiding-childrens-social-development-
and-learning-9th-edition-kostelnik-test-bank/

testbankfan.com

Chemistry 6th Edition McMurry Test Bank

https://testbankfan.com/product/chemistry-6th-edition-mcmurry-test-
bank/

testbankfan.com
Employment Relations An Integrated Approach 1st Edition
mcphail Solutions Manual

https://testbankfan.com/product/employment-relations-an-integrated-
approach-1st-edition-mcphail-solutions-manual/

testbankfan.com
C++ How to Program, 7/e Multiple Choice Test Bank 1 of 3

Chapter 10: Classes: A Deeper Look, Part 2

Section 10.2 const (Constant) Objects and const Member Functions

10.2 Q1: Which of the following statements will not produce a syntax error?
a. Defining a const member function that modifies a data member of the object.
b. Invoking a non-const member function on a const object.
c. Declaring an object to be const.
d. Declaring a constructor to be const.
ANS c. Declaring an object to be const.

10.2 Q2: The code fragment:

Increment::Increment( int c, int i )


: increment ( i )
{
count = c;
}

does not cause any compilation errors. This tells you that:
a. count must be a non-const variable.
b. count must be a const variable.
c. increment must be a non-const variable.
d. increment must be a const variable.
ANS a. count must be a non-const variable.

Section 10.3 Composition: Objects as Members of Classes

10.3 Q1: When composition (one object having another object as a member) is used:
a. The host object is constructed first and then the member objects are placed into it.
b. Member objects are constructed first, in the order they appear in the host constructor’s initializer list.
c. Member objects are constructed first, in the order they are declared in the host’s class.
d. Member objects are destructed last, in the order they are declared in the host’s class.
ANS c. Member objects are constructed first, in the order they are declared in the host’s class.

10.3 Q2: An error occurs if:


a. A non-reference, non-const, primitive data member is initialized in the member initialization list.
b. An object data member is not initialized in the member initialization list.
c. An object data member does not have a default constructor.
d. An object data member is not initialized in the member initialization list and does not have a default
constructor.
ANS d. An object data member is not initialized in the member initialization list and does not have a default
constructor.

Section 10.4 friend Functions and friend Classes

10.4 Q1: If the line:


friend class A;
appears in class B, and the line:
friend class B;
appears in class C, then:
a. Class A is a friend of class C.
b. Class A can access private variables of class B.
c. Class C can call class A’s private member functions.
© Copyright 1992-2010 by Deitel & Associates, Inc. and Pearson Education, Inc. All Rights Reserved.
C++ How to Program, 7/e Multiple Choice Test Bank 2 of 3

d. Class B can access class A’s private variables.


ANS: b. Class A can access private variables of class B.

10.4 Q2: Which of the following is not true about friend functions and friend classes?
a. A class can either grant friendship to or take friendship from another class using the friend keyword.
b. A friend declaration can appear anywhere in a class definition.
c. A friend of a class can access all of its private data member and member functions.
d. The friendship relationship is neither symmetric nor transitive.
ANS a. A class can either grant friendship to or take friendship from another class using the friend
keyword.

Section 10.5 Using the this Pointer

10.5 Q1: For a non-constant member function of class Test, the this pointer has type:
a. const Test *
b. Test * const
c. Test const *
d. const Test * const
ANS: b. Test * const

10.5 Q2: Inside a function definition for a member function of an object with data element x, which of the following
is not equivalent to this->x:
a. *this.x
b. (*this).x
c. x
d. (* (& (*this) ) ).x
ANS: a. *this.x

10.5 Q3: Assume that t is an object of class Test, which has member functions a(), b(), c() and d(). If the
functions a(), b() and c() all return references to an object of class Test (using the dereferenced this pointer)
and function d() returns void, which of the following statements will not produce a syntax error:
a. t.a().b().d();
b. a().b().t;
c. t.d().c();
d. t.a().t.d();
ANS: a. t.a().b().d();

Section 10.6 static Class Members

10.6 Q1: If Americans are objects of the same class, which of the following attributes would most likely be
represented by a static variable of that class?
a. Age.
b. The President.
c. Place of birth.
d. Favorite food.
ANS: b. The President.

10.6 Q2: static data members of a certain class:


a. Can be accessed only if an object of that class exists.
b. Cannot be changed, even by objects of the same that class.
c. Have class scope.
d. Can only be changed by static member functions.
ANS: c. Have class scope.

10.6 Q3: static member functions:


a. Can use the this pointer.
b. Can access only other static member functions and static data members.

© Copyright 1992-2010 by Deitel & Associates, Inc. and Pearson Education, Inc. All Rights Reserved.
C++ How to Program, 7/e Multiple Choice Test Bank 3 of 3

c. Cannot be called until an object of their class is instantiated.


d. Can be declared const as well.
ANS: b. Can only access other static member functions and static data members.

Section 10.7 Data Abstraction and Information Hiding

10.7 Q1: Which of the following is not an abstract data type?


a. An int.
b. A user-defined class.
c. A for loop.
d. None of the above are abstract data types.
ANS: c. A for loop.

10.7 Q2: Which of the following are true about an abstract data type?

I. Captures a data representation.


II. Defines the operations that are allowed on its data.
III. Replaces structured programming.

a. I, II and III.
b. I and II.
c. I and III.
d. II and III.
ANS: b. I and II.

10.7 Q3: The numbers 3, 2, 5, 7 are enqueued in a queue in that order, then three numbers are dequeued, and finally
3, 7, 9, 4 are enqueued in that order. What is the first number in the queue (the next number to be dequeued)?
a. 3
b. 7
c. 9
d. 4
ANS: b. 7

© Copyright 1992-2010 by Deitel & Associates, Inc. and Pearson Education, Inc. All Rights Reserved.
Other documents randomly have
different content
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back

You might also like