Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

class TV has one private integer data attribute and has one constructor with parameter, to create array of 5 TV's Select one: we can't TV

class TV has one private integer data attribute and has one constructor with parameter, to create array of 5 TV's

Select one:

we can't

TV A[5]

TV *p[5]

TV *p = new TV[5]

image text in transcribed

1. Meinter access specifiers 'p. blic and private) a. Outika a class definitior. b. Ir ary onder and mul tiple times. r. In ary order \{puhlic first or prizase -inst\} hut rot multiple timps. d. If ary order and multiple times, if thes have traskets separatine, each type. 7. Clases chnnt: s. Corlain riure than orie desiructor. b. Ir itlalize data membersin the class defirition. c. Ee used to medel astributes and behaviors of objects. d. Inclusis objecte from attor clasens as mombors. t. Doul s arid b. 3. Adefault ronstruczor. a. Is a corlstruliai that irlust receive no arguirierils. b. is the corstructor generated by the compiler wher no constructor is prowded by the programmer. r. Daes rot perform ary initia lization. d. Ratt [a) and (b). 4. Aconstrucar can \&peci'y the returir -ype: d. Irt. b. strirg. c. wold. d. A constructor carinot specily a telurn type 5. What tye of member functions allow a cliect of a class to assier values to frivate daza members? a. Destiucturs. b. Getiers. c. Batr a and b d. Sitters 6. Which af the fol lowirg staternente will praduce a sprtax error? a. Defining a const method that modiles a local variable. b. Irwoking a corst method vis a const objert c. Irwoking a corat method via a non-const object. d. Defining a canst method that modities a data merr ber of the object 7. Which of the folbopir? scenarios is rot true concemine this pointer 3. This pointer can only he us-d insirle the eoratruxtor to initialise the class data mo mher. b. This pointer ean only be used inside setteis to Ir itlalize the dass data member. r. Ratt a and b. d. This pointer must be ised to initialize consant data memter 8. Lssume that t is an object of class Test, which has memher functions ai), bi), sil and di), If the functions ai), bi) and ci) all retum references to an object of class Test iusine tre sereferencee this pointerl and furction d i rezurs soid, which o the collowine stazements will not prosuce a syntax error: . t.a\}.b\}- l (l; b. a(i,bo) = r. t.d.cu! d. t.all.t.s 9. IF Pahatinians are objests of the sams clasi, which of the following attrihutes would most likely be repmented a. Plase oi birth. b. Age- c. The Presidert. d. Favorite faod 10. stazic daza men bers of a cerain dass: . Stared among all ohjerts of the r.lasa b. Can be aseeseed anly if an abject of that class exists r. Cannot he charget, ever by objects of the sarne that dass. d. Cen only be ctaneed by s atic member functions

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