Page 1 of 1

Examine the following program. Select all line(s) which could go in "//code goes here" that would NOT cause a compiler e

Posted: Fri Apr 29, 2022 8:04 am
by answerhappygod
Examine The Following Program Select All Line S Which Could Go In Code Goes Here That Would Not Cause A Compiler E 1
Examine The Following Program Select All Line S Which Could Go In Code Goes Here That Would Not Cause A Compiler E 1 (36.59 KiB) Viewed 27 times
Examine The Following Program Select All Line S Which Could Go In Code Goes Here That Would Not Cause A Compiler E 2
Examine The Following Program Select All Line S Which Could Go In Code Goes Here That Would Not Cause A Compiler E 2 (38.79 KiB) Viewed 27 times
Examine the following program. Select all line(s) which could go in "//code goes here" that would NOT cause a compiler error, or "None of these" if they would all cause a compiler error. Pay careful attention to the access modifiers. Class Plant{ public: Plant(); int leaves; protected: int roots; private: int flowers; class Fern: public Plant{}; class Fiddlehead: public Fern{ void grow() { //code goes here }; undefined leaves++; roots++; flowers++; None of these
Examine the following program. Select all line(s) which could go in "//code goes here" that would NOT cause a compiler error, or "None of these" if they would all cause a compiler error. Note the use of private inheritance. class Plant{ public: Plant(); int leaves; protected: int roots; private: int flowers; class Fern: private Plant{}; class Fiddlehead: public Fern{ }; int main(){ Fiddlehead fh; //code goes here return 0; undefined O int leaves = fh.leaves; O int roots = fh.roots; Oint flowers = fh.flowers; None of these.