Which is the correct syntax of inheritance

By Rebecca
1 Min Read

Which is the correct syntax of inheritance?

(a) class derived_classname : base_classname{ /*define class body*/ };

(b) class base_classname : derived_classname{ /*define class body*/ };

(c) class derived_classname : access base_classname{ /*define class body*/ };

(d) class base_classname :access derived_classname{ /*define class body*/ };

Answer:

(c) class derived_classname : access base_classname{ /*define class body*/ };

Which is the correct syntax of inheritance

Read more: COCOMO was developed initially by

Posted by Rebecca
Follow:
Rebecca is an Independent content writer for breldigital, She writes content on any given topic. She loves to write a case study article or reviews on a brand, Be it any topic, she nails it