<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>How to access protected members in a derived class - Wikitechy</title>
	<atom:link href="https://www.wikitechy.com/interview-questions/tag/how-to-access-protected-members-in-a-derived-class/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.wikitechy.com/interview-questions/tag/how-to-access-protected-members-in-a-derived-class/</link>
	<description>Interview Questions</description>
	<lastBuildDate>Tue, 14 Sep 2021 05:21:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>

<image>
	<url>https://www.wikitechy.com/interview-questions/wp-content/uploads/2025/10/cropped-wikitechy-icon-32x32.png</url>
	<title>How to access protected members in a derived class - Wikitechy</title>
	<link>https://www.wikitechy.com/interview-questions/tag/how-to-access-protected-members-in-a-derived-class/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>In c++ how are protected members of a base class accessed in derived class when inherited privately ?</title>
		<link>https://www.wikitechy.com/interview-questions/cpp/in-cpp-how-are-protected-members-of-a-base-class-accessed-in-derived-class-when-inherited-privately/</link>
					<comments>https://www.wikitechy.com/interview-questions/cpp/in-cpp-how-are-protected-members-of-a-base-class-accessed-in-derived-class-when-inherited-privately/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 22:15:34 +0000</pubDate>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[++ - Accessing protected members in a derived class]]></category>
		<category><![CDATA[Accenture interview questions and answers]]></category>
		<category><![CDATA[access specifiers in c++ inheritance]]></category>
		<category><![CDATA[access specifiers in c++ inheritancec]]></category>
		<category><![CDATA[Applied Materials interview questions and answers]]></category>
		<category><![CDATA[Atos interview questions and answers]]></category>
		<category><![CDATA[BMC Software interview questions and answers]]></category>
		<category><![CDATA[Bosch India Software interview questions and answers]]></category>
		<category><![CDATA[c++ - Accessing protected members in a derived class]]></category>
		<category><![CDATA[c++ - why does the derived class inherit the private members]]></category>
		<category><![CDATA[c++ - why does the derived class inherit the private members of]]></category>
		<category><![CDATA[c++ Does protected inheritance allow the derived class access]]></category>
		<category><![CDATA[c++ protected inheritance]]></category>
		<category><![CDATA[Can derived class access private members of base class]]></category>
		<category><![CDATA[Can protected members be accessed by objects?]]></category>
		<category><![CDATA[CASTING NETWORKS INDIA PVT LIMITED interview questions and answers]]></category>
		<category><![CDATA[Chetu interview questions and answers]]></category>
		<category><![CDATA[Ciena Corporation interview questions and answers]]></category>
		<category><![CDATA[Dell International Services India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[derived class c++]]></category>
		<category><![CDATA[eInfochips interview questions and answers]]></category>
		<category><![CDATA[Electronics Arts Inc interview questions and answers]]></category>
		<category><![CDATA[Flipkart interview questions and answers]]></category>
		<category><![CDATA[Harman International interview questions and answers]]></category>
		<category><![CDATA[How to access protected members in a derived class]]></category>
		<category><![CDATA[how to access protected members in c++]]></category>
		<category><![CDATA[If a base class member access is public and an inherited class]]></category>
		<category><![CDATA[Indecomm Global Services interview questions and answers]]></category>
		<category><![CDATA[Larsen & Toubro interview questions and answers]]></category>
		<category><![CDATA[Mathworks India Private Limited interview questions and answers]]></category>
		<category><![CDATA[Mavenir interview questions and answers]]></category>
		<category><![CDATA[Most Asked Sapient Nitro Interview Questions]]></category>
		<category><![CDATA[Mphasis interview questions and answers]]></category>
		<category><![CDATA[NetApp interview questions and answers]]></category>
		<category><![CDATA[Oracle Corporation interview questions and answers]]></category>
		<category><![CDATA[PeopleStrong interview questions and answers]]></category>
		<category><![CDATA[Philips Software Centre Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[protected in c++ with example]]></category>
		<category><![CDATA[Protected members]]></category>
		<category><![CDATA[protected members inheritance in c++]]></category>
		<category><![CDATA[SRM Technologies interview questions and answers]]></category>
		<category><![CDATA[Symphony Teleca interview questions and answers]]></category>
		<category><![CDATA[Tech Mahindra interview questions and answers]]></category>
		<category><![CDATA[Tecnotree interview questions and answers]]></category>
		<category><![CDATA[What are the use cases of protected and private inheritance]]></category>
		<category><![CDATA[Wipro Infotech interview questions and answers]]></category>
		<category><![CDATA[Wipro interview questions and answers]]></category>
		<category><![CDATA[Yash Technologies interview questions and answers]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=366</guid>

					<description><![CDATA[Answer : A. Privately]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h4 id="in-c-how-are-protected-members-of-a-base-class-accessed-in-derived-class-when-inherited-privately" class="color-pink" style="text-align: justify;">In c++ how are protected members of a base class accessed in derived class when inherited privately ?</h4>
<div class="row" style="text-align: justify;">
<div class="col-sm-6">
<p>A. Privately</p>
</div>
<div class="col-sm-6">
<p>B. Publicly</p>
</div>
<div class="col-sm-6">
<p>C. Protectedly</p>
</div>
<div class="col-sm-6">
<p>D. Not Inherited</p>
</div>
</div>
</div>
</div>
<h3 id="answer-a-privately" style="text-align: justify;"><b>Answer : </b>A. Privately</h3>
<div class="subheading" style="text-align: justify;">
<h2 id="explanation">Explanation:</h2>
</div>
<div class="Content">
<div class="hddn">
<ul>
<li style="text-align: justify;">Derived classes can access protected and public members of it&#8217;s base class, and the derived class can not access the private members of it&#8217;s base class.</li>
<li>The private members are inherited for the following reason :
<ul>
<li style="text-align: justify;">The base class can define a protected or public function that modifies the base class&#8217;s private member.</li>
</ul>
</li>
</ul>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/cpp/in-cpp-how-are-protected-members-of-a-base-class-accessed-in-derived-class-when-inherited-privately/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
