<?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>c++ functions | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/c-functions/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Sat, 13 Mar 2010 15:02:27 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>C++ program to illustrate Multilevel Inheritance</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-program-to-illustrate-multilevel-inheritance/</link>
					<comments>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-program-to-illustrate-multilevel-inheritance/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Sat, 13 Mar 2010 15:02:27 +0000</pubDate>
				<category><![CDATA[Advanced programs]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[Multilevel Inheritance]]></category>
		<category><![CDATA[c++ inheritance]]></category>
		<category><![CDATA[c++ functions]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1058</guid>

					<description><![CDATA[<p>MULTILEVEL INHERITANCE AIM: A program to illustrate multilevel inheritance. we have three classes, student, test and result. Here class student is the base class. And the class test is derived from the base class student. And the another class result is derived from the class test. ALGORITHM: • Start the process • Invoke the base</p>
<p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-program-to-illustrate-multilevel-inheritance/">C++ program to illustrate Multilevel Inheritance</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><strong>MULTILEVEL INHERITANCE</strong></p>
<p><strong>AIM: </strong><br />
A program to illustrate multilevel inheritance. we have three classes, student, test and result. Here class student is the base class. And the class test is derived from the base class student. And the another class result is derived from the class test.</p>
<p><strong>ALGORITHM: </strong></p>
<p>•	Start the process<br />
•	Invoke the base class student<br />
•	Invoke the derived class test which in inherited by the class student<br />
•	Invoke the derived class result which in inherited by the class test<br />
•	Create an object student1 for the result class<br />
•	Call student1.getno(),assign the value of rno in student class<br />
•	Call student1.getmarks(),assign the marks in test class<br />
•	Call student1.display(),for displaying the result<br />
•	Stop the process</p>
<p><strong>PROGRAM</strong></p>
<pre lang=""cpp>
#include<iostream.h>
#include<conio.h>
class student
{
   		protected:
   		int rno;
   		public:
   		void getno(int);
   		void putno(void);
};
void student::getno(int a)
{
rno=a;
}
void student ::putno()
{
cout<<"rollno="<<rno<<endl;
}
class test:public student
{
protected:
float sub1;
float sub2;
public:
			void getmarks(float,float);
			void putmarks(void);
};
void test::getmarks(float x,float y)
{
sub1=x;
sub2=y;
}
void test::putmarks()
{
cout<<"marks in sub1="<<sub1<<endl;
cout<<"marks in sub2="<<sub2<<endl;
}
class result:public test
{
float total;
public:
void display(void);
};
void result::display(void)
{
total=sub1+sub2;
putno();
putmarks();
cout<<"total="<<total<<endl;
}
		int main()
		{
			clrscr();
			result student1;
			student1.getno(111);
			student1.getmarks(75.0,59.5);
			student1.display();
			getch();
			return 0;
       		getch();
}
</pre>
<p><strong>OUTPUT</strong><br />
	Roll number:111<br />
	Marks in sub1=75<br />
	Marks in sub2=59.5<br />
	Total=134.5</p><p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-program-to-illustrate-multilevel-inheritance/">C++ program to illustrate Multilevel Inheritance</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-program-to-illustrate-multilevel-inheritance/feed/</wfw:commentRss>
			<slash:comments>13</slash:comments>
		
		
			</item>
	</channel>
</rss>
