<?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>Advanced programs | Student Projects</title>
	<atom:link href="https://studentprojects.in/category/software-development/cpp/cpp-programs/cpp-advanced/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Sat, 10 Dec 2022 04:52:03 +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>Program to implement Kruskal algorithm in c++</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/program-to-implement-kruskal-algorithm-in-c/</link>
					<comments>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/program-to-implement-kruskal-algorithm-in-c/#respond</comments>
		
		<dc:creator><![CDATA[surbhi]]></dc:creator>
		<pubDate>Tue, 24 May 2022 08:55:07 +0000</pubDate>
				<category><![CDATA[Advanced programs]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=4338</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[<pre class="wp-block-code"><code lang="cpp" class="language-cpp">// kruskal minimum spanning tree
#include&lt;iostream.h>

#include&lt;conio.h>

//structure for graph

struct str {
  int edge, n1, n2;
}
s0[20], s1[20];

//structure for checking nodes

struct st {
  int val, flag;
}
s2[20];

void input();
void filter();
void sort();
void min();
void update(int, int, int);

int n, e, cnt = 0, Tcost = 0;
int link[10][10];

void main() {
  clrscr();
  input();
  cout &lt;&lt; “this is filtered output\ n”;
  filter();
  cout &lt;&lt; “this is sorted output\ n”;
  sort();
  min();
  cout &lt;&lt; “\nTcost is“ &lt;&lt; Tcost;
  getch();
}

void input() {
  cout &lt;&lt; “enter no.of nodes and edges\ n”;
  cin >> n >> e;
  cout &lt;&lt; “enter input
  for upper triangle matrix\ n”;
  for (int i = 0; i &lt; n; i++) {
    for (int j = 0; j &lt; n; j++) {
      if (i != j &amp;&amp; j > i) {
        cout &lt;&lt; “enter link of node“ &lt;&lt; i &lt;&lt; ”to node“ &lt;&lt; j &lt;&lt; endl;
        cin >> link[i][j];
      } else {
        if (i == j)
          link[i][j] = 0;
        else
          link[i][j] = link[j][i];
      }
    }
  }
}

int k = 0, count = 0;

void filter() {
  for (int i = 0; i &lt; n; i++) {
    for (int j = 0; j &lt; n; j++) {
      if (link[i][j] != 0) {
        s0[k].edge = link[i][j];
        s0[k].n1 = i;
        s0[k].n2 = j;
        k++;
        count++;
      }
    }
  }
  i = 0;
  int j = 0;
  int flag = 1;
  for (int l = 0; l &lt; count; l++) {
    if (i == 0) {
      s1[j].edge = s0[i].edge;
      s1[j].n1 = s0[i].n1;
      s1[j].n2 = s0[i].n2;
      i++;
      j++;
    } else {
      k = 0;
      while (k &lt; j) {
        if (s1[k].edge == s0[i].edge &amp;&amp; s1[k].n1 == s0[i].n2 &amp;&amp; s1[k].n2 == s0[i].n1) {
          flag = 0;
          break;
        } else
          k++;
      }
      if (flag) {
        s1[j].edge = s0[i].edge;
        s1[j].n1 = s0[i].n1;
        s1[j].n2 = s0[i].n2;
        i++;
        j++;
        cnt++;
      } else {
        i++;
        flag = 1;
      }
    }
  }
  for (i = 0; i &lt;= cnt; i++)
    cout &lt;&lt; s1[i].edge &lt;&lt; “\t” &lt;&lt; s1[i].n1 &lt;&lt; “\t” &lt;&lt; s1[i].n2 &lt;&lt; endl;
}

void sort() {
  for (int i = 0; i &lt;= cnt - 1; i++) {
    for (int j = 0; j &lt;= cnt - i - 1; j++) {
      if (s1[j].edge > s1[j + 1].edge) {
        int t = s1[j].edge;
        s1[j].edge = s1[j + 1].edge;
        s1[j + 1].edge = t;

        int t1 = s1[j].n1;
        s1[j].n1 = s1[j + 1].n1;
        s1[j + 1].n1 = t1;

        int t2 = s1[j].n2;
        s1[j].n2 = s1[j + 1].n2;
        s1[j + 1].n2 = t2;
      }
    }
  }
  for (i = 0; i &lt; cnt; i++)
    cout &lt;&lt; s1[i].edge &lt;&lt; “\t” &lt;&lt; s1[i].n1 &lt;&lt; “\t” &lt;&lt; s1[i].n2 &lt;&lt; endl;

}

void min() {

  //initialize s2 structure

  for (int i = 0; i &lt; n; i++) {
    s2[i].val = i;
    s2[i].flag = i + 1;
  }

  int u, v, y, z;
  int cur = n;

  for (i = 0; i &lt; e; i++) {
    y = s1[i].n1;
    z = s1[i].n2;
    //cout&lt;&lt;“y &amp; z “&lt;&lt;y&lt;&lt;z;
    u = s2[y].flag;
    v = s2[z].flag;
    if (u != v) {
      Tcost += s1[i].edge;
      cout &lt;&lt; “\nedge“ &lt;&lt; y &lt;&lt; “– > ” &lt;&lt; z;
    }
    cur = cur + 1;
    update(y, z, cur);
  }
}

void update(int y, int z, int cur) {
  for (int i = 0; i &lt; n; i++) {
    if (i != y) {
      if (s2[y].flag == s2[i].flag)
        s2[i].flag = cur;
    }

    if (i != z) {
      if (s2[z].flag == s2[i].flag)
        s2[i].flag = cur;
    }
  }
  s2[y].flag = cur;
  s2[z].flag = cur;
}</code></pre><p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/program-to-implement-kruskal-algorithm-in-c/">Program to implement Kruskal algorithm in c++</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/program-to-implement-kruskal-algorithm-in-c/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to multiply a number by 7 without using * and + operator</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/how-to-multiply-a-number-by-7-without-using-and-operator/</link>
					<comments>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/how-to-multiply-a-number-by-7-without-using-and-operator/#respond</comments>
		
		<dc:creator><![CDATA[Chitra]]></dc:creator>
		<pubDate>Tue, 12 Apr 2022 13:41:06 +0000</pubDate>
				<category><![CDATA[Advanced programs]]></category>
		<guid isPermaLink="false">https://studentprojects.in/?p=9024</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[<pre class="wp-block-code"><code lang="cpp" class="language-cpp">NewNum = Num &lt;&lt; 3; // multiplied by 2 ^ 3 = 8

	NewNum = NewNum - Num; // 8 – 1 = 7</code></pre><p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/how-to-multiply-a-number-by-7-without-using-and-operator/">How to multiply a number by 7 without using * and + operator</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/how-to-multiply-a-number-by-7-without-using-and-operator/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Palindrome checking using function overloading</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/palindrome-checking-using-function-overloading/</link>
					<comments>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/palindrome-checking-using-function-overloading/#respond</comments>
		
		<dc:creator><![CDATA[sathish kumar]]></dc:creator>
		<pubDate>Wed, 17 Apr 2013 06:36:42 +0000</pubDate>
				<category><![CDATA[Advanced programs]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=3965</guid>

					<description><![CDATA[<p>#include "iostream" using namespace std; #include "conio.h" #include "string.h" class func { public: void pal(int ); void pal(char c[]); }; void func :: pal(int n) { int n1,sum,a; n1=n; sum=0; do { sum=sum*10; a=n%10; sum=sum+a; n=n/10; }while(n>0); if(sum==n1) cout</p>
<p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/palindrome-checking-using-function-overloading/">Palindrome checking using function overloading</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre lang="Cpp" line="1">
#include "iostream"
using namespace std;
#include "conio.h"
#include "string.h"
class func
{
	public:
		void pal(int );
		void pal(char c[]);
};
void func :: pal(int n)
{
	int n1,sum,a;
	n1=n;
	sum=0;

	do
	{
		sum=sum*10;
		a=n%10;
		sum=sum+a;
		n=n/10;
	}while(n>0);
	if(sum==n1)
		cout<<"\n it is Palindrom";
	else
		cout<<"\n it is not a palindrom";

}
void func :: pal(char c[])
{
	int l=strlen(c);
	char b[10];
	int i,j;
	for(i=0,j=l-1;i<l;i++,j–)
	{
		b[i]=c[j];
	}
	b[i]='';
	if(strcmp(c,b)==0)
	{cout<<"\nThe entered text is palindrome";
	}
	else
	{cout<<"\n the entered text is not a palindrome";
	}
}
int main()
{
	char c[10];
	int k,r,v;
	func p;
	do
	{
		cout<<"palindrome"<<endl;
		cout<<"1.for interger"<<endl;
		cout<<"2.for character"<<endl;
		cout<<"enter the choice\n"<<endl;
		cin>>r;
		switch(r)
		{
			case 1:
				cout<<"Enter the number";
				cin>>k;
				p.pal(k);
				break;

			case 2:
				cout<<"\nEnter the string to be checked"<<endl;
				cin>>c;
				p.pal(c);
				break;
		}
		cout<<"\ndo you want to continue? (1/0)"<<endl;
		cin>>v;
	}while(v==1);
	getch();
}
</pre><p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/palindrome-checking-using-function-overloading/">Palindrome checking using function overloading</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/palindrome-checking-using-function-overloading/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Find the Area of shapes using function overloading</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/find-the-area-of-shapes-using-function-overloading/</link>
					<comments>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/find-the-area-of-shapes-using-function-overloading/#comments</comments>
		
		<dc:creator><![CDATA[sathish kumar]]></dc:creator>
		<pubDate>Wed, 17 Apr 2013 06:07:48 +0000</pubDate>
				<category><![CDATA[Advanced programs]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=3963</guid>

					<description><![CDATA[<p>Here is a program which will find the Area of shapes using function overloading. #include "iostream" #include "conio.h" using namespace std; class measure { public: void shape(int r); void shape(int l,int b); void shape(float t,int d,int e); void shape(long a); void shape(float c, long int g); void shape(double j); void shape(float h, double f); };</p>
<p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/find-the-area-of-shapes-using-function-overloading/">Find the Area of shapes using function overloading</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Here is a program which will find the Area of shapes using function overloading.</p>
<pre lang="Cpp" line="1">
#include "iostream"
#include "conio.h"
using namespace std;
class measure
{
	public:
		void shape(int r);
		void shape(int l,int b);
		void shape(float t,int d,int e);
		void shape(long a);
		void shape(float c, long int g);
		void shape(double j);
		void shape(float h, double f);
};
void measure::shape(int r)
{
	cout<<"area of the circle is "<<3.14*r*r;
}
void measure::shape(int l,int b)
{
	cout<<"area of the rectangle is"<<l*b;
}
void measure::shape(float t,int d,int e)
{
	cout<<"area of the triangle is"<<t*d*e;
}
void measure::shape(long a)
{
	cout<<"area of the square is"<<a*a;
}
void measure::shape(float c, long int g)
{
	cout<<"Volume of the cone is "<<(1/3)*3.14*c*c*g;
}
void measure::shape(double j)
{
	cout<<"Volume of the sphere is "<<(4/3)*3.14*j*j*j;
}
void measure::shape(float h, double f)
{
	cout<<"\nVolume of the Cylinder is "<<3.14*f*f*h;
}
int main()
{
	int r,d,e,l,b;
	float t,c,h;
	long a;
	int ch;
	double j,f;
	long int g;
	measure obj;
	cout<<"\tCALCULATION OF AREA AND VOLUME";
	cout<<"\n\n1. area of circle";
	cout<<"\n2. area of rectangle";
	cout<<"\n3. area of triangle";
	cout<<"\n4. area of square";
	cout<<"\n5. Volume of the cone";
	cout<<"\n6. Volume of the sphere";
	cout<<"\n7. Volume of the cylinder";
	cout<<"\n\tEnter your choice ";
	cin>>ch;
	switch(ch)
	{
		case 1:
			cout<<"enter the value of radius of the circle \n";
			cin>>r;
			obj.shape(r);
			break;
		case 2:
			cout<<"enter the sides of rectangle \n";
			cin>>l>>b;
			obj.shape(l,b);
			break;
		case 3:
			cout<<"enter the sides of triangle \n";
			cin>>d>>e;
			obj.shape(0.5,d,e);
			break;
		case 4:
			cout<<"enter the sides of square";
			cin>>a;
			obj.shape(a);
			break;
		case 5:
			cout<<"\nEnter the radius of the cone";
			cin>>c;
			cout<<"\nEnter the height of the cone";
			cin>>g;
			obj.shape(c,g);
			break;
		case 6:
			cout<<"\nEnter the radius";
			cin>>b;
			obj.shape(b);
			break;
		case 7:
			cout<<"\nEnter the radius";
			cin>>f;
			cout<<"\nEnter the height";
			cin>>h;
			obj.shape(h,f);
			break;
		default:
			cout<<"\nThe choice entered is a wrong choice";
	}
	getch();
}
</pre><p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/find-the-area-of-shapes-using-function-overloading/">Find the Area of shapes using function overloading</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/find-the-area-of-shapes-using-function-overloading/feed/</wfw:commentRss>
			<slash:comments>11</slash:comments>
		
		
			</item>
		<item>
		<title>C++ program to implement circular queue using array</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-program-to-implement-circular-queue-using-array/</link>
					<comments>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-program-to-implement-circular-queue-using-array/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Wed, 02 Feb 2011 12:16:03 +0000</pubDate>
				<category><![CDATA[Advanced programs]]></category>
		<category><![CDATA[circular queue]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[C Programs]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1269</guid>

					<description><![CDATA[<p>#include class cqueue { private : int *arr ; int front, rear ; int MAX; public : cqueue( int maxsize = 10 ) ; void addq ( int item ) ; int delq( ) ; void display( ) ; } ; cqueue :: cqueue( int maxsize ) { MAX = maxsize ; arr = new</p>
<p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-program-to-implement-circular-queue-using-array/">C++ program to implement circular queue using array</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre lang="cpp">
#include <iostream.h>
class cqueue
{
	private :
		int *arr ;
		int front, rear ;
		int MAX;
	public :
		cqueue( int maxsize = 10 ) ;
		void addq ( int item ) ;
		int delq( ) ;
		void display( ) ;
} ;
cqueue :: cqueue( int maxsize )
{
	MAX = maxsize ;
	arr = new int [ MAX ];
	front = rear = -1 ;
	for ( int i = 0 ; i < MAX ; i++ )
		arr[i] = 0 ;
}
void cqueue :: addq ( int item )
{
	if ( ( rear + 1 ) % MAX == front )
	{
		cout << "\nQueue is full" ;
		return ;
	}
	rear = ( rear + 1 ) % MAX;
	arr[rear] = item ;
	if ( front == -1 )
		front = 0 ;
}
int cqueue :: delq( )
{
	int data ;
	if ( front == -1 )
	{
		cout << "\nQueue is empty" ;
		return NULL ;
	}

	data = arr[front] ;
	arr[front] = 0 ;
	if ( front == rear )
	{
		front = -1 ;
		rear = -1 ;
	}
	else
		front = ( front + 1 ) % MAX;
	return data ;
}
void cqueue :: display( )
{
	cout << endl ;
	for ( int i = 0 ; i < MAX ; i++ )
		cout << arr[i] << "  " ;
	cout << endl ;
}
void main( )
{
	cqueue a ( 10 ) ;
	a.addq ( 14 ) ;
	a.addq ( 22 ) ;
	a.addq ( 13 ) ;
	a.addq ( -6 ) ;
	a.addq ( 25 ) ;
	cout << "\nElements in the circular queue: " ;
	a.display( ) ;
	int i = a.delq( ) ;
	cout << "Item deleted: " << i ;
	i = a.delq( ) ;
	cout << "\nItem deleted: " << i ;
	cout << "\nElements in the circular queue after deletion: " ;
	a.display( ) ;
	a.addq ( 21 ) ;
	a.addq ( 17 ) ;
	a.addq ( 18 ) ;
	a.addq ( 9 ) ;
	a.addq ( 20 ) ;
	cout << "Elements in the circular queue after addition: " ;
	a.display( ) ;
	a.addq ( 32 ) ;
	cout << "Elements in the circular queue after addition: " ;
	a.display( ) ;
}
</pre><p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-program-to-implement-circular-queue-using-array/">C++ program to implement circular queue using array</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-implement-circular-queue-using-array/feed/</wfw:commentRss>
			<slash:comments>11</slash:comments>
		
		
			</item>
		<item>
		<title>Program to implement Binary Search Algorithm</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/program-to-implement-binary-search-algorithm/</link>
					<comments>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/program-to-implement-binary-search-algorithm/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Tue, 01 Feb 2011 11:44:15 +0000</pubDate>
				<category><![CDATA[Advanced programs]]></category>
		<category><![CDATA[binary search]]></category>
		<category><![CDATA[Binary Search Algorithm]]></category>
		<category><![CDATA[C Programs]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1223</guid>

					<description><![CDATA[<p>#include template int binarySearch(T a[], int n, T&#038; x) { int left = 0; // left end of segment int right = n - 1; // right end of segment while (left a[middle]) left = middle + 1; else right = middle - 1; } return -1; // x not found } int main() {</p>
<p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/program-to-implement-binary-search-algorithm/">Program to implement Binary Search Algorithm</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre lang="cpp">
#include <iostream.h>
template<class T>
int binarySearch(T a[], int n, T& x)
{
	int left = 0;                       // left end of segment
	int right = n - 1;                  // right end of segment
	while (left <= right)
	{
		int middle = (left + right)/2;   // middle of segment
		if (x == a[middle]) return middle;
		if (x > a[middle]) left = middle + 1;
		else right = middle - 1;
	}
	return -1; // x not found
}
int main()
{
	int a[10],n,t;
	cout<<"Enter the size:";
	cin>>n;
	cout<<"enter the elements in sorted order:";
	for(int i=0;i<n;i++)
		cin>>a[i];
	cout<<"enter the element to search:";
	cin>>t;
	int f=binarySearch(a,n,t);
	if(f==-1)
		cout<<"element not found";
	else
		cout<<"element found at index:"<<f;
}
</pre><p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/program-to-implement-binary-search-algorithm/">Program to implement Binary Search Algorithm</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/program-to-implement-binary-search-algorithm/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>C++ programs to implement Graph Traversal Techniques &#8211; Depth First Search/Breadth First Search</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-programs-to-implement-graph-traversal-techniques-depth-first-searchbreadth-first-search/</link>
					<comments>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-programs-to-implement-graph-traversal-techniques-depth-first-searchbreadth-first-search/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Mon, 31 Jan 2011 12:38:55 +0000</pubDate>
				<category><![CDATA[Advanced programs]]></category>
		<category><![CDATA[Search algorithm]]></category>
		<category><![CDATA[Breadth first]]></category>
		<category><![CDATA[Graph Traversal Techniques]]></category>
		<category><![CDATA[Depth First]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[C Programs]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1279</guid>

					<description><![CDATA[<p>a)Program to implement Breadth first Search algorithm. #include #include #include int cost[10][10],i,j,k,n,queue[10],front,rear,v,visit[10],visited[10]; void main() { int m; clrscr(); cout n; cout m; cout >j; cost[i][j]=1; } cout v; cout</p>
<p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-programs-to-implement-graph-traversal-techniques-depth-first-searchbreadth-first-search/">C++ programs to implement Graph Traversal Techniques – Depth First Search/Breadth First Search</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><strong>a)Program to implement Breadth first Search algorithm.</strong></p>
<pre lang="cpp">
#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
int cost[10][10],i,j,k,n,queue[10],front,rear,v,visit[10],visited[10];
void main()
{
	int m;
	clrscr();
	cout <<"enterno of vertices";
	cin >> n;
	cout <<"ente no of edges";
	cin >> m;
	cout <<"\nEDGES \n";
	for(k=1;k<=m;k++)
	{
		cin >>i>>j;
		cost[i][j]=1;
	}
	cout <<"enter initial vertex";
	cin >>v;
	cout <<"Visitied vertices\n";
	cout << v;
	visited[v]=1;
	k=1;
	while(k<n)
	{
		for(j=1;j<=n;j++)
			if(cost[v][j]!=0 &#038;&#038; visited[j]!=1 &#038;&#038; visit[j]!=1)
			{
				visit[j]=1;
				queue[rear++]=j;
			}
		v=queue[front++];
		cout<<v << " ";
		k++;
		visit[v]=0;
		visited[v]=1;
	}
	getch();
}
</pre>
<p><strong>b)Program to implement Depth First Search Algorithm.</strong></p>
<pre lang="cpp">
#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
int cost[10][10],i,j,k,n,stack[10],top,v,visit[10],visited[10];
void main()
{
	int m;
	cout <<"enterno of vertices";
	cin >> n;
	cout <<"ente no of edges";
	cin >> m;
	cout <<"\nEDGES \n";
	for(k=1;k<=m;k++)
	{
		cin >>i>>j;
		cost[i][j]=1;
	}
	cout <<"enter initial vertex";
	cin >>v;
	cout <<"ORDER OF VISITED VERTICES";
	cout << v <<" ";
	visited[v]=1;
	k=1;
	while(k<n)
	{
		for(j=n;j>=1;j--)
			if(cost[v][j]!=0 && visited[j]!=1 && visit[j]!=1)
			{
				visit[j]=1;
				stack [top]=j;
				top++;
			}
		v= stack [--top];
		cout<<v << " ";
		k++;
		visit[v]=0; visited[v]=1;
	}
	getch();
}
</pre><p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-programs-to-implement-graph-traversal-techniques-depth-first-searchbreadth-first-search/">C++ programs to implement Graph Traversal Techniques – Depth First Search/Breadth First Search</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-programs-to-implement-graph-traversal-techniques-depth-first-searchbreadth-first-search/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
		<item>
		<title>Program to implement Linear Search algorithm</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/program-to-implement-linear-search-algorithm/</link>
					<comments>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/program-to-implement-linear-search-algorithm/#respond</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Sun, 30 Jan 2011 11:41:44 +0000</pubDate>
				<category><![CDATA[Advanced programs]]></category>
		<category><![CDATA[Linear Search algorithm]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[C Programs]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1221</guid>

					<description><![CDATA[<p>#include #include void read(int a[10],int n) { cout</p>
<p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/program-to-implement-linear-search-algorithm/">Program to implement Linear Search algorithm</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre lang="cpp">
#include<iostream.h>
#include<constream.h>
void read(int a[10],int n)
{
	cout<<"reading\n";
	for(int i=0;i<n;i++)
		cin>>a[i];
}
void display(int a[10],int n)
{
	for(int i=0;i<n;i++)
		cout<<a[i]<<"\t";
}
void linearsearch ( int a[10],int n  )
{
	int k,flag=0;
	read(a,n);
	display(a,n);
	cout<<"\nenter an element to be search\n";
	cin>>k;
	for(int i=0;i<n;i++)
	{
		if(a[i]==k)
			flag=1;
		break;
	}
	if(flag==1)
		cout << "\nsearching is  successful,element is found at position " << i +1<<endl;
	else
		cout<<"searching not successful\n";
}
void main()
{
	int a[10], n;
	clrscr();
	cout<<"enter n value..\n";
	cin>>n;
	linearsearch(a,n);
	getch();
}
</pre><p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/program-to-implement-linear-search-algorithm/">Program to implement Linear Search algorithm</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/program-to-implement-linear-search-algorithm/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>C++ program using class to generate mark sheet using multiple inheritance</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-program-using-class-to-generate-mark-sheet-using-multiple-inheritance/</link>
					<comments>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-program-using-class-to-generate-mark-sheet-using-multiple-inheritance/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Sun, 04 Apr 2010 15:17:28 +0000</pubDate>
				<category><![CDATA[Advanced programs]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[C Programs]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[multiple inheritances]]></category>
		<category><![CDATA[student class]]></category>
		<category><![CDATA[inheritances]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1144</guid>

					<description><![CDATA[<p>Using multiple inheritances, prepare a Student Mark sheet, class marks for every student in three subjects. The inherited class generates mark sheet. #include #include #include class student { int roll; char name[25]; char add [25]; char *city; public: student() { cout>sub3; } void output() { putdata(); cout</p>
<p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-program-using-class-to-generate-mark-sheet-using-multiple-inheritance/">C++ program using class to generate mark sheet using multiple inheritance</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Using multiple inheritances, prepare a Student Mark sheet, class marks for every student in three subjects. The inherited class generates mark sheet.</p>
<pre lang="cpp">
#include<iostream.h>
#include<stdio.h>
#include<dos.h>
class student 
{
	int roll;
	char name[25];
	char add [25];
	char *city;
	public: student()
	{
		cout<<"welcome in the student information system"<<endl;
	}
	void getdata()
	{
		cout<<"\n enter the student roll no.";
		cin>>roll;
		cout<<"\n enter the student name";
		cin>>name;
		cout<<\n enter ther student address";
		cin>>add;
		cout<<"\n enter the student city";
		cin>>city;
	}
	void putdata()
	{
		cout<,"\n the student roll no:"<<roll;
		cout<<"\n the student name:"<<name;
		cout<<"\n the student coty:"<<city;
	}
};
class mrks: public student
{
	int sub1;
	int sub2;
	int sub3;
	int per;
	public: void input()
	{
		getdata();
		cout<<"\n enter the marks1:"
		cin>>sub1:
		cout<<"\n enter the marks2:";
		cin>>sub2;
		cout<<\n enter the marks3:";
		cin>>sub3;
	}
	void output()
	{
		putdata();
		cout<<"\n marks1:"<<sub1;
		cout<<"\n marks2:"<<sub2;
		cout<<"\n marks3:"<<sub3;
	}
	void calculate ()
	{
		per= (sub1+sub2+sub3)/3;
		cout<<"\n tottal percentage"<<per;
	}
};

void main()
{
	marks m1[25];
	int ch;
	int count=0;
	do 
	{
		cout<<\n1.input data";
		cout<<\n2.output data";
		cout<<\n3. Calculate percentage";
		cout<<\n4.exit";
		cout<<\n enter the choice";
		cin>>ch;
		switch (ch)
		{
			case 1:
			m1.input();
			count++;
			break;
			
                        case2:
			m1.output();
			break;

			case3:
			m1.calculate();
			break;
		}
	} while (ch!=4);
}
</pre><p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-program-using-class-to-generate-mark-sheet-using-multiple-inheritance/">C++ program using class to generate mark sheet using multiple 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-using-class-to-generate-mark-sheet-using-multiple-inheritance/feed/</wfw:commentRss>
			<slash:comments>21</slash:comments>
		
		
			</item>
		<item>
		<title>C++ class program to perform complex arithmetic using operator overloading</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-class-program-to-perform-complex-arithmetic-using-operator-overloading/</link>
					<comments>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-class-program-to-perform-complex-arithmetic-using-operator-overloading/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Sun, 04 Apr 2010 14:04:26 +0000</pubDate>
				<category><![CDATA[Advanced programs]]></category>
		<category><![CDATA[operator overloading]]></category>
		<category><![CDATA[complex numbers]]></category>
		<category><![CDATA[complex arithmetic]]></category>
		<category><![CDATA[c++ complex]]></category>
		<category><![CDATA[add complex numbers]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1142</guid>

					<description><![CDATA[<p>Write a program to perform complex arithmetic using operator overloading #include #include #include #include class complex { int real; float image; public: void getdata() { coutreal; coutimage; } void operator + (complex); void operator - (complex); }; void complex :: operator + (complex c1) { complex temp; temp.real=real+c1.real; temp.image=image+c1.image; if (temp.image>=0); { cout</p>
<p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-class-program-to-perform-complex-arithmetic-using-operator-overloading/">C++ class program to perform complex arithmetic using operator overloading</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Write a program to perform complex arithmetic using operator overloading</p>
<pre lang="cpp">
#include<iostream.h>
#include<stdio.h>
#include<conio.h>
#include<process.h>
class complex
{
	int real;
	float image;
	public:
	void getdata()
	{
		cout<<"\n enter the real part of the complex";
		cin>>real;
		cout<<"\n enter the imaginary part of the complex";
		cin>>image;
	}
	void operator + (complex);
	void operator - (complex);
};

void complex :: operator +  (complex c1)
{
	complex temp;
	temp.real=real+c1.real;
	temp.image=image+c1.image;
	if (temp.image>=0);
	{
		cout<<"\n complex no. after addition:";
		cout<<temp.real<<"+"<<temp.image<<"i";
	}
	else
	{
		cout<<"\n complex no. after addition ";
		cout<<temp.real<<temp.image<<"i";
	}
}
void complex ::operator-(complex c1)
{
	complex temp;
	temp.real = real-c1.image;
	temp.image= image-c1.image;
	if (temp.image>=0)
	{
		cout<<"\n complex no. after subtraction";
		cout<<"\n temp.real<<"+"<<temp.image<<"i";
	}
	else
	{
		cout<<"\n complex no. after subtraction";
		cout<<temp.real<<temp.image<<"i"
	}
}
void main()
{
	clrscr();
	comp.ex c1, c2;
	int n;
	do 
	{
		cout<<"\n 1. Input data for complex no. ";
		cout<<"\n 2. Addition of complex no. ";
		cout<<"\n 3. Subtraction of complex no. ";
		cout<<"\n 4. Quit";
		cout<<"\n Enter your choice";
		cin>>n;
		switch(n)

		{ 
			 case1:
			 cout<<endl<<"\n Enter the data for First Complex No......";
			 cl.getdata();
			 cout<<endl<<"\n Enter the data for seconds Complex No.....";
			 c2.getdata();
			 clrscr();
			 break;
			 
			 case 2;
			 cl+c2;
			 getch();
			 clrscr();
			 break;
			 
			 case 3:
			 cl-c2;
			 getch();
			 clrscr();
			 brak;

			 case 4:
			 exit91);
			 break;
			}
		} while (n!=4);
     getch();
}
</pre><p>The post <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-advanced/c-class-program-to-perform-complex-arithmetic-using-operator-overloading/">C++ class program to perform complex arithmetic using operator overloading</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-class-program-to-perform-complex-arithmetic-using-operator-overloading/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
