Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

11. Members of a class object are accessed with the: a. dot operator b. cin object c. extraction operator d. stream insertion operator e. none

11. Members of a class object are accessed with the:

a. dot operator

b. cin object

c. extraction operator

d. stream insertion operator

e. none of these

12. Objects are created from abstract data types that encapsulate ________ and ________ together.

a. numbers, characters

b. data, functions

c. addresses, pointers

d. integers, floats

e. none of these

13. The constructor function always has the same name as:

a. the first private data member

b. the first public data member

c. the class

d. the first object of the class

e. none of these

14. This is used to protect important data.

a. public access specifier

b. private access specifier

c. protect () member function

d. class protection operator, @

e. none of these

15. This type of member function may be called from a statement outside the class.

a. public

b. private

c. undeclared

d. global

e. none of these

16. What is the output of the following program?

image text in transcribed

a. the program runs, but with no output.

b. 0

c. Hello!

d. The program will not compile.

17. What is the output of the following program?

image text in transcribed

a. the program runs, but with no output

b. 77

c. 0

d. the program will not compile

18. What is the output of the following program?

image text in transcribed

a. The program runs, but with no output

b. 77

c. Hello!

d. The program will not compile

19. When a constructor function accepts no arguments, or does not have to accept arguments because of default arguments, it is called a(n):

a. empty constructor

b. default constructor

c. stand-alone function

d. arbitrator function

e. none of these

nclude using namespace sta, class TestClass public TestClass(int x) oout using namespace std class TestClass private int val; void showVal() out using namespace std, class TestClass public TestClass(intx) TestClass) { oout"Hello!"

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions