<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>C++  PROGRAMS</title>
	<atom:link href="http://cpluspluscoded.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://cpluspluscoded.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Wed, 04 Jan 2012 20:10:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='cpluspluscoded.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>C++  PROGRAMS</title>
		<link>http://cpluspluscoded.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://cpluspluscoded.wordpress.com/osd.xml" title="C++  PROGRAMS" />
	<atom:link rel='hub' href='http://cpluspluscoded.wordpress.com/?pushpress=hub'/>
		<item>
		<title>testing JS tickr</title>
		<link>http://cpluspluscoded.wordpress.com/2012/01/04/testing-js-tickr/</link>
		<comments>http://cpluspluscoded.wordpress.com/2012/01/04/testing-js-tickr/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 18:46:39 +0000</pubDate>
		<dc:creator>cpluspluscoded</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cpluspluscoded.wordpress.com/?p=47</guid>
		<description><![CDATA[a test &#160; &#160; News Widgets &#38; TickersPowered by BlastCasta /* */<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cpluspluscoded.wordpress.com&amp;blog=5375286&amp;post=47&amp;subd=cpluspluscoded&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>a test</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div style="overflow:visible;border-color:#FFFFFF;border-style:none;border-width:0;">
<div id="newsblock18305723" style="word-wrap:break-word;background-color:#FFFFFF;padding:5px;">
<!-- DO NOT ALTER, REMOVE, OR IN ANY WAY TRY TO HIDE THE FOLLOWING TAG OR ITS CONTENTS OR BLASTCASTA WILL NOT FUNCTION PROPERLY. -->
<div align="center" style="font-size:8pt;"><a href="http://www.blastcasta.com/" style="text-decoration:none;color:#0000CC;" target="_top"><b>News Widgets &amp; Tickers</b><br />Powered by BlastCasta</a></div>
</div>
</div>
<p> /*  */ </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cpluspluscoded.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cpluspluscoded.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cpluspluscoded.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cpluspluscoded.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cpluspluscoded.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cpluspluscoded.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cpluspluscoded.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cpluspluscoded.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cpluspluscoded.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cpluspluscoded.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cpluspluscoded.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cpluspluscoded.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cpluspluscoded.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cpluspluscoded.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cpluspluscoded.wordpress.com&amp;blog=5375286&amp;post=47&amp;subd=cpluspluscoded&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cpluspluscoded.wordpress.com/2012/01/04/testing-js-tickr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5738132065e1f6f280b73f17ee569063?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cpluspluscoded</media:title>
		</media:content>
	</item>
		<item>
		<title>day 14 prog two</title>
		<link>http://cpluspluscoded.wordpress.com/2011/04/04/day-14-prog-two-2/</link>
		<comments>http://cpluspluscoded.wordpress.com/2011/04/04/day-14-prog-two-2/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 16:10:37 +0000</pubDate>
		<dc:creator>cpluspluscoded</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cpluspluscoded.wordpress.com/2011/04/04/day-14-prog-two-2/</guid>
		<description><![CDATA[#include #include struct employee { int emp_no; char dep[100]; int bas; int da; int hra; int gross; int tot; char ns[100]; }; int main() { int n,i=0,temp,j=0,max,pos=0; struct employee st[100]; clrscr(); printf(&#8220;Enter number of employee&#8221;); scanf(&#8220;%d&#8221;,&#38;n); for(i=0;i&#60;n;i++) { clrscr(); printf(&#8220;For employee number %d\n&#8221;,i+1); printf(&#8220;Enter name &#8220;); scanf(&#8220;%s&#8221;,&#38;st[i].ns); printf(&#8220;Enter department &#8220;); scanf(&#8220;%s&#8221;,&#38;st[i].dep); printf(&#8220;Enter basic pay, hra, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cpluspluscoded.wordpress.com&amp;blog=5375286&amp;post=43&amp;subd=cpluspluscoded&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>#include<br />
#include<br />
struct employee<br />
{<br />
int emp_no;<br />
char dep[100];<br />
int bas;<br />
int da;<br />
int hra;<br />
int gross;<br />
int tot;<br />
char ns[100];<br />
};<br />
int main()<br />
{<br />
int n,i=0,temp,j=0,max,pos=0;</p>
<p>struct employee st[100];<br />
clrscr();<br />
printf(&#8220;Enter number of employee&#8221;);<br />
scanf(&#8220;%d&#8221;,&amp;n);<br />
for(i=0;i&lt;n;i++)<br />
{<br />
clrscr();<br />
printf(&#8220;For employee number %d\n&#8221;,i+1);<br />
printf(&#8220;Enter name &#8220;);<br />
scanf(&#8220;%s&#8221;,&amp;st[i].ns);<br />
printf(&#8220;Enter department &#8220;);<br />
scanf(&#8220;%s&#8221;,&amp;st[i].dep);<br />
printf(&#8220;Enter basic pay, hra, da &#8220;);<br />
scanf(&#8220;%d%d%d&#8221;,&amp;st[i].bas,&amp;st[i].hra,&amp;st[i].da);<br />
st[i].tot=st[i].bas+st[i].hra+st[i].da;<br />
}<br />
max=st[0].tot;<br />
pos=0;<br />
for(i=0;i&lt;n;i++)<br />
{</p>
<p>if(st[i].tot&gt;max)</p>
<p>{<br />
max=st[i].tot;<br />
pos=i;<br />
}<br />
}</p>
<p>printf(&#8220;\nName of the employee getting highest salary: &#8220;);<br />
puts(st[pos].ns);<br />
printf(&#8220;department: &#8220;);<br />
puts(st[pos].dep);<br />
printf(&#8220;Total salary: %d&#8221;,max);</p>
<p>printf(&#8220;\n&#8221;);</p>
<p>getch();<br />
return 0;<br />
}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cpluspluscoded.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cpluspluscoded.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cpluspluscoded.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cpluspluscoded.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cpluspluscoded.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cpluspluscoded.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cpluspluscoded.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cpluspluscoded.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cpluspluscoded.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cpluspluscoded.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cpluspluscoded.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cpluspluscoded.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cpluspluscoded.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cpluspluscoded.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cpluspluscoded.wordpress.com&amp;blog=5375286&amp;post=43&amp;subd=cpluspluscoded&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cpluspluscoded.wordpress.com/2011/04/04/day-14-prog-two-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5738132065e1f6f280b73f17ee569063?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cpluspluscoded</media:title>
		</media:content>
	</item>
		<item>
		<title>day 14 prog one</title>
		<link>http://cpluspluscoded.wordpress.com/2011/04/04/day-14-prog-one/</link>
		<comments>http://cpluspluscoded.wordpress.com/2011/04/04/day-14-prog-one/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 15:10:29 +0000</pubDate>
		<dc:creator>cpluspluscoded</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cpluspluscoded.wordpress.com/2011/04/04/day-14-prog-one/</guid>
		<description><![CDATA[#include //include the header file struct student { int roll; int phy; int chem; int math; int tot; char ns[100]; }; int main() { int n,i=0,temp,j=0; struct student st[100]; clrscr(); printf(&#8220;Enter number of students&#8221;); scanf(&#8220;%d&#8221;,&#38;n); for(i=0;i&#60;n;i++) { clrscr(); printf(&#34;For student number %d\n&#34;,i+1); printf(&#34;Enter name &#34;); scanf(&#34;%s&#34;,&#38;st[i].ns); printf(&#34;Enter roll &#34;); scanf(&#34;%d&#34;,&#38;st[i].roll); printf(&#34;Enter marks in phy,chem,maths &#34;); [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cpluspluscoded.wordpress.com&amp;blog=5375286&amp;post=40&amp;subd=cpluspluscoded&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>#include  //include the header file<br />
 struct student<br />
 {<br />
  int roll;<br />
  int phy;<br />
  int chem;<br />
  int math;<br />
  int tot;<br />
  char ns[100];<br />
  };<br />
int main()<br />
{<br />
 int n,i=0,temp,j=0;</p>
<p>  struct student st[100];<br />
  clrscr();<br />
  printf(&#8220;Enter number of students&#8221;);<br />
  scanf(&#8220;%d&#8221;,&amp;n);<br />
  for(i=0;i&lt;n;i++)<br />
  {<br />
   clrscr();<br />
   printf(&quot;For student number %d\n&quot;,i+1);<br />
   printf(&quot;Enter name &quot;);<br />
   scanf(&quot;%s&quot;,&amp;st[i].ns);<br />
   printf(&quot;Enter roll &quot;);<br />
   scanf(&quot;%d&quot;,&amp;st[i].roll);<br />
   printf(&quot;Enter marks in phy,chem,maths &quot;);<br />
   scanf(&quot;%d%d%d&quot;,&amp;st[i].phy,&amp;st[i].chem,&amp;st[i].math);<br />
   st[i].tot=st[i].phy+st[i].chem+st[i].math;<br />
   }<br />
   for(i=0;i&lt;n;i++)<br />
   {<br />
    for(j=0;jst[j+1].tot)<br />
     {<br />
      temp=st[j+1].tot;<br />
      st[j+1].tot=st[j].tot;<br />
      st[j].tot=temp;<br />
      }<br />
     }<br />
    }<br />
    for(i=0;i&lt;n;i++)<br />
    {<br />
     printf(&quot;Marks: %d\nName: &quot;,st[i].tot);<br />
     puts(st[i].ns);<br />
     printf(&quot;\n&quot;);<br />
    }<br />
    getch();<br />
    return 0;<br />
   }</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cpluspluscoded.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cpluspluscoded.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cpluspluscoded.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cpluspluscoded.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cpluspluscoded.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cpluspluscoded.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cpluspluscoded.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cpluspluscoded.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cpluspluscoded.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cpluspluscoded.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cpluspluscoded.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cpluspluscoded.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cpluspluscoded.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cpluspluscoded.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cpluspluscoded.wordpress.com&amp;blog=5375286&amp;post=40&amp;subd=cpluspluscoded&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cpluspluscoded.wordpress.com/2011/04/04/day-14-prog-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5738132065e1f6f280b73f17ee569063?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cpluspluscoded</media:title>
		</media:content>
	</item>
		<item>
		<title>day ten assignment 2</title>
		<link>http://cpluspluscoded.wordpress.com/2011/03/28/day-ten-assignment-2/</link>
		<comments>http://cpluspluscoded.wordpress.com/2011/03/28/day-ten-assignment-2/#comments</comments>
		<pubDate>Mon, 28 Mar 2011 16:22:48 +0000</pubDate>
		<dc:creator>cpluspluscoded</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cpluspluscoded.wordpress.com/2011/03/28/day-ten-assignment-2/</guid>
		<description><![CDATA[#include void reverse(char *); //void pal(char *, char *) int main() { char a[100], clrscr(); printf(&#8220;1st string &#8220;); gets(a); //b=a; reverse(a); //pal(b); getch(); return 0; } void reverse(char *a) { int i=0; char tmp;int l=0; while(a[i++]!=&#8221;) { l++; } &#8211;l; printf(&#8220;%d&#8221;,l); i=0; while(i&#60;=l/2) { tmp=a[i]; a[i]=a[l]; a[l]=tmp; l&#8211;; i++; } puts(a); }<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cpluspluscoded.wordpress.com&amp;blog=5375286&amp;post=39&amp;subd=cpluspluscoded&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>#include<br />
void reverse(char *);<br />
//void pal(char *, char *)<br />
int main()<br />
{<br />
 char a[100],<br />
 clrscr();<br />
 printf(&#8220;1st string &#8220;);<br />
 gets(a);<br />
 //b=a;<br />
 reverse(a);<br />
 //pal(b);<br />
 getch();<br />
 return 0;<br />
}<br />
void reverse(char *a)<br />
{<br />
 int i=0;<br />
 char tmp;int l=0;<br />
 while(a[i++]!=&#8221;)<br />
 {<br />
  l++;<br />
  }<br />
  &#8211;l;<br />
  printf(&#8220;%d&#8221;,l);<br />
  i=0;<br />
  while(i&lt;=l/2)<br />
  {<br />
   tmp=a[i];<br />
   a[i]=a[l];<br />
   a[l]=tmp;<br />
   l&#8211;;<br />
   i++;<br />
    }<br />
   puts(a);<br />
  }</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cpluspluscoded.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cpluspluscoded.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cpluspluscoded.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cpluspluscoded.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cpluspluscoded.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cpluspluscoded.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cpluspluscoded.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cpluspluscoded.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cpluspluscoded.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cpluspluscoded.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cpluspluscoded.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cpluspluscoded.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cpluspluscoded.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cpluspluscoded.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cpluspluscoded.wordpress.com&amp;blog=5375286&amp;post=39&amp;subd=cpluspluscoded&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cpluspluscoded.wordpress.com/2011/03/28/day-ten-assignment-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5738132065e1f6f280b73f17ee569063?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cpluspluscoded</media:title>
		</media:content>
	</item>
		<item>
		<title>day ten lab assignment 1</title>
		<link>http://cpluspluscoded.wordpress.com/2011/03/28/day-ten-lab-assignment-1/</link>
		<comments>http://cpluspluscoded.wordpress.com/2011/03/28/day-ten-lab-assignment-1/#comments</comments>
		<pubDate>Mon, 28 Mar 2011 16:21:19 +0000</pubDate>
		<dc:creator>cpluspluscoded</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cpluspluscoded.wordpress.com/2011/03/28/day-ten-lab-assignment-1/</guid>
		<description><![CDATA[#include int comp(char *,char *); void concat(char *,char *); int main() { char a[100],b[100]; int al=999; clrscr(); printf(&#8220;Enter 1st string &#8220;); gets(a); printf(&#8220;2nd string &#8220;); gets(b); al=comp(a,b); printf(&#8220;%d&#8221;,al); concat(a,b); getch(); return 0; } int comp(char *a , char *b) { int i=0; int chaar=0; while((a[i]!=&#8221;) &#124;&#124; (b[i]!=&#8221;)) { if(a[i]!=b[i]) { if((a[i]-b[i])&#62;0) return 1; else return [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cpluspluscoded.wordpress.com&amp;blog=5375286&amp;post=38&amp;subd=cpluspluscoded&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>#include<br />
int comp(char *,char *);<br />
void concat(char *,char *);<br />
int main()<br />
{<br />
 char a[100],b[100];<br />
 int al=999;<br />
 clrscr();<br />
 printf(&#8220;Enter 1st string &#8220;);<br />
 gets(a);<br />
 printf(&#8220;2nd string &#8220;);<br />
 gets(b);<br />
 al=comp(a,b);<br />
 printf(&#8220;%d&#8221;,al);<br />
 concat(a,b);<br />
 getch();<br />
 return 0;<br />
 }</p>
<p> int comp(char *a , char *b)<br />
 {<br />
  int i=0; int chaar=0;<br />
 while((a[i]!=&#8221;) || (b[i]!=&#8221;))<br />
 {<br />
  if(a[i]!=b[i])<br />
  {<br />
   if((a[i]-b[i])&gt;0)<br />
	 return 1;</p>
<p>   else</p>
<p>     return -1;<br />
     chaar=1;</p>
<p>  }<br />
  i++;<br />
  }<br />
   if(chaar==0)<br />
   {<br />
    return 0;<br />
   }</p>
<p> }</p>
<p> void concat(char *a,char *b)<br />
 {<br />
  int i=0,k=0;<br />
  while(k&gt;=0)<br />
  {</p>
<p>   if(a[i++]==&#8221;)<br />
   {<br />
    &#8211;i;<br />
    while(b[k]!=&#8221;)<br />
    {<br />
    a[i++]=b[k++];<br />
    }<br />
    a[i]=&#8221;;<br />
    k=-1;<br />
    }<br />
   }<br />
   printf(&#8220;\n\n&#8221;);<br />
   puts(a);<br />
   }</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cpluspluscoded.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cpluspluscoded.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cpluspluscoded.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cpluspluscoded.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cpluspluscoded.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cpluspluscoded.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cpluspluscoded.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cpluspluscoded.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cpluspluscoded.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cpluspluscoded.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cpluspluscoded.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cpluspluscoded.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cpluspluscoded.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cpluspluscoded.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cpluspluscoded.wordpress.com&amp;blog=5375286&amp;post=38&amp;subd=cpluspluscoded&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cpluspluscoded.wordpress.com/2011/03/28/day-ten-lab-assignment-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5738132065e1f6f280b73f17ee569063?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cpluspluscoded</media:title>
		</media:content>
	</item>
		<item>
		<title>Permutation and combination</title>
		<link>http://cpluspluscoded.wordpress.com/2008/12/23/permutation-and-combination/</link>
		<comments>http://cpluspluscoded.wordpress.com/2008/12/23/permutation-and-combination/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 08:30:08 +0000</pubDate>
		<dc:creator>cpluspluscoded</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cpluspluscoded.wordpress.com/?p=36</guid>
		<description><![CDATA[#include&#60;iostream.h&#62; #include&#60;conio.h&#62; void main() { void permute(int [], int, int); void print(int[],int); clrscr(); int v[4]={1,2,3,4}; permute(v,0,4); getch(); } void print(int v[], int size) { for(int i=0;i&#60;size;i++) { cout&#60;&#60;v[i]; } cout&#60;&#60;&#8221;\n&#8221;; }// end of print void permute(int v[], int start, int n) { if(start == (n-1)) { print(v,n); } else { for(int i=start;i&#60;n;i++) { int tmp=v[i]; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cpluspluscoded.wordpress.com&amp;blog=5375286&amp;post=36&amp;subd=cpluspluscoded&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>#include&lt;iostream.h&gt;<br />
#include&lt;conio.h&gt;<br />
void main()<br />
{<br />
void permute(int [], int, int);<br />
void print(int[],int);<br />
clrscr();<br />
int v[4]={1,2,3,4};<br />
permute(v,0,4);<br />
getch();<br />
}</p>
<p>void print(int v[], int size)<br />
{</p>
<p>for(int i=0;i&lt;size;i++)<br />
{<br />
cout&lt;&lt;v[i];<br />
}<br />
cout&lt;&lt;&#8221;\n&#8221;;<br />
}// end of print</p>
<p>void permute(int v[], int start, int n)<br />
{<br />
if(start == (n-1))<br />
{<br />
print(v,n);<br />
}</p>
<p>else<br />
{<br />
for(int i=start;i&lt;n;i++)<br />
{<br />
int tmp=v[i];<br />
v[i]=v[start];<br />
v[start]=tmp;<br />
permute(v,(start+1),n);<br />
v[start]=v[i];<br />
v[i]=tmp;<br />
}</p>
<p>}<br />
}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cpluspluscoded.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cpluspluscoded.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cpluspluscoded.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cpluspluscoded.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cpluspluscoded.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cpluspluscoded.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cpluspluscoded.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cpluspluscoded.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cpluspluscoded.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cpluspluscoded.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cpluspluscoded.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cpluspluscoded.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cpluspluscoded.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cpluspluscoded.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cpluspluscoded.wordpress.com&amp;blog=5375286&amp;post=36&amp;subd=cpluspluscoded&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cpluspluscoded.wordpress.com/2008/12/23/permutation-and-combination/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5738132065e1f6f280b73f17ee569063?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cpluspluscoded</media:title>
		</media:content>
	</item>
		<item>
		<title>File Programs</title>
		<link>http://cpluspluscoded.wordpress.com/2008/12/12/file-programs/</link>
		<comments>http://cpluspluscoded.wordpress.com/2008/12/12/file-programs/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 05:33:00 +0000</pubDate>
		<dc:creator>cpluspluscoded</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[File prgrams]]></category>

		<guid isPermaLink="false">http://cpluspluscoded.wordpress.com/?p=33</guid>
		<description><![CDATA[This contains two programs related to the application of file. CLICK HERE TO DOWNLOAD<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cpluspluscoded.wordpress.com&amp;blog=5375286&amp;post=33&amp;subd=cpluspluscoded&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>This contains two programs related to the application of file.</strong></p>
<p><a href="http://www.2shared.com/file/4441531/53eb3939/file_pro.html">CLICK HERE TO DOWNLOAD</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cpluspluscoded.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cpluspluscoded.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cpluspluscoded.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cpluspluscoded.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cpluspluscoded.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cpluspluscoded.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cpluspluscoded.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cpluspluscoded.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cpluspluscoded.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cpluspluscoded.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cpluspluscoded.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cpluspluscoded.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cpluspluscoded.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cpluspluscoded.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cpluspluscoded.wordpress.com&amp;blog=5375286&amp;post=33&amp;subd=cpluspluscoded&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cpluspluscoded.wordpress.com/2008/12/12/file-programs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5738132065e1f6f280b73f17ee569063?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cpluspluscoded</media:title>
		</media:content>
	</item>
		<item>
		<title>House Program</title>
		<link>http://cpluspluscoded.wordpress.com/2008/12/09/house-program/</link>
		<comments>http://cpluspluscoded.wordpress.com/2008/12/09/house-program/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 06:27:30 +0000</pubDate>
		<dc:creator>cpluspluscoded</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[house]]></category>

		<guid isPermaLink="false">http://cpluspluscoded.wordpress.com/2008/12/09/house-program/</guid>
		<description><![CDATA[A program to calculate the number of students belonging to a particular house. Implementation of structure. include //header files #include //header files #include //header fles #include //header files struct clss { int clas; //structure to store class name }; //end of structure struct student {clss sec; //structure to store name,roll, house of student char name[50]; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cpluspluscoded.wordpress.com&amp;blog=5375286&amp;post=32&amp;subd=cpluspluscoded&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A program to calculate the number of students belonging to a particular house. Implementation of structure.</p>
<p>include     //header files<br />
#include       //header files<br />
#include       //header fles<br />
#include        //header files<br />
struct clss<br />
{ int clas;                      //structure to store class name<br />
};    //end of structure                                                                          </p>
<p>struct student<br />
{clss sec;                       //structure  to store name,roll, house of student<br />
char name[50];<br />
int roll;<br />
char house[10];<br />
};  //end of structure </p>
<p>void main()<br />
{cout&lt;&gt;o;    //entering the number of students<br />
student stu['o'];    //declaring the structure variable<br />
clrscr();<br />
int s=0,in=0,as=0,en=0;    //initializing of variables<br />
for(int i=0;i&lt;o;i++)<br />
{cout&lt;&lt;&#8221;enter your name::&#8221;;<br />
gets(stu[i].name);       //entering name<br />
cout&lt;&gt;stu[i].roll;       //entering roll number<br />
cout&lt;&lt;&#8221;enter your house::&#8221;;<br />
gets(stu[i].house);      //entering house name<br />
if(strcmp(stu[i].house,”symphony”)==0)<br />
{s++;<br />
}    //incrementing the counter if the house is symphony                                                                           </p>
<p>else<br />
if(strcmp(stu[i].house,”invocation”)==0)<br />
{in++;<br />
}    //incrementing the counter if the house is invocation<br />
else<br />
if(strcmp(stu[i].house,”aspiration”)==0&#8242;)<br />
{as++;       //incrementing the counter if the house is aspiration<br />
}<br />
else<br />
{en++;    //incrementing the counter if the house is enterprise<br />
}<br />
cout&lt;&gt;stu[i].sec.clas;    //entering the class of student<br />
}<br />
for(int j=0;j&lt;o;j++)<br />
{puts(stu[j].name);      //printing the name of student<br />
cout&lt;&lt;stu[j].roll&lt;&lt;endl;       //printing the roll of student<br />
puts(stu[j].house);                  //printing the house of the student<br />
cout&lt;&lt; “class::&#8221;&lt;&lt;stu[j].sec.clas&lt;&lt;;    //printing the classs of the student<br />
}<br />
cout&lt;&lt;&#8221; the number of students belonging to aspiration::&#8221;&lt;&lt;as&lt;&lt;endl;<br />
cout&lt;&lt;&#8221;the number of students belonging to enterprise::&#8221;&lt;&lt;en&lt;&lt;endl;         //printing the number of students                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         belonging to each house<br />
cout&lt;&lt;&#8221;the number of students belonging to invocation::&#8221;&lt;&lt;in&lt;&lt;endl;<br />
cout&lt;&lt;&#8221;the number of students belonging to symphony::&#8221;&lt;&lt;s;                  </p>
<p>getch();<br />
}                             //end of program                                                                         </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cpluspluscoded.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cpluspluscoded.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cpluspluscoded.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cpluspluscoded.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cpluspluscoded.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cpluspluscoded.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cpluspluscoded.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cpluspluscoded.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cpluspluscoded.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cpluspluscoded.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cpluspluscoded.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cpluspluscoded.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cpluspluscoded.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cpluspluscoded.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cpluspluscoded.wordpress.com&amp;blog=5375286&amp;post=32&amp;subd=cpluspluscoded&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cpluspluscoded.wordpress.com/2008/12/09/house-program/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5738132065e1f6f280b73f17ee569063?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cpluspluscoded</media:title>
		</media:content>
	</item>
		<item>
		<title>Mics Programs</title>
		<link>http://cpluspluscoded.wordpress.com/2008/12/08/mics-programs/</link>
		<comments>http://cpluspluscoded.wordpress.com/2008/12/08/mics-programs/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 07:01:35 +0000</pubDate>
		<dc:creator>cpluspluscoded</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cpluspluscoded.wordpress.com/?p=29</guid>
		<description><![CDATA[Here are some mics programs that you can download. CLICK HERE to download them. It&#8217;s in .rar format. So you need win rar to open them.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cpluspluscoded.wordpress.com&amp;blog=5375286&amp;post=29&amp;subd=cpluspluscoded&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here are some mics programs that you can download.</p>
<p><a href="http://www.2shared.com/file/4416003/c5347ef4/programs.html" target="_blank">CLICK HERE to download them.</a></p>
<p>It&#8217;s in .rar format. So you need win rar to open them.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cpluspluscoded.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cpluspluscoded.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cpluspluscoded.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cpluspluscoded.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cpluspluscoded.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cpluspluscoded.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cpluspluscoded.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cpluspluscoded.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cpluspluscoded.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cpluspluscoded.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cpluspluscoded.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cpluspluscoded.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cpluspluscoded.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cpluspluscoded.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cpluspluscoded.wordpress.com&amp;blog=5375286&amp;post=29&amp;subd=cpluspluscoded&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cpluspluscoded.wordpress.com/2008/12/08/mics-programs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5738132065e1f6f280b73f17ee569063?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cpluspluscoded</media:title>
		</media:content>
	</item>
		<item>
		<title>Circular queue</title>
		<link>http://cpluspluscoded.wordpress.com/2008/12/04/circular-queue/</link>
		<comments>http://cpluspluscoded.wordpress.com/2008/12/04/circular-queue/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 18:30:09 +0000</pubDate>
		<dc:creator>cpluspluscoded</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cpluspluscoded.wordpress.com/?p=27</guid>
		<description><![CDATA[/* circular queue program using pointer*/ /* every case is tested and shown in program*/ #include&#60;iostream&#62; using namespace std; struct node { int data; node *link; }; class cirque { private : Node *front,*rear; int count; public:   cirque(); void push(int n); void pop(); void display(); ~cirque(); }; cirque::cirque() { front=rear=NULL; count=0; } void cirque::push(int n) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cpluspluscoded.wordpress.com&amp;blog=5375286&amp;post=27&amp;subd=cpluspluscoded&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>/* circular queue program using pointer*/<br />
/* every case is tested and shown in program*/<br />
#include&lt;iostream&gt;<br />
using namespace std;<br />
struct node<br />
{<br />
int data;<br />
node *link;<br />
};<br />
class cirque<br />
{<br />
private : Node *front,*rear;<br />
int count;<br />
public:   cirque();<br />
void push(int n);<br />
void pop();<br />
void display();<br />
~cirque();<br />
};<br />
cirque::cirque()<br />
{<br />
front=rear=NULL;<br />
count=0;<br />
}<br />
void cirque::push(int n)<br />
{<br />
node *temp;<br />
temp=new node;<br />
if(temp==NULL)<br />
{<br />
cout&lt;&lt;&#8221;memory is less&#8221;;<br />
return;<br />
}<br />
temp-&gt;data=n;<br />
if(front==NULL)<br />
{<br />
front=rear=temp;<br />
}<br />
else<br />
{<br />
rear-&gt;link=temp;<br />
rear=rear-&gt;link;<br />
}<br />
rear-&gt;link=front;<br />
count++;</p>
<p>}<br />
void cirque::pop()<br />
{<br />
if(front==NULL)<br />
{<br />
cout&lt;&lt;&#8221;ciccular queue is empty&#8221;;<br />
return;<br />
}<br />
node *temp;<br />
temp=front;<br />
cout&lt;&lt;endl&lt;&lt;&#8221;deleted item is&#8221;&lt;&lt;front-&gt;data;<br />
if(count&gt;0)<br />
front=temp-&gt;link;<br />
rear-&gt;link=front;<br />
count&#8211;;<br />
delete temp;<br />
}<br />
void cirque::display()<br />
{<br />
if(front==NULL)<br />
{<br />
cout&lt;&lt;endl&lt;&lt;&#8221;queue is empty&#8221;;<br />
return;<br />
}<br />
int local = count;<br />
node *temp;<br />
temp=front;<br />
cout&lt;&lt;endl&lt;&lt;&#8221;queue elements are &#8220;;<br />
while(local)<br />
{<br />
cout&lt;&lt;&#8221; &#8220;&lt;&lt;temp-&gt;data;<br />
temp=temp-&gt;link;<br />
local&#8211;;<br />
}<br />
}<br />
cirque::~cirque()<br />
{<br />
if(front==NULL)<br />
{<br />
cout&lt;&lt;endl&lt;&lt;&#8221;no memory used&#8221;;<br />
return;<br />
}<br />
node *temp;<br />
int n=0;<br />
while(front-&gt;link!=rear-&gt;link)<br />
{<br />
temp=front;<br />
front=front-&gt;link;<br />
delete temp;<br />
cout&lt;&lt;endl&lt;&lt;++n&lt;&lt;&#8221; &#8220;&lt;&lt;&#8221;deleted &#8220;;<br />
}<br />
}<br />
int main()<br />
{<br />
cirque q;<br />
q.push(1);<br />
q.display();<br />
q.push(2);<br />
q.display();<br />
q.push(3);<br />
q.display();<br />
q.push(4);<br />
q.display();<br />
q.pop();<br />
q.pop();<br />
return 0;<br />
}</p>
<p>/*second program using array*/<br />
#include&lt;iostream&gt;<br />
using namespace std;<br />
#define MAX 7  /*for array size*/<br />
class cirq<br />
{<br />
private:int arr[MAX];<br />
int front,rear,count;  /*count to know the no of ele. Present in array.*/<br />
public:<br />
cirq();<br />
void push(int n);<br />
void pop();<br />
void display();<br />
~cirq();<br />
};<br />
cirq::cirq()<br />
{<br />
front = rear =-1;<br />
count=0;<br />
}<br />
void cirq:: Push(int n)<br />
{<br />
if(count&lt;MAX)<br />
{<br />
if(front ==-1)<br />
{<br />
front=rear=0;<br />
}<br />
else if(rear==MAX-1)  /* if rear is at maximum position then bring it in starting*/<br />
rear=0;<br />
else<br />
rear++;<br />
arr[rear]=n;<br />
count++;<br />
}<br />
else<br />
{<br />
cout&lt;&lt;endl&lt;&lt;&#8221;queue is full don&#8217;t enter now&#8221;;<br />
}<br />
}<br />
void cirq::pop()<br />
{<br />
if(count&gt;0)<br />
{<br />
cout&lt;&lt;endl&lt;&lt;&#8221;deleted item is&#8221;&lt;&lt;arr[front];<br />
if(front==MAX-1)  /* if front is at maximum position then bring it in starting*/<br />
front=0;<br />
else<br />
front++;<br />
count&#8211;;<br />
}<br />
else<br />
cout&lt;&lt;endl&lt;&lt;&#8221;circular queue is empty&#8221;;<br />
}<br />
void cirq::display()<br />
{<br />
int local = count;<br />
int front1=front;<br />
if(local&lt;0)    /*if there is no element in quque*/<br />
{<br />
cout&lt;&lt;endl&lt;&lt;&#8221;circular queue is empty&#8221;;<br />
}<br />
else<br />
{<br />
cout&lt;&lt;endl&lt;&lt;&#8221;circular queue elements are: &#8220;;<br />
while(local)<br />
{<br />
cout&lt;&lt;endl&lt;&lt;arr[front1];<br />
if(front1==MAX-1)   /* if front is at maximum position then bring it in starting*/<br />
front1=0;<br />
else<br />
front1++;<br />
local&#8211;;<br />
}<br />
}<br />
}<br />
cirq::~cirq()<br />
{<br />
}<br />
int main()<br />
{<br />
cirq q;<br />
q.push(1);<br />
q.push(2);<br />
q.push(3);<br />
q.push(4);<br />
q.push(5);<br />
q.push(6);<br />
q.push(7);<br />
q.display();<br />
q.pop();<br />
q.display();<br />
q.push(8);<br />
q.display();<br />
q.push(9);<br />
q.display();<br />
return 0;<br />
}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cpluspluscoded.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cpluspluscoded.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cpluspluscoded.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cpluspluscoded.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cpluspluscoded.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cpluspluscoded.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cpluspluscoded.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cpluspluscoded.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cpluspluscoded.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cpluspluscoded.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cpluspluscoded.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cpluspluscoded.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cpluspluscoded.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cpluspluscoded.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cpluspluscoded.wordpress.com&amp;blog=5375286&amp;post=27&amp;subd=cpluspluscoded&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cpluspluscoded.wordpress.com/2008/12/04/circular-queue/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5738132065e1f6f280b73f17ee569063?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cpluspluscoded</media:title>
		</media:content>
	</item>
	</channel>
</rss>
