<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'bubble sort' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'bubble sort' posted on the 'Beginner C/C++' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2012 Programmers Heaven</copyright>
    <pubDate>Thu, 09 Feb 2012 09:38:26 -0800</pubDate>
    <lastBuildDate>Thu, 09 Feb 2012 09:38:26 -0800</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>bubble sort</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/409762/409762/bubble-sort/</link>
      <description>when I perform the bubble sort in my program, the first number I input changes to "1". I don't know why. ???&lt;br /&gt;
&lt;br /&gt;
Please help. Thanks! &lt;br /&gt;
Here's my code for the bubble sort.&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
bubblesort(int index, int* a){

	int x;
	int y;
	int n = index + 1;
	int temp;
	
	
	view(index, a);
		for( x = 0; x &amp;lt; n; x++){
			for(y = 0; y &amp;lt; n - 1; y++){
					
					if(a[y] &amp;gt; a[y+1]){
						temp = a[y+1];
						a[y+1] = a[y];
						a[y] = temp;
					}
			}
		}
	view(index, a);
}&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/409762/409762/bubble-sort/</guid>
      <pubDate>Mon, 23 Nov 2009 02:58:50 -0800</pubDate>
      <category>Beginner C/C++</category>
    </item>
  </channel>
</rss>
