<?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>bugs of a debugger &#187; Programming</title>
	<atom:link href="http://arunmvishnu.com/category/programming/feed" rel="self" type="application/rss+xml" />
	<link>http://arunmvishnu.com</link>
	<description>itz all about me, my works, my views, my feelings …. all my bla bla blas</description>
	<lastBuildDate>Thu, 09 Sep 2010 09:55:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Computer Hardware Chart</title>
		<link>http://arunmvishnu.com/programming/hardware-programming/computer-hardware-chart.html</link>
		<comments>http://arunmvishnu.com/programming/hardware-programming/computer-hardware-chart.html#comments</comments>
		<pubDate>Mon, 20 Jul 2009 17:08:59 +0000</pubDate>
		<dc:creator>Arun Vishnu</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[chart]]></category>
		<category><![CDATA[computer]]></category>
		<category><![CDATA[hardware]]></category>

		<guid isPermaLink="false">http://arunmvishnu.com/programming/hardware-programming/computer-hardware-chart.html</guid>
		<description><![CDATA[





		
			Promote this on Orkut
		
		
			Share this on Facebook
		
		
			Digg this!
		
		
			Share this on del.icio.us
		
		
			Tweet This!
		
		
			Share this on Reddit
		
		
			Buzz up!
		
		
			Stumble upon something good? Share it on StumbleUpon
		
		
			Share this on Technorati
		
		
			Post this to MySpace
		
		
			Subscribe to the comments for this post?
		
		
			Share this on Linkedin
		
		
			Add this to Google Bookmarks
		
		
			Share this on FriendFeed
		
		
			Submit this to Hacker News
		
		
			Share this on Wikio
		
		
			Submit this to SlashDot
		
		
			Blog [...]


Related posts:<ol><li><a href='http://arunmvishnu.com/fun/when-i-was-young.html' rel='bookmark' title='Permanent Link: When i was young'>When i was young</a> <small>When I was small I was very mischievous ! I...</small></li>
<li><a href='http://arunmvishnu.com/miscellaneous/lifestream/weekly-digest-for-december-10th.html' rel='bookmark' title='Permanent Link: Weekly Digest for December 10th'>Weekly Digest for December 10th</a> <small> Download Microsoft Project Professional 2010 Beta : http://technet.microsoft.com/hi-in/evalcenter/ee404758(en-us).aspx [#]...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://arunmvishnu.com/home/wp-content/uploads/2009/07/Computer_hardware_poster_full.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Computer_hardware_poster" src="http://arunmvishnu.com/home/wp-content/uploads/2009/07/Computer_hardware_poster_thumb.png" border="0" alt="Computer_hardware_poster" width="365" height="504" /></a></p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-orkut">
			<a href="http://promote.orkut.com/preview?nt=orkut.com&amp;tt=Computer+Hardware+Chart&amp;du=http://arunmvishnu.com/programming/hardware-programming/computer-hardware-chart.html&amp;cn=" rel="nofollow" title="Promote this on Orkut">Promote this on Orkut</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://arunmvishnu.com/programming/hardware-programming/computer-hardware-chart.html&amp;t=Computer+Hardware+Chart" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://arunmvishnu.com/programming/hardware-programming/computer-hardware-chart.html&amp;title=Computer+Hardware+Chart" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://arunmvishnu.com/programming/hardware-programming/computer-hardware-chart.html&amp;title=Computer+Hardware+Chart" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Computer+Hardware+Chart+-+http://arunmvishnu.com/programming/hardware-programming/computer-hardware-chart.html+(via+@arunmvishnu)" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://arunmvishnu.com/programming/hardware-programming/computer-hardware-chart.html&amp;title=Computer+Hardware+Chart" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-yahoobuzz">
			<a href="http://buzz.yahoo.com/submit/?submitUrl=http://arunmvishnu.com/programming/hardware-programming/computer-hardware-chart.html&amp;submitHeadline=Computer+Hardware+Chart&amp;submitSummary=&amp;submitCategory=science&amp;submitAssetType=image" rel="nofollow" title="Buzz up!">Buzz up!</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://arunmvishnu.com/programming/hardware-programming/computer-hardware-chart.html&amp;title=Computer+Hardware+Chart" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://arunmvishnu.com/programming/hardware-programming/computer-hardware-chart.html" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-myspace">
			<a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://arunmvishnu.com/programming/hardware-programming/computer-hardware-chart.html&amp;t=Computer+Hardware+Chart" rel="nofollow" title="Post this to MySpace">Post this to MySpace</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://arunmvishnu.com/programming/hardware-programming/computer-hardware-chart.html/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://arunmvishnu.com/programming/hardware-programming/computer-hardware-chart.html&amp;title=Computer+Hardware+Chart&amp;summary=&amp;source=bugs of a debugger" rel="nofollow" title="Share this on Linkedin">Share this on Linkedin</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://arunmvishnu.com/programming/hardware-programming/computer-hardware-chart.html&amp;title=Computer+Hardware+Chart" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-friendfeed">
			<a href="http://www.friendfeed.com/share?title=Computer+Hardware+Chart&amp;link=http://arunmvishnu.com/programming/hardware-programming/computer-hardware-chart.html" rel="nofollow" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
		<li class="sexy-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://arunmvishnu.com/programming/hardware-programming/computer-hardware-chart.html&amp;t=Computer+Hardware+Chart" rel="nofollow" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="sexy-wikio">
			<a href="http://www.wikio.com/sharethis?url=http://arunmvishnu.com/programming/hardware-programming/computer-hardware-chart.html&amp;title=Computer+Hardware+Chart" rel="nofollow" title="Share this on Wikio">Share this on Wikio</a>
		</li>
		<li class="sexy-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://arunmvishnu.com/programming/hardware-programming/computer-hardware-chart.html&amp;title=Computer+Hardware+Chart" rel="nofollow" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://arunmvishnu.com/programming/hardware-programming/computer-hardware-chart.html&amp;n=Computer+Hardware+Chart&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Farunmvishnu.com%2Fprogramming%2Fhardware-programming%2Fcomputer-hardware-chart.html&amp;linkname=Computer%20Hardware%20Chart"><img src="http://arunmvishnu.com/home/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>

<p>Related posts:<ol><li><a href='http://arunmvishnu.com/fun/when-i-was-young.html' rel='bookmark' title='Permanent Link: When i was young'>When i was young</a> <small>When I was small I was very mischievous ! I...</small></li>
<li><a href='http://arunmvishnu.com/miscellaneous/lifestream/weekly-digest-for-december-10th.html' rel='bookmark' title='Permanent Link: Weekly Digest for December 10th'>Weekly Digest for December 10th</a> <small> Download Microsoft Project Professional 2010 Beta : http://technet.microsoft.com/hi-in/evalcenter/ee404758(en-us).aspx [#]...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://arunmvishnu.com/programming/hardware-programming/computer-hardware-chart.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Font resizing using jQuery</title>
		<link>http://arunmvishnu.com/programming/javascript/font-resizing-using-jquery.html</link>
		<comments>http://arunmvishnu.com/programming/javascript/font-resizing-using-jquery.html#comments</comments>
		<pubDate>Wed, 15 Apr 2009 17:46:30 +0000</pubDate>
		<dc:creator>Arun Vishnu</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[java script]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://arunmvishnu.com/?p=552</guid>
		<description><![CDATA[Font Resizing is a very common feature in many modern websites. This can be done very easily with jQuery. The following script uses cookies to save the user preference, so the user preference is saved. jQuery Cookie plugin is used for managing cookie using jQuery. So include that too.
the html for increase, decrease links

&#60;div&#62;
	&#60;a href=&#34;javascript:void [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Font Resizing is a very common feature in many modern websites. This can be done very easily with <a href="http://jquery.com/">jQuery</a>. The following script uses cookies to save the user preference, so the user preference is saved. <a href="http://plugins.jquery.com/project/cookie">jQuery Cookie plugin</a> is used for managing cookie using jQuery. So include that too.</p>
<p>the html for increase, decrease links</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;javascript:void decreaseFont();&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;font-smaller&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Reduce font size&quot;</span>&gt;</span>-<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;javascript:void normalFont();&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;font-normal&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Normal font size&quot;</span>&gt;</span>0<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span> 
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;javascript:void increaseFont();&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;font-bigger&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Increase font size&quot;</span>&gt;</span>+<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<p>Add the following code just before the </body> tag.
<p>
<span id="more-552"></span></p>
<pre name="code" class="javascript">
<script type="text/javascript">
/*
Managing font
Author: Arun Vishnu

http://arunmvishnu.com/

*/
// Set the font sie during page load. Check cookie for stored font size
function currFontSize(){
	var crntFnt = $.cookie('userFontSize');
	if(crntFnt != null) {
		crntFnt = parseFloat(crntFnt, 10);
		$('html').css('font-size', crntFnt);
	}
	return false;
}
// normal font
function normalFont(){
	var domain = document.domain;
	$('html').css('font-size', 13);
	$.cookie('userFontSize', 13, { expires: 7, path: '/', domain: domain });
	return false;
}
// Increase font
function increaseFont(){
	var currentFontSize = $('html').css('font-size');
	var domain = document.domain;
    var currentFontSizeNum = parseFloat(currentFontSize, 10);
    var newFontSize = currentFontSizeNum*1.2;
    if(newFontSize<17){
    	$.cookie('userFontSize', newFontSize, { expires: 7, path: '/', domain: domain });
    	$('html').css('font-size', newFontSize);
    }
    return false;
}
// Decrease font
function decreaseFont(){
	var currentFontSize = $('html').css('font-size');
	var domain = document.domain;
    var currentFontSizeNum = parseFloat(currentFontSize, 10);
    var newFontSize = currentFontSizeNum*.8;
    if(newFontSize>8){
    	$.cookie('userFontSize', newFontSize, { expires: 7, path: '/', domain: domain });
    	$('html').css('font-size', newFontSize);
    }
    return false;
}
// End of Managing font
</script>
</pre>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-orkut">
			<a href="http://promote.orkut.com/preview?nt=orkut.com&amp;tt=Font+resizing+using+jQuery&amp;du=http://arunmvishnu.com/programming/javascript/font-resizing-using-jquery.html&amp;cn=Font%20Resizing%20is%20a%20very%20common%20feature%20in%20many%20modern%20websites.%20This%20can%20be%20done%20very%20easily%20with%20jQuery.%20The%20following%20script%20uses%20cookies%20to%20save%20the%20user%20preference%2C%20so%20the%20user%20preference%20is%20saved.%20jQuery%20Cookie%20plugin%20is%20used%20for%20managing%20cookie%20using%20jQuery.%20So%20include%20that%20too.%0D%0Athe%20html%20for%20" rel="nofollow" title="Promote this on Orkut">Promote this on Orkut</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://arunmvishnu.com/programming/javascript/font-resizing-using-jquery.html&amp;t=Font+resizing+using+jQuery" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://arunmvishnu.com/programming/javascript/font-resizing-using-jquery.html&amp;title=Font+resizing+using+jQuery" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://arunmvishnu.com/programming/javascript/font-resizing-using-jquery.html&amp;title=Font+resizing+using+jQuery" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Font+resizing+using+jQuery+-+http://arunmvishnu.com/programming/javascript/font-resizing-using-jquery.html+(via+@arunmvishnu)" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://arunmvishnu.com/programming/javascript/font-resizing-using-jquery.html&amp;title=Font+resizing+using+jQuery" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-yahoobuzz">
			<a href="http://buzz.yahoo.com/submit/?submitUrl=http://arunmvishnu.com/programming/javascript/font-resizing-using-jquery.html&amp;submitHeadline=Font+resizing+using+jQuery&amp;submitSummary=Font%20Resizing%20is%20a%20very%20common%20feature%20in%20many%20modern%20websites.%20This%20can%20be%20done%20very%20easily%20with%20jQuery.%20The%20following%20script%20uses%20cookies%20to%20save%20the%20user%20preference%2C%20so%20the%20user%20preference%20is%20saved.%20jQuery%20Cookie%20plugin%20is%20used%20for%20managing%20cookie%20using%20jQuery.%20So%20include%20that%20too.%0D%0Athe%20html%20for%20&amp;submitCategory=science&amp;submitAssetType=image" rel="nofollow" title="Buzz up!">Buzz up!</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://arunmvishnu.com/programming/javascript/font-resizing-using-jquery.html&amp;title=Font+resizing+using+jQuery" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://arunmvishnu.com/programming/javascript/font-resizing-using-jquery.html" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-myspace">
			<a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://arunmvishnu.com/programming/javascript/font-resizing-using-jquery.html&amp;t=Font+resizing+using+jQuery" rel="nofollow" title="Post this to MySpace">Post this to MySpace</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://arunmvishnu.com/programming/javascript/font-resizing-using-jquery.html/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://arunmvishnu.com/programming/javascript/font-resizing-using-jquery.html&amp;title=Font+resizing+using+jQuery&amp;summary=Font%20Resizing%20is%20a%20very%20common%20feature%20in%20many%20modern%20websites.%20This%20can%20be%20done%20very%20easily%20with%20jQuery.%20The%20following%20script%20uses%20cookies%20to%20save%20the%20user%20preference%2C%20so%20the%20user%20preference%20is%20saved.%20jQuery%20Cookie%20plugin%20is%20used%20for%20managing%20cookie%20using%20jQuery.%20So%20include%20that%20too.%0D%0Athe%20html%20for%20&amp;source=bugs of a debugger" rel="nofollow" title="Share this on Linkedin">Share this on Linkedin</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://arunmvishnu.com/programming/javascript/font-resizing-using-jquery.html&amp;title=Font+resizing+using+jQuery" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-friendfeed">
			<a href="http://www.friendfeed.com/share?title=Font+resizing+using+jQuery&amp;link=http://arunmvishnu.com/programming/javascript/font-resizing-using-jquery.html" rel="nofollow" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
		<li class="sexy-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://arunmvishnu.com/programming/javascript/font-resizing-using-jquery.html&amp;t=Font+resizing+using+jQuery" rel="nofollow" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="sexy-wikio">
			<a href="http://www.wikio.com/sharethis?url=http://arunmvishnu.com/programming/javascript/font-resizing-using-jquery.html&amp;title=Font+resizing+using+jQuery" rel="nofollow" title="Share this on Wikio">Share this on Wikio</a>
		</li>
		<li class="sexy-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://arunmvishnu.com/programming/javascript/font-resizing-using-jquery.html&amp;title=Font+resizing+using+jQuery" rel="nofollow" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://arunmvishnu.com/programming/javascript/font-resizing-using-jquery.html&amp;n=Font+resizing+using+jQuery&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Farunmvishnu.com%2Fprogramming%2Fjavascript%2Ffont-resizing-using-jquery.html&amp;linkname=Font%20resizing%20using%20jQuery"><img src="http://arunmvishnu.com/home/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://arunmvishnu.com/programming/javascript/font-resizing-using-jquery.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable right-click contextual menu</title>
		<link>http://arunmvishnu.com/programming/javascript/disable-right-click-contextual-menu.html</link>
		<comments>http://arunmvishnu.com/programming/javascript/disable-right-click-contextual-menu.html#comments</comments>
		<pubDate>Mon, 16 Mar 2009 09:44:36 +0000</pubDate>
		<dc:creator>Arun Vishnu</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[java script]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://arunmvishnu.com/?p=545</guid>
		<description><![CDATA[You can disable right-click contextual menu in your website using jQuery. Download and include jQuery library in your page and add the following code before the  tag.



$(document).ready(function(){
    $(document).bind("contextmenu",function(e){
        return false;
    });
});


Thatz it  





		
			Promote this on Orkut
		
		
			Share this on Facebook
		
		
			Digg this!
		
		
			Share [...]


Related posts:<ol><li><a href='http://arunmvishnu.com/miscellaneous/lifestream/weekly-digest-for-february-18th.html' rel='bookmark' title='Permanent Link: Weekly Digest for February 18th'>Weekly Digest for February 18th</a> <small> RT @praveen_v: http://bit.ly/b1gC5A &#8211; developed my first jquery plugin,...</small></li>
<li><a href='http://arunmvishnu.com/miscellaneous/lifestream/weekly-digest-for-december-17th.html' rel='bookmark' title='Permanent Link: Weekly Digest for December 17th'>Weekly Digest for December 17th</a> <small> After 10 years AOL is now officially independent from...</small></li>
<li><a href='http://arunmvishnu.com/miscellaneous/lifestream/weekly-digest-for-november-26th.html' rel='bookmark' title='Permanent Link: Weekly Digest for November 26th'>Weekly Digest for November 26th</a> <small> Didn&#8217;t get time to read any tweets till now..what...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>You can disable right-click contextual menu in your website using jQuery. Download and include jQuery library in your page and add the following code before the </body> tag.<br />
<span id="more-545"></span></p>
<pre name="code" class="javascript">
<script language="javascript" type="text/javascript">
$(document).ready(function(){
    $(document).bind("contextmenu",function(e){
        return false;
    });
});
</script>
</pre>
<p>Thatz it <img src='http://arunmvishnu.com/home/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-orkut">
			<a href="http://promote.orkut.com/preview?nt=orkut.com&amp;tt=Disable+right-click+contextual+menu&amp;du=http://arunmvishnu.com/programming/javascript/disable-right-click-contextual-menu.html&amp;cn=You%20can%20disable%20right-click%20contextual%20menu%20in%20your%20website%20using%20jQuery.%20Download%20and%20include%20jQuery%20library%20in%20your%20page%20and%20add%20the%20following%20code%20before%20the%20%20tag.%0D%0A%0D%0A%0D%0A%0D%0A%24%28document%29.ready%28function%28%29%7B%0D%0A%20%20%20%20%24%28document%29.bind%28%22contextmenu%22%2Cfunction%28e%29%7B%0D%0A%20%20%20%20%20%20%20%20return%20false%3B%0D%0A%20%20%20%20%7D%29%3B%0D%0A%7D%29%3B%0D%0A%0D%0A%0D%0AThatz" rel="nofollow" title="Promote this on Orkut">Promote this on Orkut</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://arunmvishnu.com/programming/javascript/disable-right-click-contextual-menu.html&amp;t=Disable+right-click+contextual+menu" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://arunmvishnu.com/programming/javascript/disable-right-click-contextual-menu.html&amp;title=Disable+right-click+contextual+menu" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://arunmvishnu.com/programming/javascript/disable-right-click-contextual-menu.html&amp;title=Disable+right-click+contextual+menu" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Disable+right-click+contextual+menu+-+http://arunmvishnu.com/programming/javascript/disable-right-click-contextual-menu.html+(via+@arunmvishnu)" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://arunmvishnu.com/programming/javascript/disable-right-click-contextual-menu.html&amp;title=Disable+right-click+contextual+menu" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-yahoobuzz">
			<a href="http://buzz.yahoo.com/submit/?submitUrl=http://arunmvishnu.com/programming/javascript/disable-right-click-contextual-menu.html&amp;submitHeadline=Disable+right-click+contextual+menu&amp;submitSummary=You%20can%20disable%20right-click%20contextual%20menu%20in%20your%20website%20using%20jQuery.%20Download%20and%20include%20jQuery%20library%20in%20your%20page%20and%20add%20the%20following%20code%20before%20the%20%20tag.%0D%0A%0D%0A%0D%0A%0D%0A%24%28document%29.ready%28function%28%29%7B%0D%0A%20%20%20%20%24%28document%29.bind%28%22contextmenu%22%2Cfunction%28e%29%7B%0D%0A%20%20%20%20%20%20%20%20return%20false%3B%0D%0A%20%20%20%20%7D%29%3B%0D%0A%7D%29%3B%0D%0A%0D%0A%0D%0AThatz&amp;submitCategory=science&amp;submitAssetType=image" rel="nofollow" title="Buzz up!">Buzz up!</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://arunmvishnu.com/programming/javascript/disable-right-click-contextual-menu.html&amp;title=Disable+right-click+contextual+menu" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://arunmvishnu.com/programming/javascript/disable-right-click-contextual-menu.html" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-myspace">
			<a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://arunmvishnu.com/programming/javascript/disable-right-click-contextual-menu.html&amp;t=Disable+right-click+contextual+menu" rel="nofollow" title="Post this to MySpace">Post this to MySpace</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://arunmvishnu.com/programming/javascript/disable-right-click-contextual-menu.html/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://arunmvishnu.com/programming/javascript/disable-right-click-contextual-menu.html&amp;title=Disable+right-click+contextual+menu&amp;summary=You%20can%20disable%20right-click%20contextual%20menu%20in%20your%20website%20using%20jQuery.%20Download%20and%20include%20jQuery%20library%20in%20your%20page%20and%20add%20the%20following%20code%20before%20the%20%20tag.%0D%0A%0D%0A%0D%0A%0D%0A%24%28document%29.ready%28function%28%29%7B%0D%0A%20%20%20%20%24%28document%29.bind%28%22contextmenu%22%2Cfunction%28e%29%7B%0D%0A%20%20%20%20%20%20%20%20return%20false%3B%0D%0A%20%20%20%20%7D%29%3B%0D%0A%7D%29%3B%0D%0A%0D%0A%0D%0AThatz&amp;source=bugs of a debugger" rel="nofollow" title="Share this on Linkedin">Share this on Linkedin</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://arunmvishnu.com/programming/javascript/disable-right-click-contextual-menu.html&amp;title=Disable+right-click+contextual+menu" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-friendfeed">
			<a href="http://www.friendfeed.com/share?title=Disable+right-click+contextual+menu&amp;link=http://arunmvishnu.com/programming/javascript/disable-right-click-contextual-menu.html" rel="nofollow" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
		<li class="sexy-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://arunmvishnu.com/programming/javascript/disable-right-click-contextual-menu.html&amp;t=Disable+right-click+contextual+menu" rel="nofollow" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="sexy-wikio">
			<a href="http://www.wikio.com/sharethis?url=http://arunmvishnu.com/programming/javascript/disable-right-click-contextual-menu.html&amp;title=Disable+right-click+contextual+menu" rel="nofollow" title="Share this on Wikio">Share this on Wikio</a>
		</li>
		<li class="sexy-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://arunmvishnu.com/programming/javascript/disable-right-click-contextual-menu.html&amp;title=Disable+right-click+contextual+menu" rel="nofollow" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://arunmvishnu.com/programming/javascript/disable-right-click-contextual-menu.html&amp;n=Disable+right-click+contextual+menu&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Farunmvishnu.com%2Fprogramming%2Fjavascript%2Fdisable-right-click-contextual-menu.html&amp;linkname=Disable%20right-click%20contextual%20menu"><img src="http://arunmvishnu.com/home/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>

<p>Related posts:<ol><li><a href='http://arunmvishnu.com/miscellaneous/lifestream/weekly-digest-for-february-18th.html' rel='bookmark' title='Permanent Link: Weekly Digest for February 18th'>Weekly Digest for February 18th</a> <small> RT @praveen_v: http://bit.ly/b1gC5A &#8211; developed my first jquery plugin,...</small></li>
<li><a href='http://arunmvishnu.com/miscellaneous/lifestream/weekly-digest-for-december-17th.html' rel='bookmark' title='Permanent Link: Weekly Digest for December 17th'>Weekly Digest for December 17th</a> <small> After 10 years AOL is now officially independent from...</small></li>
<li><a href='http://arunmvishnu.com/miscellaneous/lifestream/weekly-digest-for-november-26th.html' rel='bookmark' title='Permanent Link: Weekly Digest for November 26th'>Weekly Digest for November 26th</a> <small> Didn&#8217;t get time to read any tweets till now..what...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://arunmvishnu.com/programming/javascript/disable-right-click-contextual-menu.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C++ Program for Bubble sort</title>
		<link>http://arunmvishnu.com/programming/c-and-c/c-program-for-bubble-sort.html</link>
		<comments>http://arunmvishnu.com/programming/c-and-c/c-program-for-bubble-sort.html#comments</comments>
		<pubDate>Sat, 27 Dec 2008 19:22:12 +0000</pubDate>
		<dc:creator>Arun Vishnu</dc:creator>
				<category><![CDATA[C and C++]]></category>
		<category><![CDATA[c and cpp]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[source code]]></category>

		<guid isPermaLink="false">http://arunmvishnu.com/?p=576</guid>
		<description><![CDATA[C++ Program for Bubble sort.

/**************************************************************	
	Author: Arun Vishnu M V
	Web: www.arunmvishnu.com
	Description: C++ Program for Bubble sort
***************************************************************/
#include&#38;lt;iostream.h&#38;gt;
#include&#38;lt;conio.h&#38;gt;
void main&#40;&#41;
&#123;
	int array&#91;100&#93;,n,i,j,temp;
	clrscr&#40;&#41;;
	cout&#60;&#60;&#34;How many numbers--&#62; &#34;;
	cin&#62;&#62;n;
	cout&#60;&#60;&#34;Enter &#34;&#60;&#60;n&#60;&#60;&#34; numbers\n&#34;;
	for&#40;i=0;i&#60;n;i++&#41;
		cin&#62;&#62;array&#91;i&#93;;
	for&#40;i=0;i&#60;n;i++&#41;
	&#123;
		for&#40;j=0;j&#60;n-1;j++&#41;
			if&#40;array&#91;j&#93;&#62;array&#91;j+1&#93;&#41;
			&#123;
				temp=array&#91;j&#93;;
				array&#91;j&#93;=array&#91;j+1&#93;;
				array&#91;j+1&#93;=temp;
			&#125;
	&#125;
	cout&#60;&#60;&#34;\nArray is sorted in ascending order.\n&#34;;
	for&#40;i=0;i&#60;n;i++&#41;
		cout&#60;&#60;array&#91;i&#93;&#60;&#60;&#34;   &#34;;
	getch&#40;&#41;;
&#125;






		
			Promote this on Orkut
		
		
			Share this on Facebook
		
		
			Digg this!
		
		
			Share this on del.icio.us
		
		
			Tweet This!
		
		
			Share this on Reddit
		
		
			Buzz up!
		
		
			Stumble upon something good? Share it on StumbleUpon
		
		
			Share this on Technorati
		
		
			Post [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>C++ Program for Bubble sort.</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #ff0000; font-style: italic;">/**************************************************************	
	Author: Arun Vishnu M V
	Web: www.arunmvishnu.com
	Description: C++ Program for Bubble sort
***************************************************************/</span>
<span style="color: #339900;">#include&amp;lt;iostream.h&amp;gt;</span>
<span style="color: #339900;">#include&amp;lt;conio.h&amp;gt;</span>
<span style="color: #0000ff;">void</span> main<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
	<span style="color: #0000ff;">int</span> array<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">100</span><span style="color: #008000;">&#93;</span>,n,i,j,temp<span style="color: #008080;">;</span>
	clrscr<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
	<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;How many numbers--&gt; &quot;</span><span style="color: #008080;">;</span>
	<span style="color: #0000dd;">cin</span><span style="color: #000080;">&gt;&gt;</span>n<span style="color: #008080;">;</span>
	<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;Enter &quot;</span><span style="color: #000080;">&lt;&lt;</span>n<span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot; numbers<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
	<span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span>i<span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>i<span style="color: #000080;">&lt;</span>n<span style="color: #008080;">;</span>i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
		<span style="color: #0000dd;">cin</span><span style="color: #000080;">&gt;&gt;</span>array<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	<span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span>i<span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>i<span style="color: #000080;">&lt;</span>n<span style="color: #008080;">;</span>i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
	<span style="color: #008000;">&#123;</span>
		<span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span>j<span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>j<span style="color: #000080;">&lt;</span>n<span style="color: #000040;">-</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>j<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
			<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>array<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span><span style="color: #000080;">&gt;</span>array<span style="color: #008000;">&#91;</span>j<span style="color: #000040;">+</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span>
			<span style="color: #008000;">&#123;</span>
				temp<span style="color: #000080;">=</span>array<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
				array<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>array<span style="color: #008000;">&#91;</span>j<span style="color: #000040;">+</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
				array<span style="color: #008000;">&#91;</span>j<span style="color: #000040;">+</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>temp<span style="color: #008080;">;</span>
			<span style="color: #008000;">&#125;</span>
	<span style="color: #008000;">&#125;</span>
	<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Array is sorted in ascending order.<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
	<span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span>i<span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>i<span style="color: #000080;">&lt;</span>n<span style="color: #008080;">;</span>i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
		<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span>array<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;   &quot;</span><span style="color: #008080;">;</span>
	getch<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span></pre></div></div>



<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-orkut">
			<a href="http://promote.orkut.com/preview?nt=orkut.com&amp;tt=C%2B%2B+Program+for+Bubble+sort&amp;du=http://arunmvishnu.com/programming/c-and-c/c-program-for-bubble-sort.html&amp;cn=C%2B%2B%20Program%20for%20Bubble%20sort.%0D%0A%0D%0A%2F%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%09%0D%0A%09Author%3A%20Arun%20Vishnu%20M%20V%0D%0A%09Web%3A%20www.arunmvishnu.com%0D%0A%09Description%3A%20C%2B%2B%20Program%20for%20Bubble%20sort%0D%0A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2F%0D%0A%23include%26lt%3Biostream.h%26gt%3B%0D%0A%23include%26lt%3B" rel="nofollow" title="Promote this on Orkut">Promote this on Orkut</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://arunmvishnu.com/programming/c-and-c/c-program-for-bubble-sort.html&amp;t=C%2B%2B+Program+for+Bubble+sort" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://arunmvishnu.com/programming/c-and-c/c-program-for-bubble-sort.html&amp;title=C%2B%2B+Program+for+Bubble+sort" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://arunmvishnu.com/programming/c-and-c/c-program-for-bubble-sort.html&amp;title=C%2B%2B+Program+for+Bubble+sort" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=C%2B%2B+Program+for+Bubble+sort+-+http://arunmvishnu.com/programming/c-and-c/c-program-for-bubble-sort.html+(via+@arunmvishnu)" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://arunmvishnu.com/programming/c-and-c/c-program-for-bubble-sort.html&amp;title=C%2B%2B+Program+for+Bubble+sort" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-yahoobuzz">
			<a href="http://buzz.yahoo.com/submit/?submitUrl=http://arunmvishnu.com/programming/c-and-c/c-program-for-bubble-sort.html&amp;submitHeadline=C%2B%2B+Program+for+Bubble+sort&amp;submitSummary=C%2B%2B%20Program%20for%20Bubble%20sort.%0D%0A%0D%0A%2F%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%09%0D%0A%09Author%3A%20Arun%20Vishnu%20M%20V%0D%0A%09Web%3A%20www.arunmvishnu.com%0D%0A%09Description%3A%20C%2B%2B%20Program%20for%20Bubble%20sort%0D%0A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2F%0D%0A%23include%26lt%3Biostream.h%26gt%3B%0D%0A%23include%26lt%3B&amp;submitCategory=science&amp;submitAssetType=image" rel="nofollow" title="Buzz up!">Buzz up!</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://arunmvishnu.com/programming/c-and-c/c-program-for-bubble-sort.html&amp;title=C%2B%2B+Program+for+Bubble+sort" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://arunmvishnu.com/programming/c-and-c/c-program-for-bubble-sort.html" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-myspace">
			<a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://arunmvishnu.com/programming/c-and-c/c-program-for-bubble-sort.html&amp;t=C%2B%2B+Program+for+Bubble+sort" rel="nofollow" title="Post this to MySpace">Post this to MySpace</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://arunmvishnu.com/programming/c-and-c/c-program-for-bubble-sort.html/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://arunmvishnu.com/programming/c-and-c/c-program-for-bubble-sort.html&amp;title=C%2B%2B+Program+for+Bubble+sort&amp;summary=C%2B%2B%20Program%20for%20Bubble%20sort.%0D%0A%0D%0A%2F%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%09%0D%0A%09Author%3A%20Arun%20Vishnu%20M%20V%0D%0A%09Web%3A%20www.arunmvishnu.com%0D%0A%09Description%3A%20C%2B%2B%20Program%20for%20Bubble%20sort%0D%0A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2F%0D%0A%23include%26lt%3Biostream.h%26gt%3B%0D%0A%23include%26lt%3B&amp;source=bugs of a debugger" rel="nofollow" title="Share this on Linkedin">Share this on Linkedin</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://arunmvishnu.com/programming/c-and-c/c-program-for-bubble-sort.html&amp;title=C%2B%2B+Program+for+Bubble+sort" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-friendfeed">
			<a href="http://www.friendfeed.com/share?title=C%2B%2B+Program+for+Bubble+sort&amp;link=http://arunmvishnu.com/programming/c-and-c/c-program-for-bubble-sort.html" rel="nofollow" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
		<li class="sexy-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://arunmvishnu.com/programming/c-and-c/c-program-for-bubble-sort.html&amp;t=C%2B%2B+Program+for+Bubble+sort" rel="nofollow" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="sexy-wikio">
			<a href="http://www.wikio.com/sharethis?url=http://arunmvishnu.com/programming/c-and-c/c-program-for-bubble-sort.html&amp;title=C%2B%2B+Program+for+Bubble+sort" rel="nofollow" title="Share this on Wikio">Share this on Wikio</a>
		</li>
		<li class="sexy-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://arunmvishnu.com/programming/c-and-c/c-program-for-bubble-sort.html&amp;title=C%2B%2B+Program+for+Bubble+sort" rel="nofollow" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://arunmvishnu.com/programming/c-and-c/c-program-for-bubble-sort.html&amp;n=C%2B%2B+Program+for+Bubble+sort&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Farunmvishnu.com%2Fprogramming%2Fc-and-c%2Fc-program-for-bubble-sort.html&amp;linkname=C%2B%2B%20Program%20for%20Bubble%20sort"><img src="http://arunmvishnu.com/home/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://arunmvishnu.com/programming/c-and-c/c-program-for-bubble-sort.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>C++ Program Program for Binary Search.</title>
		<link>http://arunmvishnu.com/programming/c-and-c/c-program-program-for-binary-search.html</link>
		<comments>http://arunmvishnu.com/programming/c-and-c/c-program-program-for-binary-search.html#comments</comments>
		<pubDate>Sat, 27 Dec 2008 19:19:51 +0000</pubDate>
		<dc:creator>Arun Vishnu</dc:creator>
				<category><![CDATA[C and C++]]></category>
		<category><![CDATA[c and cpp]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[source code]]></category>

		<guid isPermaLink="false">http://arunmvishnu.com/?p=574</guid>
		<description><![CDATA[C++ Program Program for Binary Search.

/**************************************************************	
	Author: Arun Vishnu M V
	Web: www.arunmvishnu.com
	Description: C++ Program Program for Binary Search.
***************************************************************/
#include&#38;lt;iostream.h&#38;gt;
#include&#38;lt;conio.h&#38;gt;
#include&#38;lt;process.h&#38;gt;
void main&#40;&#41;
&#123;
	int ar&#91;100&#93;,beg,mid,end,i,n,search;
	clrscr&#40;&#41;;
	cout&#60;&#60;&#34;How many numbers in the array: &#34;;
	cin&#62;&#62;n;
	cout&#60;&#60;&#34;Enter &#34;&#60;&#60;n&#60;&#60;&#34; numbers in ascending order --&#62; &#34;;
	for&#40;i=0;i&#60;n;i++&#41;
		cin&#62;&#62;ar&#91;i&#93;;
	beg=0;
	end=n-1;
	cout&#60;&#60;&#34;Enter a number to search: &#34;;
	cin&#62;&#62;search;
	while&#40;beg&#60;=end&#41;
	&#123;
		mid=&#40;beg+end&#41;/2;
		if&#40;ar&#91;mid&#93;==search&#41;
		&#123;
			cout&#60;&#60;&#34;\nItem found at position &#34;&#60;&#60;&#40;mid+1&#41;;
			getch&#40;&#41;;
			exit&#40;0&#41;;
		&#125;
		if&#40;search&#62;ar&#91;mid&#93;&#41;
			beg=mid+1;
		else
			end=mid-1;
	&#125;
	cout&#60;&#60;&#34;\nSorry! &#34;&#60;&#60;search&#60;&#60;&#34; doesnot found.&#34;;
	getch&#40;&#41;;
&#125;






		
			Promote this on Orkut
		
		
			Share this on Facebook
		
		
			Digg this!
		
		
			Share this on del.icio.us
		
		
			Tweet This!
		
		
			Share [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>C++ Program Program for Binary Search.</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #ff0000; font-style: italic;">/**************************************************************	
	Author: Arun Vishnu M V
	Web: www.arunmvishnu.com
	Description: C++ Program Program for Binary Search.
***************************************************************/</span>
<span style="color: #339900;">#include&amp;lt;iostream.h&amp;gt;</span>
<span style="color: #339900;">#include&amp;lt;conio.h&amp;gt;</span>
<span style="color: #339900;">#include&amp;lt;process.h&amp;gt;</span>
<span style="color: #0000ff;">void</span> main<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
	<span style="color: #0000ff;">int</span> ar<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">100</span><span style="color: #008000;">&#93;</span>,beg,mid,end,i,n,search<span style="color: #008080;">;</span>
	clrscr<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
	<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;How many numbers in the array: &quot;</span><span style="color: #008080;">;</span>
	<span style="color: #0000dd;">cin</span><span style="color: #000080;">&gt;&gt;</span>n<span style="color: #008080;">;</span>
	<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;Enter &quot;</span><span style="color: #000080;">&lt;&lt;</span>n<span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot; numbers in ascending order --&gt; &quot;</span><span style="color: #008080;">;</span>
	<span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span>i<span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>i<span style="color: #000080;">&lt;</span>n<span style="color: #008080;">;</span>i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
		<span style="color: #0000dd;">cin</span><span style="color: #000080;">&gt;&gt;</span>ar<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	beg<span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>
	end<span style="color: #000080;">=</span>n<span style="color: #000040;">-</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>
	<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;Enter a number to search: &quot;</span><span style="color: #008080;">;</span>
	<span style="color: #0000dd;">cin</span><span style="color: #000080;">&gt;&gt;</span>search<span style="color: #008080;">;</span>
	<span style="color: #0000ff;">while</span><span style="color: #008000;">&#40;</span>beg<span style="color: #000080;">&lt;=</span>end<span style="color: #008000;">&#41;</span>
	<span style="color: #008000;">&#123;</span>
		mid<span style="color: #000080;">=</span><span style="color: #008000;">&#40;</span>beg<span style="color: #000040;">+</span>end<span style="color: #008000;">&#41;</span><span style="color: #000040;">/</span><span style="color: #0000dd;">2</span><span style="color: #008080;">;</span>
		<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>ar<span style="color: #008000;">&#91;</span>mid<span style="color: #008000;">&#93;</span><span style="color: #000080;">==</span>search<span style="color: #008000;">&#41;</span>
		<span style="color: #008000;">&#123;</span>
			<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Item found at position &quot;</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #008000;">&#40;</span>mid<span style="color: #000040;">+</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
			getch<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
			<span style="color: #0000dd;">exit</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
		<span style="color: #008000;">&#125;</span>
		<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>search<span style="color: #000080;">&gt;</span>ar<span style="color: #008000;">&#91;</span>mid<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span>
			beg<span style="color: #000080;">=</span>mid<span style="color: #000040;">+</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>
		<span style="color: #0000ff;">else</span>
			end<span style="color: #000080;">=</span>mid<span style="color: #000040;">-</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>
	<span style="color: #008000;">&#125;</span>
	<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Sorry! &quot;</span><span style="color: #000080;">&lt;&lt;</span>search<span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot; doesnot found.&quot;</span><span style="color: #008080;">;</span>
	getch<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span></pre></div></div>



<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-orkut">
			<a href="http://promote.orkut.com/preview?nt=orkut.com&amp;tt=C%2B%2B+Program+Program+for+Binary+Search.&amp;du=http://arunmvishnu.com/programming/c-and-c/c-program-program-for-binary-search.html&amp;cn=C%2B%2B%20Program%20Program%20for%20Binary%20Search.%0D%0A%0D%0A%2F%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%09%0D%0A%09Author%3A%20Arun%20Vishnu%20M%20V%0D%0A%09Web%3A%20www.arunmvishnu.com%0D%0A%09Description%3A%20C%2B%2B%20Program%20Program%20for%20Binary%20Search.%0D%0A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2F%0D%0A%23include%26lt%3Biostrea" rel="nofollow" title="Promote this on Orkut">Promote this on Orkut</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://arunmvishnu.com/programming/c-and-c/c-program-program-for-binary-search.html&amp;t=C%2B%2B+Program+Program+for+Binary+Search." rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://arunmvishnu.com/programming/c-and-c/c-program-program-for-binary-search.html&amp;title=C%2B%2B+Program+Program+for+Binary+Search." rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://arunmvishnu.com/programming/c-and-c/c-program-program-for-binary-search.html&amp;title=C%2B%2B+Program+Program+for+Binary+Search." rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=C%2B%2B+Program+Program+for+Binary+Search.+-+http://arunmvishnu.com/programming/c-and-c/c-program-program-for-binary-search.html+(via+@arunmvishnu)" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://arunmvishnu.com/programming/c-and-c/c-program-program-for-binary-search.html&amp;title=C%2B%2B+Program+Program+for+Binary+Search." rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-yahoobuzz">
			<a href="http://buzz.yahoo.com/submit/?submitUrl=http://arunmvishnu.com/programming/c-and-c/c-program-program-for-binary-search.html&amp;submitHeadline=C%2B%2B+Program+Program+for+Binary+Search.&amp;submitSummary=C%2B%2B%20Program%20Program%20for%20Binary%20Search.%0D%0A%0D%0A%2F%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%09%0D%0A%09Author%3A%20Arun%20Vishnu%20M%20V%0D%0A%09Web%3A%20www.arunmvishnu.com%0D%0A%09Description%3A%20C%2B%2B%20Program%20Program%20for%20Binary%20Search.%0D%0A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2F%0D%0A%23include%26lt%3Biostrea&amp;submitCategory=science&amp;submitAssetType=image" rel="nofollow" title="Buzz up!">Buzz up!</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://arunmvishnu.com/programming/c-and-c/c-program-program-for-binary-search.html&amp;title=C%2B%2B+Program+Program+for+Binary+Search." rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://arunmvishnu.com/programming/c-and-c/c-program-program-for-binary-search.html" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-myspace">
			<a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://arunmvishnu.com/programming/c-and-c/c-program-program-for-binary-search.html&amp;t=C%2B%2B+Program+Program+for+Binary+Search." rel="nofollow" title="Post this to MySpace">Post this to MySpace</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://arunmvishnu.com/programming/c-and-c/c-program-program-for-binary-search.html/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://arunmvishnu.com/programming/c-and-c/c-program-program-for-binary-search.html&amp;title=C%2B%2B+Program+Program+for+Binary+Search.&amp;summary=C%2B%2B%20Program%20Program%20for%20Binary%20Search.%0D%0A%0D%0A%2F%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%09%0D%0A%09Author%3A%20Arun%20Vishnu%20M%20V%0D%0A%09Web%3A%20www.arunmvishnu.com%0D%0A%09Description%3A%20C%2B%2B%20Program%20Program%20for%20Binary%20Search.%0D%0A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2F%0D%0A%23include%26lt%3Biostrea&amp;source=bugs of a debugger" rel="nofollow" title="Share this on Linkedin">Share this on Linkedin</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://arunmvishnu.com/programming/c-and-c/c-program-program-for-binary-search.html&amp;title=C%2B%2B+Program+Program+for+Binary+Search." rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-friendfeed">
			<a href="http://www.friendfeed.com/share?title=C%2B%2B+Program+Program+for+Binary+Search.&amp;link=http://arunmvishnu.com/programming/c-and-c/c-program-program-for-binary-search.html" rel="nofollow" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
		<li class="sexy-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://arunmvishnu.com/programming/c-and-c/c-program-program-for-binary-search.html&amp;t=C%2B%2B+Program+Program+for+Binary+Search." rel="nofollow" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="sexy-wikio">
			<a href="http://www.wikio.com/sharethis?url=http://arunmvishnu.com/programming/c-and-c/c-program-program-for-binary-search.html&amp;title=C%2B%2B+Program+Program+for+Binary+Search." rel="nofollow" title="Share this on Wikio">Share this on Wikio</a>
		</li>
		<li class="sexy-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://arunmvishnu.com/programming/c-and-c/c-program-program-for-binary-search.html&amp;title=C%2B%2B+Program+Program+for+Binary+Search." rel="nofollow" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://arunmvishnu.com/programming/c-and-c/c-program-program-for-binary-search.html&amp;n=C%2B%2B+Program+Program+for+Binary+Search.&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Farunmvishnu.com%2Fprogramming%2Fc-and-c%2Fc-program-program-for-binary-search.html&amp;linkname=C%2B%2B%20Program%20Program%20for%20Binary%20Search."><img src="http://arunmvishnu.com/home/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://arunmvishnu.com/programming/c-and-c/c-program-program-for-binary-search.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>C++ Program to implement a stack using linked list</title>
		<link>http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-stack-using-linked-list.html</link>
		<comments>http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-stack-using-linked-list.html#comments</comments>
		<pubDate>Thu, 27 Nov 2008 20:09:58 +0000</pubDate>
		<dc:creator>Arun Vishnu</dc:creator>
				<category><![CDATA[C and C++]]></category>
		<category><![CDATA[c and cpp]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[source code]]></category>

		<guid isPermaLink="false">http://arunmvishnu.com/?p=620</guid>
		<description><![CDATA[C++ Program to implement a stack using linked list.

/**************************************************************	
	Author: Arun Vishnu M V
	Web: www.arunmvishnu.com
	Description: C++ Program to implement a stack using linked list.
***************************************************************/
#include&#38;lt;conio.h&#38;gt;   	
#include&#38;lt;iostream.h&#38;gt; 
#include&#38;lt;process.h&#38;gt;  
#include&#38;lt;malloc.h&#38;gt;  
&#160;
&#160;
//   Creating a NODE Structure
struct node
&#123;
   int data;
   struct node *next;
&#125;;
&#160;
// Creating a class STACK
class stack
&#123;
   struct [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>C++ Program to implement a stack using linked list.</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #ff0000; font-style: italic;">/**************************************************************	
	Author: Arun Vishnu M V
	Web: www.arunmvishnu.com
	Description: C++ Program to implement a stack using linked list.
***************************************************************/</span>
<span style="color: #339900;">#include&amp;lt;conio.h&amp;gt;   	</span>
<span style="color: #339900;">#include&amp;lt;iostream.h&amp;gt; </span>
<span style="color: #339900;">#include&amp;lt;process.h&amp;gt;  </span>
<span style="color: #339900;">#include&amp;lt;malloc.h&amp;gt;  </span>
&nbsp;
&nbsp;
<span style="color: #666666;">//   Creating a NODE Structure</span>
<span style="color: #0000ff;">struct</span> node
<span style="color: #008000;">&#123;</span>
   <span style="color: #0000ff;">int</span> data<span style="color: #008080;">;</span>
   <span style="color: #0000ff;">struct</span> node <span style="color: #000040;">*</span>next<span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span>
&nbsp;
<span style="color: #666666;">// Creating a class STACK</span>
<span style="color: #0000ff;">class</span> stack
<span style="color: #008000;">&#123;</span>
   <span style="color: #0000ff;">struct</span> node <span style="color: #000040;">*</span>top<span style="color: #008080;">;</span>
   <span style="color: #0000ff;">public</span><span style="color: #008080;">:</span>
      stack<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #666666;">// constructure</span>
      <span style="color: #008000;">&#123;</span>
	 top<span style="color: #000080;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #008080;">;</span>
      <span style="color: #008000;">&#125;</span>
      <span style="color: #0000ff;">void</span> push<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">// to insert an element</span>
      <span style="color: #0000ff;">void</span> pop<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>  <span style="color: #666666;">// to delete an element</span>
      <span style="color: #0000ff;">void</span> show<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">// to show the stack</span>
<span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span>
<span style="color: #666666;">// PUSH Operation</span>
<span style="color: #0000ff;">void</span> stack<span style="color: #008080;">::</span><span style="color: #007788;">push</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
   <span style="color: #0000ff;">int</span> value<span style="color: #008080;">;</span>
   <span style="color: #0000ff;">struct</span> node <span style="color: #000040;">*</span>ptr<span style="color: #008080;">;</span>
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>PUSH Operation<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;Enter a number to insert: &quot;</span><span style="color: #008080;">;</span>
   <span style="color: #0000dd;">cin</span><span style="color: #000080;">&gt;&gt;</span>value<span style="color: #008080;">;</span>
   ptr<span style="color: #000080;">=</span><span style="color: #0000dd;">new</span> node<span style="color: #008080;">;</span>
   ptr<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>data<span style="color: #000080;">=</span>value<span style="color: #008080;">;</span>
   ptr<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #000080;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #008080;">;</span>
   <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>top<span style="color: #000040;">!</span><span style="color: #000080;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #008000;">&#41;</span>
      ptr<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #000080;">=</span>top<span style="color: #008080;">;</span>
   top<span style="color: #000080;">=</span>ptr<span style="color: #008080;">;</span>
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>New item is inserted to the stack!!!&quot;</span><span style="color: #008080;">;</span>
   getch<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #666666;">// POP Operation</span>
<span style="color: #0000ff;">void</span> stack<span style="color: #008080;">::</span><span style="color: #007788;">pop</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
   <span style="color: #0000ff;">struct</span> node <span style="color: #000040;">*</span>temp<span style="color: #008080;">;</span>
   <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>top<span style="color: #000080;">==</span><span style="color: #0000ff;">NULL</span><span style="color: #008000;">&#41;</span>
   <span style="color: #008000;">&#123;</span>
      <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>The stack is empty!!!&quot;</span><span style="color: #008080;">;</span>
      getch<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
      <span style="color: #0000ff;">return</span><span style="color: #008080;">;</span>
   <span style="color: #008000;">&#125;</span>
   temp<span style="color: #000080;">=</span>top<span style="color: #008080;">;</span>
   top<span style="color: #000080;">=</span>top<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #008080;">;</span>
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>POP Operation........<span style="color: #000099; font-weight: bold;">\n</span>Poped value is &quot;</span><span style="color: #000080;">&lt;&lt;</span>temp<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>data<span style="color: #008080;">;</span>
   <span style="color: #0000dd;">delete</span> temp<span style="color: #008080;">;</span>
   getch<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #666666;">// Show stack</span>
<span style="color: #0000ff;">void</span> stack<span style="color: #008080;">::</span><span style="color: #007788;">show</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
   <span style="color: #0000ff;">struct</span> node <span style="color: #000040;">*</span>ptr1<span style="color: #000080;">=</span>top<span style="color: #008080;">;</span>
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>The stack is<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
   <span style="color: #0000ff;">while</span><span style="color: #008000;">&#40;</span>ptr1<span style="color: #000040;">!</span><span style="color: #000080;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #008000;">&#41;</span>
   <span style="color: #008000;">&#123;</span>
      <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span>ptr1<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>data<span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot; -&gt;&quot;</span><span style="color: #008080;">;</span>
      ptr1<span style="color: #000080;">=</span>ptr1<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #008080;">;</span>
   <span style="color: #008000;">&#125;</span>
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;NULL<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
   getch<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #666666;">// Main function</span>
<span style="color: #0000ff;">int</span> main<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
   clrscr<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
   stack s<span style="color: #008080;">;</span>
   <span style="color: #0000ff;">int</span> choice<span style="color: #008080;">;</span>
   <span style="color: #0000ff;">while</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span>
   <span style="color: #008000;">&#123;</span>
      <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>-----------------------------------------------------------&quot;</span><span style="color: #008080;">;</span>
      <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>STACK USING LINKED LIST<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
      <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;1:PUSH<span style="color: #000099; font-weight: bold;">\n</span>2:POP<span style="color: #000099; font-weight: bold;">\n</span>3:DISPLAY STACK<span style="color: #000099; font-weight: bold;">\n</span>4:EXIT&quot;</span><span style="color: #008080;">;</span>
      <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Enter your choice(1-4): &quot;</span><span style="color: #008080;">;</span>
      <span style="color: #0000dd;">cin</span><span style="color: #000080;">&gt;&gt;</span>choice<span style="color: #008080;">;</span>
      <span style="color: #0000ff;">switch</span><span style="color: #008000;">&#40;</span>choice<span style="color: #008000;">&#41;</span>
      <span style="color: #008000;">&#123;</span>
       <span style="color: #0000ff;">case</span> <span style="color: #0000dd;">1</span><span style="color: #008080;">:</span>
	  s.<span style="color: #007788;">push</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
	  <span style="color: #0000ff;">break</span><span style="color: #008080;">;</span>
       <span style="color: #0000ff;">case</span> <span style="color: #0000dd;">2</span><span style="color: #008080;">:</span>
	  s.<span style="color: #007788;">pop</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
	  <span style="color: #0000ff;">break</span><span style="color: #008080;">;</span>
       <span style="color: #0000ff;">case</span> <span style="color: #0000dd;">3</span><span style="color: #008080;">:</span>
	  s.<span style="color: #007788;">show</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
	  <span style="color: #0000ff;">break</span><span style="color: #008080;">;</span>
       <span style="color: #0000ff;">case</span> <span style="color: #0000dd;">4</span><span style="color: #008080;">:</span>
	  <span style="color: #0000dd;">exit</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
	  <span style="color: #0000ff;">break</span><span style="color: #008080;">;</span>
       <span style="color: #0000ff;">default</span><span style="color: #008080;">:</span>
	  <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;Please enter correct choice(1-4)!!&quot;</span><span style="color: #008080;">;</span>
	  getch<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
	  <span style="color: #0000ff;">break</span><span style="color: #008080;">;</span>
       <span style="color: #008000;">&#125;</span>
   <span style="color: #008000;">&#125;</span>
   <span style="color: #0000ff;">return</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #666666;">//---------------------- END--------------------</span></pre></div></div>



<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-orkut">
			<a href="http://promote.orkut.com/preview?nt=orkut.com&amp;tt=C%2B%2B+Program+to+implement+a+stack+using+linked+list&amp;du=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-stack-using-linked-list.html&amp;cn=C%2B%2B%20Program%20to%20implement%20a%20stack%20using%20linked%20list.%0D%0A%0D%0A%2F%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%09%0D%0A%09Author%3A%20Arun%20Vishnu%20M%20V%0D%0A%09Web%3A%20www.arunmvishnu.com%0D%0A%09Description%3A%20C%2B%2B%20Program%20to%20implement%20a%20stack%20using%20linked%20list.%0D%0A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A" rel="nofollow" title="Promote this on Orkut">Promote this on Orkut</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-stack-using-linked-list.html&amp;t=C%2B%2B+Program+to+implement+a+stack+using+linked+list" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-stack-using-linked-list.html&amp;title=C%2B%2B+Program+to+implement+a+stack+using+linked+list" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-stack-using-linked-list.html&amp;title=C%2B%2B+Program+to+implement+a+stack+using+linked+list" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=C%2B%2B+Program+to+implement+a+stack+using+linked+list+-+http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-stack-using-linked-list.html+(via+@arunmvishnu)" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-stack-using-linked-list.html&amp;title=C%2B%2B+Program+to+implement+a+stack+using+linked+list" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-yahoobuzz">
			<a href="http://buzz.yahoo.com/submit/?submitUrl=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-stack-using-linked-list.html&amp;submitHeadline=C%2B%2B+Program+to+implement+a+stack+using+linked+list&amp;submitSummary=C%2B%2B%20Program%20to%20implement%20a%20stack%20using%20linked%20list.%0D%0A%0D%0A%2F%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%09%0D%0A%09Author%3A%20Arun%20Vishnu%20M%20V%0D%0A%09Web%3A%20www.arunmvishnu.com%0D%0A%09Description%3A%20C%2B%2B%20Program%20to%20implement%20a%20stack%20using%20linked%20list.%0D%0A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A&amp;submitCategory=science&amp;submitAssetType=image" rel="nofollow" title="Buzz up!">Buzz up!</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-stack-using-linked-list.html&amp;title=C%2B%2B+Program+to+implement+a+stack+using+linked+list" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-stack-using-linked-list.html" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-myspace">
			<a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-stack-using-linked-list.html&amp;t=C%2B%2B+Program+to+implement+a+stack+using+linked+list" rel="nofollow" title="Post this to MySpace">Post this to MySpace</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-stack-using-linked-list.html/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-stack-using-linked-list.html&amp;title=C%2B%2B+Program+to+implement+a+stack+using+linked+list&amp;summary=C%2B%2B%20Program%20to%20implement%20a%20stack%20using%20linked%20list.%0D%0A%0D%0A%2F%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%09%0D%0A%09Author%3A%20Arun%20Vishnu%20M%20V%0D%0A%09Web%3A%20www.arunmvishnu.com%0D%0A%09Description%3A%20C%2B%2B%20Program%20to%20implement%20a%20stack%20using%20linked%20list.%0D%0A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A&amp;source=bugs of a debugger" rel="nofollow" title="Share this on Linkedin">Share this on Linkedin</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-stack-using-linked-list.html&amp;title=C%2B%2B+Program+to+implement+a+stack+using+linked+list" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-friendfeed">
			<a href="http://www.friendfeed.com/share?title=C%2B%2B+Program+to+implement+a+stack+using+linked+list&amp;link=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-stack-using-linked-list.html" rel="nofollow" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
		<li class="sexy-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-stack-using-linked-list.html&amp;t=C%2B%2B+Program+to+implement+a+stack+using+linked+list" rel="nofollow" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="sexy-wikio">
			<a href="http://www.wikio.com/sharethis?url=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-stack-using-linked-list.html&amp;title=C%2B%2B+Program+to+implement+a+stack+using+linked+list" rel="nofollow" title="Share this on Wikio">Share this on Wikio</a>
		</li>
		<li class="sexy-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-stack-using-linked-list.html&amp;title=C%2B%2B+Program+to+implement+a+stack+using+linked+list" rel="nofollow" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-stack-using-linked-list.html&amp;n=C%2B%2B+Program+to+implement+a+stack+using+linked+list&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Farunmvishnu.com%2Fprogramming%2Fc-and-c%2Fc-program-to-implement-a-stack-using-linked-list.html&amp;linkname=C%2B%2B%20Program%20to%20implement%20a%20stack%20using%20linked%20list"><img src="http://arunmvishnu.com/home/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-stack-using-linked-list.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>C++ Program implement a stack using an array</title>
		<link>http://arunmvishnu.com/programming/c-and-c/implement-a-stack-using-an-array.html</link>
		<comments>http://arunmvishnu.com/programming/c-and-c/implement-a-stack-using-an-array.html#comments</comments>
		<pubDate>Thu, 27 Nov 2008 20:06:00 +0000</pubDate>
		<dc:creator>Arun Vishnu</dc:creator>
				<category><![CDATA[C and C++]]></category>
		<category><![CDATA[c and cpp]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[source code]]></category>

		<guid isPermaLink="false">http://arunmvishnu.com/?p=616</guid>
		<description><![CDATA[C++ Program implement a stack using an array.

/**************************************************************
	Author: Arun Vishnu M V
	Web: www.arunmvishnu.com
	Description: C++ Program implement a stack using an array
***************************************************************/
#include&#60;conio.h&#62;
#include&#60;iostream.h&#62;
#include&#60;process.h&#62;  

void main()
{
	int stack[150],top,n,i,max_stack,choice,element,n_pop;
	max_stack=150;
	coutn;
	cout



No related posts.


No related posts.]]></description>
			<content:encoded><![CDATA[<p>C++ Program implement a stack using an array.</p>
<pre>
/**************************************************************
	Author: Arun Vishnu M V
	Web: www.arunmvishnu.com
	Description: C++ Program implement a stack using an array
***************************************************************/
#include&lt;conio.h&gt;
#include&lt;iostream.h&gt;
#include&lt;process.h&gt;  

void main()
{
	int stack[150],top,n,i,max_stack,choice,element,n_pop;
	max_stack=150;
	cout<<"How many elements are in the stack: ";
	cin>>n;
	cout<<"Enter "<<n<<" elements.\n";
	for(top=0;top<n;top++)
		cin>>stack[top];
	cout<<"\nStack is implemented.\nThe stack is\n";
	for(i=top-1;i>=0;i--)
		cout<<stack[i]<<"   ";
	getch();
	while(1)
	{
		clrscr();
		cout<<"1: PUSH\n2: POP\n3: Display Stack\n4: Exit\nEnter your choice: ";
		cin>>choice;
		switch(choice)
		{
			case 1:     //  PUSH
				cout<<"\nPUSH OPERATION\n";
				if(top>=max_stack)
            {
					cout<<"Stack is full!";
					getch();
					break;
				}
				cout<<"Enter an element: ";
				cin>>element;
				stack[top]=element;
            top++;
				cout<<"Item Inserted!";
				getch();
				break;
			case 2:             // POP
				cout<<"POP OPERATION\n";
				if(top<0)
				{
					cout<<"Stack is empty";
					getch();
					break;
				}
				cout<<"How many elements you want to pop: ";
            cin>>n_pop;
				if(n_pop>top)
				{
					cout<<"\nError!\nStack is small.";
					getch();
               break;
				}
				top=top-n_pop;
				cout<<"Items POPed";
				getch();
				break;
			case 3:       //  Display
				cout<<"\The stack is\n";
				for(i=top-1;i>=0;i--)
					cout<<stack[i]<<"   ";
				getch();
				break;
			case 4:
				exit(0);
				getch();
			default:
				cout<<"RE-enter your choice!";
		}	// End of switch
	}		// End of while
	getch();
}

//---------------------- END--------------------
</pre>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-orkut">
			<a href="http://promote.orkut.com/preview?nt=orkut.com&amp;tt=C%2B%2B+Program+implement+a+stack+using+an+array&amp;du=http://arunmvishnu.com/programming/c-and-c/implement-a-stack-using-an-array.html&amp;cn=C%2B%2B%20Program%20implement%20a%20stack%20using%20an%20array.%0D%0A%0D%0A%2F%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%09%0D%0A%09Author%3A%20Arun%20Vishnu%20M%20V%0D%0A%09Web%3A%20www.arunmvishnu.com%0D%0A%09Description%3A%20C%2B%2B%20Program%20implement%20a%20stack%20using%20an%20array%0D%0A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2F%0D%0A%23inclu" rel="nofollow" title="Promote this on Orkut">Promote this on Orkut</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://arunmvishnu.com/programming/c-and-c/implement-a-stack-using-an-array.html&amp;t=C%2B%2B+Program+implement+a+stack+using+an+array" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://arunmvishnu.com/programming/c-and-c/implement-a-stack-using-an-array.html&amp;title=C%2B%2B+Program+implement+a+stack+using+an+array" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://arunmvishnu.com/programming/c-and-c/implement-a-stack-using-an-array.html&amp;title=C%2B%2B+Program+implement+a+stack+using+an+array" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=C%2B%2B+Program+implement+a+stack+using+an+array+-+http://arunmvishnu.com/programming/c-and-c/implement-a-stack-using-an-array.html+(via+@arunmvishnu)" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://arunmvishnu.com/programming/c-and-c/implement-a-stack-using-an-array.html&amp;title=C%2B%2B+Program+implement+a+stack+using+an+array" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-yahoobuzz">
			<a href="http://buzz.yahoo.com/submit/?submitUrl=http://arunmvishnu.com/programming/c-and-c/implement-a-stack-using-an-array.html&amp;submitHeadline=C%2B%2B+Program+implement+a+stack+using+an+array&amp;submitSummary=C%2B%2B%20Program%20implement%20a%20stack%20using%20an%20array.%0D%0A%0D%0A%2F%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%09%0D%0A%09Author%3A%20Arun%20Vishnu%20M%20V%0D%0A%09Web%3A%20www.arunmvishnu.com%0D%0A%09Description%3A%20C%2B%2B%20Program%20implement%20a%20stack%20using%20an%20array%0D%0A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2F%0D%0A%23inclu&amp;submitCategory=science&amp;submitAssetType=image" rel="nofollow" title="Buzz up!">Buzz up!</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://arunmvishnu.com/programming/c-and-c/implement-a-stack-using-an-array.html&amp;title=C%2B%2B+Program+implement+a+stack+using+an+array" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://arunmvishnu.com/programming/c-and-c/implement-a-stack-using-an-array.html" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-myspace">
			<a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://arunmvishnu.com/programming/c-and-c/implement-a-stack-using-an-array.html&amp;t=C%2B%2B+Program+implement+a+stack+using+an+array" rel="nofollow" title="Post this to MySpace">Post this to MySpace</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://arunmvishnu.com/programming/c-and-c/implement-a-stack-using-an-array.html/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://arunmvishnu.com/programming/c-and-c/implement-a-stack-using-an-array.html&amp;title=C%2B%2B+Program+implement+a+stack+using+an+array&amp;summary=C%2B%2B%20Program%20implement%20a%20stack%20using%20an%20array.%0D%0A%0D%0A%2F%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%09%0D%0A%09Author%3A%20Arun%20Vishnu%20M%20V%0D%0A%09Web%3A%20www.arunmvishnu.com%0D%0A%09Description%3A%20C%2B%2B%20Program%20implement%20a%20stack%20using%20an%20array%0D%0A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2F%0D%0A%23inclu&amp;source=bugs of a debugger" rel="nofollow" title="Share this on Linkedin">Share this on Linkedin</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://arunmvishnu.com/programming/c-and-c/implement-a-stack-using-an-array.html&amp;title=C%2B%2B+Program+implement+a+stack+using+an+array" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-friendfeed">
			<a href="http://www.friendfeed.com/share?title=C%2B%2B+Program+implement+a+stack+using+an+array&amp;link=http://arunmvishnu.com/programming/c-and-c/implement-a-stack-using-an-array.html" rel="nofollow" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
		<li class="sexy-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://arunmvishnu.com/programming/c-and-c/implement-a-stack-using-an-array.html&amp;t=C%2B%2B+Program+implement+a+stack+using+an+array" rel="nofollow" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="sexy-wikio">
			<a href="http://www.wikio.com/sharethis?url=http://arunmvishnu.com/programming/c-and-c/implement-a-stack-using-an-array.html&amp;title=C%2B%2B+Program+implement+a+stack+using+an+array" rel="nofollow" title="Share this on Wikio">Share this on Wikio</a>
		</li>
		<li class="sexy-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://arunmvishnu.com/programming/c-and-c/implement-a-stack-using-an-array.html&amp;title=C%2B%2B+Program+implement+a+stack+using+an+array" rel="nofollow" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://arunmvishnu.com/programming/c-and-c/implement-a-stack-using-an-array.html&amp;n=C%2B%2B+Program+implement+a+stack+using+an+array&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Farunmvishnu.com%2Fprogramming%2Fc-and-c%2Fimplement-a-stack-using-an-array.html&amp;linkname=C%2B%2B%20Program%20implement%20a%20stack%20using%20an%20array"><img src="http://arunmvishnu.com/home/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://arunmvishnu.com/programming/c-and-c/implement-a-stack-using-an-array.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>C++ Program to add and subtract 2 sparse matrices</title>
		<link>http://arunmvishnu.com/programming/c-and-c/c-program-to-add-and-subtract-2-sparse-matrices.html</link>
		<comments>http://arunmvishnu.com/programming/c-and-c/c-program-to-add-and-subtract-2-sparse-matrices.html#comments</comments>
		<pubDate>Thu, 27 Nov 2008 20:04:16 +0000</pubDate>
		<dc:creator>Arun Vishnu</dc:creator>
				<category><![CDATA[C and C++]]></category>
		<category><![CDATA[c and cpp]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[source code]]></category>

		<guid isPermaLink="false">http://arunmvishnu.com/?p=614</guid>
		<description><![CDATA[C++ Program to add and subtract 2 sparse matrices.

/**************************************************************	
	Author: Arun Vishnu M V
	Web: www.arunmvishnu.com
	Description: C++ Program to add and subtract 2 sparse matrices
***************************************************************/
#include&#38;lt;conio.h&#38;gt;   	
#include&#38;lt;iostream.h&#38;gt; 
#include&#38;lt;process.h&#38;gt;  
&#160;
int main&#40;&#41;
&#123;
   clrscr&#40;&#41;;
   int sparse1&#91;10&#93;&#91;3&#93;,sparse2&#91;10&#93;&#91;3&#93;,sum&#91;10&#93;&#91;3&#93;,diff&#91;10&#93;&#91;3&#93;;
   int m,n,p,q,t1,t2,s,d,element;
   int i,j;
   cout&#60;&#60;&#34;Enter the number of rows and columns : [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>C++ Program to add and subtract 2 sparse matrices.</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #ff0000; font-style: italic;">/**************************************************************	
	Author: Arun Vishnu M V
	Web: www.arunmvishnu.com
	Description: C++ Program to add and subtract 2 sparse matrices
***************************************************************/</span>
<span style="color: #339900;">#include&amp;lt;conio.h&amp;gt;   	</span>
<span style="color: #339900;">#include&amp;lt;iostream.h&amp;gt; </span>
<span style="color: #339900;">#include&amp;lt;process.h&amp;gt;  </span>
&nbsp;
<span style="color: #0000ff;">int</span> main<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
   clrscr<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
   <span style="color: #0000ff;">int</span> sparse1<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">10</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span>,sparse2<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">10</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span>,sum<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">10</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span>,diff<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">10</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
   <span style="color: #0000ff;">int</span> m,n,p,q,t1,t2,s,d,element<span style="color: #008080;">;</span>
   <span style="color: #0000ff;">int</span> i,j<span style="color: #008080;">;</span>
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;Enter the number of rows and columns : &quot;</span><span style="color: #008080;">;</span>
   <span style="color: #0000dd;">cin</span><span style="color: #000080;">&gt;&gt;</span>m<span style="color: #000080;">&gt;&gt;</span>n<span style="color: #008080;">;</span>
   t1<span style="color: #000080;">=</span>t2<span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>
&nbsp;
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Enter the first matrix(&quot;</span><span style="color: #000080;">&lt;&lt;</span>m<span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;*&quot;</span><span style="color: #000080;">&lt;&lt;</span>n<span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;):<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
   <span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span>i<span style="color: #000080;">=</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>i<span style="color: #000080;">&lt;=</span>m<span style="color: #008080;">;</span>i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
   <span style="color: #008000;">&#123;</span>
      <span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span>j<span style="color: #000080;">=</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>j<span style="color: #000080;">&lt;=</span>n<span style="color: #008080;">;</span>j<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
      <span style="color: #008000;">&#123;</span>
	 <span style="color: #0000dd;">cin</span><span style="color: #000080;">&gt;&gt;</span>element<span style="color: #008080;">;</span>
	 <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>element<span style="color: #000040;">!</span><span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span>
	 <span style="color: #008000;">&#123;</span>
	    t1<span style="color: #000080;">=</span>t1<span style="color: #000040;">+</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>
	    sparse1<span style="color: #008000;">&#91;</span>t1<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>i<span style="color: #008080;">;</span>
	    sparse1<span style="color: #008000;">&#91;</span>t1<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>j<span style="color: #008080;">;</span>
	    sparse1<span style="color: #008000;">&#91;</span>t1<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>element<span style="color: #008080;">;</span>
	 <span style="color: #008000;">&#125;</span>
      <span style="color: #008000;">&#125;</span>
   <span style="color: #008000;">&#125;</span>
   sparse1<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>m<span style="color: #008080;">;</span>
   sparse1<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>n<span style="color: #008080;">;</span>
   sparse1<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>t1<span style="color: #008080;">;</span>
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Enter the second matrix(&quot;</span><span style="color: #000080;">&lt;&lt;</span>m<span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;*&quot;</span><span style="color: #000080;">&lt;&lt;</span>n<span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;):<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
   <span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span>i<span style="color: #000080;">=</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>i<span style="color: #000080;">&lt;=</span>m<span style="color: #008080;">;</span>i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
   <span style="color: #008000;">&#123;</span>
      <span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span>j<span style="color: #000080;">=</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>j<span style="color: #000080;">&lt;=</span>n<span style="color: #008080;">;</span>j<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
      <span style="color: #008000;">&#123;</span>
	 <span style="color: #0000dd;">cin</span><span style="color: #000080;">&gt;&gt;</span>element<span style="color: #008080;">;</span>
	 <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>element<span style="color: #000040;">!</span><span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span>
	 <span style="color: #008000;">&#123;</span>
	    t2<span style="color: #000080;">=</span>t2<span style="color: #000040;">+</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>
	    sparse2<span style="color: #008000;">&#91;</span>t2<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>i<span style="color: #008080;">;</span>
	    sparse2<span style="color: #008000;">&#91;</span>t2<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>j<span style="color: #008080;">;</span>
	    sparse2<span style="color: #008000;">&#91;</span>t2<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>element<span style="color: #008080;">;</span>
	 <span style="color: #008000;">&#125;</span>
      <span style="color: #008000;">&#125;</span>
   <span style="color: #008000;">&#125;</span>
   sparse2<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>m<span style="color: #008080;">;</span>
   sparse2<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>n<span style="color: #008080;">;</span>
   sparse2<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>t2<span style="color: #008080;">;</span>
&nbsp;
   <span style="color: #666666;">// displaying the first sparse matrix</span>
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>The first sparse matrix is :<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>Row<span style="color: #000099; font-weight: bold;">\t</span>Column<span style="color: #000099; font-weight: bold;">\t</span>Element&quot;</span><span style="color: #008080;">;</span>
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>-----------------------<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
   <span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span>i<span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>i<span style="color: #000080;">&lt;=</span>t1<span style="color: #008080;">;</span>i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
   <span style="color: #008000;">&#123;</span>
      <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span>sparse1<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span><span style="color: #000080;">&lt;&lt;</span>sparse1<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span><span style="color: #000080;">&lt;&lt;</span>sparse1<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
   <span style="color: #008000;">&#125;</span>
    <span style="color: #666666;">// displaying the second sparse matrix</span>
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>The second sparse matrix is :<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>Row<span style="color: #000099; font-weight: bold;">\t</span>Column<span style="color: #000099; font-weight: bold;">\t</span>Element&quot;</span><span style="color: #008080;">;</span>
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>-----------------------<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
   <span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span>i<span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>i<span style="color: #000080;">&lt;=</span>t2<span style="color: #008080;">;</span>i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
   <span style="color: #008000;">&#123;</span>
      <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span>sparse2<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span><span style="color: #000080;">&lt;&lt;</span>sparse2<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span><span style="color: #000080;">&lt;&lt;</span>sparse2<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
   <span style="color: #008000;">&#125;</span>
&nbsp;
   <span style="color: #666666;">// Addition and subtraction</span>
   i<span style="color: #000080;">=</span>j<span style="color: #000080;">=</span>s<span style="color: #000080;">=</span>d<span style="color: #000080;">=</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>
   <span style="color: #0000ff;">while</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>i<span style="color: #000080;">&lt;=</span>t1<span style="color: #008000;">&#41;</span><span style="color: #000040;">&amp;&amp;</span><span style="color: #008000;">&#40;</span>j<span style="color: #000080;">&lt;=</span>t2<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
   <span style="color: #008000;">&#123;</span>
      <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>sparse1<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">==</span>sparse2<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span>    <span style="color: #666666;">// if rows are equal</span>
      <span style="color: #008000;">&#123;</span>
	 <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>sparse1<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">==</span>sparse2<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span> <span style="color: #666666;">// if columns are equal</span>
	 <span style="color: #008000;">&#123;</span>
	    sum<span style="color: #008000;">&#91;</span>s<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>diff<span style="color: #008000;">&#91;</span>d<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse1<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	    sum<span style="color: #008000;">&#91;</span>s<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>diff<span style="color: #008000;">&#91;</span>d<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse1<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	    sum<span style="color: #008000;">&#91;</span>s<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse1<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000040;">+</span>sparse2<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	    diff<span style="color: #008000;">&#91;</span>d<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse1<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000040;">-</span>sparse2<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	    i<span style="color: #000040;">++</span><span style="color: #008080;">;</span>
	    j<span style="color: #000040;">++</span><span style="color: #008080;">;</span>
	    <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>sum<span style="color: #008000;">&#91;</span>s<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000040;">!</span><span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span>
	       s<span style="color: #000040;">++</span><span style="color: #008080;">;</span>
	    <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>diff<span style="color: #008000;">&#91;</span>d<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000040;">!</span><span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span>
	       d<span style="color: #000040;">++</span><span style="color: #008080;">;</span>
	 <span style="color: #008000;">&#125;</span>
	 <span style="color: #0000ff;">else</span>   <span style="color: #666666;">// if columns are not equal</span>
	 <span style="color: #008000;">&#123;</span>
	    <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>sparse1<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;</span>sparse2<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span>
	    <span style="color: #008000;">&#123;</span>
	       sum<span style="color: #008000;">&#91;</span>s<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>diff<span style="color: #008000;">&#91;</span>d<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse1<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	       sum<span style="color: #008000;">&#91;</span>s<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>diff<span style="color: #008000;">&#91;</span>d<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse1<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	       sum<span style="color: #008000;">&#91;</span>s<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>diff<span style="color: #008000;">&#91;</span>d<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse1<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	       i<span style="color: #000040;">++</span><span style="color: #008080;">;</span>
	       s<span style="color: #000040;">++</span><span style="color: #008080;">;</span>
	       d<span style="color: #000040;">++</span><span style="color: #008080;">;</span>
	    <span style="color: #008000;">&#125;</span>
	    <span style="color: #0000ff;">else</span>
	    <span style="color: #008000;">&#123;</span>
	       sum<span style="color: #008000;">&#91;</span>s<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>diff<span style="color: #008000;">&#91;</span>d<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse2<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	       sum<span style="color: #008000;">&#91;</span>s<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>diff<span style="color: #008000;">&#91;</span>d<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse2<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	       sum<span style="color: #008000;">&#91;</span>s<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse2<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	       diff<span style="color: #008000;">&#91;</span>d<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #000040;">-</span>sparse2<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	       j<span style="color: #000040;">++</span><span style="color: #008080;">;</span>
	       d<span style="color: #000040;">++</span><span style="color: #008080;">;</span>
	       s<span style="color: #000040;">++</span><span style="color: #008080;">;</span>
	    <span style="color: #008000;">&#125;</span>
	 <span style="color: #008000;">&#125;</span>
      <span style="color: #008000;">&#125;</span>
      <span style="color: #0000ff;">else</span>   <span style="color: #666666;">//   if rows are not equal</span>
      <span style="color: #008000;">&#123;</span>
	 <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>sparse1<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;</span>sparse2<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span>
	 <span style="color: #008000;">&#123;</span>
	    sum<span style="color: #008000;">&#91;</span>s<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>diff<span style="color: #008000;">&#91;</span>d<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse1<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	    sum<span style="color: #008000;">&#91;</span>s<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>diff<span style="color: #008000;">&#91;</span>d<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse1<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	    sum<span style="color: #008000;">&#91;</span>s<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>diff<span style="color: #008000;">&#91;</span>d<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse1<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	    i<span style="color: #000040;">++</span><span style="color: #008080;">;</span>
	    d<span style="color: #000040;">++</span><span style="color: #008080;">;</span>
	    s<span style="color: #000040;">++</span><span style="color: #008080;">;</span>
	 <span style="color: #008000;">&#125;</span>
	 <span style="color: #0000ff;">else</span>
	 <span style="color: #008000;">&#123;</span>
	    sum<span style="color: #008000;">&#91;</span>s<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>diff<span style="color: #008000;">&#91;</span>d<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse2<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	    sum<span style="color: #008000;">&#91;</span>s<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>diff<span style="color: #008000;">&#91;</span>d<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse2<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	    sum<span style="color: #008000;">&#91;</span>s<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse2<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	    diff<span style="color: #008000;">&#91;</span>d<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #000040;">-</span>sparse2<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	    j<span style="color: #000040;">++</span><span style="color: #008080;">;</span>
	    s<span style="color: #000040;">++</span><span style="color: #008080;">;</span>
	    d<span style="color: #000040;">++</span><span style="color: #008080;">;</span>
	 <span style="color: #008000;">&#125;</span>
      <span style="color: #008000;">&#125;</span>
   <span style="color: #008000;">&#125;</span>  <span style="color: #666666;">// end of while</span>
   <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>i<span style="color: #000080;">&lt;=</span>t1<span style="color: #008000;">&#41;</span>
   <span style="color: #008000;">&#123;</span>
      <span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span>p<span style="color: #000080;">=</span>i<span style="color: #008080;">;</span>p<span style="color: #000080;">&lt;=</span>t1<span style="color: #008080;">;</span>p<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
      <span style="color: #008000;">&#123;</span>
	 sum<span style="color: #008000;">&#91;</span>s<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>diff<span style="color: #008000;">&#91;</span>d<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse1<span style="color: #008000;">&#91;</span>p<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	 sum<span style="color: #008000;">&#91;</span>s<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>diff<span style="color: #008000;">&#91;</span>d<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse1<span style="color: #008000;">&#91;</span>p<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	 sum<span style="color: #008000;">&#91;</span>s<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>diff<span style="color: #008000;">&#91;</span>d<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse1<span style="color: #008000;">&#91;</span>p<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	 s<span style="color: #000040;">++</span><span style="color: #008080;">;</span>
	 d<span style="color: #000040;">++</span><span style="color: #008080;">;</span>
      <span style="color: #008000;">&#125;</span>
   <span style="color: #008000;">&#125;</span>
   <span style="color: #0000ff;">else</span> <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>j<span style="color: #000080;">&lt;=</span>t2<span style="color: #008000;">&#41;</span>
   <span style="color: #008000;">&#123;</span>
      <span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span>p<span style="color: #000080;">=</span>j<span style="color: #008080;">;</span>p<span style="color: #000080;">&lt;=</span>t2<span style="color: #008080;">;</span>p<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
      <span style="color: #008000;">&#123;</span>
	 sum<span style="color: #008000;">&#91;</span>s<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>diff<span style="color: #008000;">&#91;</span>d<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse2<span style="color: #008000;">&#91;</span>p<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	 sum<span style="color: #008000;">&#91;</span>s<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>diff<span style="color: #008000;">&#91;</span>d<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse2<span style="color: #008000;">&#91;</span>p<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	 sum<span style="color: #008000;">&#91;</span>s<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse2<span style="color: #008000;">&#91;</span>p<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	 diff<span style="color: #008000;">&#91;</span>d<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #000040;">-</span>sparse2<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	 s<span style="color: #000040;">++</span><span style="color: #008080;">;</span>
	 d<span style="color: #000040;">++</span><span style="color: #008080;">;</span>
      <span style="color: #008000;">&#125;</span>
   <span style="color: #008000;">&#125;</span>
  <span style="color: #666666;">// end of addition and subtraction</span>
  sum<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>diff<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>m<span style="color: #008080;">;</span>
  sum<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>diff<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>n<span style="color: #008080;">;</span>
  sum<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>s<span style="color: #000040;">-</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>
  diff<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>d<span style="color: #000040;">-</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>
&nbsp;
  <span style="color: #666666;">// displaying the sum matrix</span>
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>The sum is :<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>Row<span style="color: #000099; font-weight: bold;">\t</span>Column<span style="color: #000099; font-weight: bold;">\t</span>Element&quot;</span><span style="color: #008080;">;</span>
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>-----------------------<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
   <span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span>i<span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>i<span style="color: #000080;">&lt;</span>s<span style="color: #008080;">;</span>i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
   <span style="color: #008000;">&#123;</span>
      <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span>sum<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span><span style="color: #000080;">&lt;&lt;</span>sum<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span><span style="color: #000080;">&lt;&lt;</span>sum<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
   <span style="color: #008000;">&#125;</span>
    <span style="color: #666666;">// displaying the difference matrix</span>
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>The difference is :<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>Row<span style="color: #000099; font-weight: bold;">\t</span>Column<span style="color: #000099; font-weight: bold;">\t</span>Element&quot;</span><span style="color: #008080;">;</span>
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>-----------------------<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
   <span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span>i<span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>i<span style="color: #000080;">&lt;</span>d<span style="color: #008080;">;</span>i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
   <span style="color: #008000;">&#123;</span>
      <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span>diff<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span><span style="color: #000080;">&lt;&lt;</span>diff<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span><span style="color: #000080;">&lt;&lt;</span>diff<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
   <span style="color: #008000;">&#125;</span>
   getch<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
   <span style="color: #0000ff;">return</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span>
<span style="color: #666666;">//---------------------- END--------------------</span></pre></div></div>



<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-orkut">
			<a href="http://promote.orkut.com/preview?nt=orkut.com&amp;tt=C%2B%2B+Program+to+add+and+subtract+2+sparse+matrices&amp;du=http://arunmvishnu.com/programming/c-and-c/c-program-to-add-and-subtract-2-sparse-matrices.html&amp;cn=C%2B%2B%20Program%20to%20add%20and%20subtract%202%20sparse%20matrices.%0D%0A%0D%0A%2F%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%09%0D%0A%09Author%3A%20Arun%20Vishnu%20M%20V%0D%0A%09Web%3A%20www.arunmvishnu.com%0D%0A%09Description%3A%20C%2B%2B%20Program%20to%20add%20and%20subtract%202%20sparse%20matrices%0D%0A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A" rel="nofollow" title="Promote this on Orkut">Promote this on Orkut</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://arunmvishnu.com/programming/c-and-c/c-program-to-add-and-subtract-2-sparse-matrices.html&amp;t=C%2B%2B+Program+to+add+and+subtract+2+sparse+matrices" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://arunmvishnu.com/programming/c-and-c/c-program-to-add-and-subtract-2-sparse-matrices.html&amp;title=C%2B%2B+Program+to+add+and+subtract+2+sparse+matrices" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://arunmvishnu.com/programming/c-and-c/c-program-to-add-and-subtract-2-sparse-matrices.html&amp;title=C%2B%2B+Program+to+add+and+subtract+2+sparse+matrices" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=C%2B%2B+Program+to+add+and+subtract+2+sparse+matrices+-+http://arunmvishnu.com/programming/c-and-c/c-program-to-add-and-subtract-2-sparse-matrices.html+(via+@arunmvishnu)" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://arunmvishnu.com/programming/c-and-c/c-program-to-add-and-subtract-2-sparse-matrices.html&amp;title=C%2B%2B+Program+to+add+and+subtract+2+sparse+matrices" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-yahoobuzz">
			<a href="http://buzz.yahoo.com/submit/?submitUrl=http://arunmvishnu.com/programming/c-and-c/c-program-to-add-and-subtract-2-sparse-matrices.html&amp;submitHeadline=C%2B%2B+Program+to+add+and+subtract+2+sparse+matrices&amp;submitSummary=C%2B%2B%20Program%20to%20add%20and%20subtract%202%20sparse%20matrices.%0D%0A%0D%0A%2F%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%09%0D%0A%09Author%3A%20Arun%20Vishnu%20M%20V%0D%0A%09Web%3A%20www.arunmvishnu.com%0D%0A%09Description%3A%20C%2B%2B%20Program%20to%20add%20and%20subtract%202%20sparse%20matrices%0D%0A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A&amp;submitCategory=science&amp;submitAssetType=image" rel="nofollow" title="Buzz up!">Buzz up!</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://arunmvishnu.com/programming/c-and-c/c-program-to-add-and-subtract-2-sparse-matrices.html&amp;title=C%2B%2B+Program+to+add+and+subtract+2+sparse+matrices" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://arunmvishnu.com/programming/c-and-c/c-program-to-add-and-subtract-2-sparse-matrices.html" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-myspace">
			<a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://arunmvishnu.com/programming/c-and-c/c-program-to-add-and-subtract-2-sparse-matrices.html&amp;t=C%2B%2B+Program+to+add+and+subtract+2+sparse+matrices" rel="nofollow" title="Post this to MySpace">Post this to MySpace</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://arunmvishnu.com/programming/c-and-c/c-program-to-add-and-subtract-2-sparse-matrices.html/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://arunmvishnu.com/programming/c-and-c/c-program-to-add-and-subtract-2-sparse-matrices.html&amp;title=C%2B%2B+Program+to+add+and+subtract+2+sparse+matrices&amp;summary=C%2B%2B%20Program%20to%20add%20and%20subtract%202%20sparse%20matrices.%0D%0A%0D%0A%2F%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%09%0D%0A%09Author%3A%20Arun%20Vishnu%20M%20V%0D%0A%09Web%3A%20www.arunmvishnu.com%0D%0A%09Description%3A%20C%2B%2B%20Program%20to%20add%20and%20subtract%202%20sparse%20matrices%0D%0A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A&amp;source=bugs of a debugger" rel="nofollow" title="Share this on Linkedin">Share this on Linkedin</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://arunmvishnu.com/programming/c-and-c/c-program-to-add-and-subtract-2-sparse-matrices.html&amp;title=C%2B%2B+Program+to+add+and+subtract+2+sparse+matrices" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-friendfeed">
			<a href="http://www.friendfeed.com/share?title=C%2B%2B+Program+to+add+and+subtract+2+sparse+matrices&amp;link=http://arunmvishnu.com/programming/c-and-c/c-program-to-add-and-subtract-2-sparse-matrices.html" rel="nofollow" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
		<li class="sexy-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://arunmvishnu.com/programming/c-and-c/c-program-to-add-and-subtract-2-sparse-matrices.html&amp;t=C%2B%2B+Program+to+add+and+subtract+2+sparse+matrices" rel="nofollow" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="sexy-wikio">
			<a href="http://www.wikio.com/sharethis?url=http://arunmvishnu.com/programming/c-and-c/c-program-to-add-and-subtract-2-sparse-matrices.html&amp;title=C%2B%2B+Program+to+add+and+subtract+2+sparse+matrices" rel="nofollow" title="Share this on Wikio">Share this on Wikio</a>
		</li>
		<li class="sexy-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://arunmvishnu.com/programming/c-and-c/c-program-to-add-and-subtract-2-sparse-matrices.html&amp;title=C%2B%2B+Program+to+add+and+subtract+2+sparse+matrices" rel="nofollow" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://arunmvishnu.com/programming/c-and-c/c-program-to-add-and-subtract-2-sparse-matrices.html&amp;n=C%2B%2B+Program+to+add+and+subtract+2+sparse+matrices&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Farunmvishnu.com%2Fprogramming%2Fc-and-c%2Fc-program-to-add-and-subtract-2-sparse-matrices.html&amp;linkname=C%2B%2B%20Program%20to%20add%20and%20subtract%202%20sparse%20matrices"><img src="http://arunmvishnu.com/home/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://arunmvishnu.com/programming/c-and-c/c-program-to-add-and-subtract-2-sparse-matrices.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C++ Program to find the transpose of a Sparse matrix</title>
		<link>http://arunmvishnu.com/programming/c-and-c/c-program-find-the-transpose-of-a-sparse-matrix.html</link>
		<comments>http://arunmvishnu.com/programming/c-and-c/c-program-find-the-transpose-of-a-sparse-matrix.html#comments</comments>
		<pubDate>Thu, 27 Nov 2008 20:02:37 +0000</pubDate>
		<dc:creator>Arun Vishnu</dc:creator>
				<category><![CDATA[C and C++]]></category>
		<category><![CDATA[c and cpp]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[source code]]></category>

		<guid isPermaLink="false">http://arunmvishnu.com/?p=611</guid>
		<description><![CDATA[C++ Program to find the transpose of a Sparse matrix.

/**************************************************************	
	Author: Arun Vishnu M V
	Web: www.arunmvishnu.com
	Description: C++ Program to find the transpose of a Sparse matrix 
***************************************************************/
#include&#60;conio.h?  	
#include&#60;iostream.h? 
#include&#60;process.h?  
&#160;
void main&#40;&#41;
&#123;
   clrscr&#40;&#41;;
   int sparse&#91;10&#93;&#91;10&#93;,transpose&#91;10&#93;&#91;10&#93;;
   int m,n,p,q,t,col,element;
   int i,j;
   cout&#60;&#60;&#34;Enter the number of rows and [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>C++ Program to find the transpose of a Sparse matrix.</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #ff0000; font-style: italic;">/**************************************************************	
	Author: Arun Vishnu M V
	Web: www.arunmvishnu.com
	Description: C++ Program to find the transpose of a Sparse matrix 
***************************************************************/</span>
<span style="color: #339900;">#include&lt;conio.h?  	</span>
<span style="color: #339900;">#include&lt;iostream.h? </span>
<span style="color: #339900;">#include&lt;process.h?  </span>
&nbsp;
<span style="color: #0000ff;">void</span> main<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
   clrscr<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
   <span style="color: #0000ff;">int</span> sparse<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">10</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">10</span><span style="color: #008000;">&#93;</span>,transpose<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">10</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">10</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
   <span style="color: #0000ff;">int</span> m,n,p,q,t,col,element<span style="color: #008080;">;</span>
   <span style="color: #0000ff;">int</span> i,j<span style="color: #008080;">;</span>
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;Enter the number of rows and columns : &quot;</span><span style="color: #008080;">;</span>
   <span style="color: #0000dd;">cin</span><span style="color: #000080;">&gt;&gt;</span>m<span style="color: #000080;">&gt;&gt;</span>n<span style="color: #008080;">;</span>
   t<span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>
	<span style="color: #666666;">// assigning the value of matrix</span>
&nbsp;
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Enter the matrix:<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
   <span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span>i<span style="color: #000080;">=</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>i<span style="color: #000080;">&lt;=</span>m<span style="color: #008080;">;</span>i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
   <span style="color: #008000;">&#123;</span>
      <span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span>j<span style="color: #000080;">=</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>j<span style="color: #000080;">&lt;=</span>n<span style="color: #008080;">;</span>j<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
      <span style="color: #008000;">&#123;</span>
	 <span style="color: #0000dd;">cin</span><span style="color: #000080;">&gt;&gt;</span>element<span style="color: #008080;">;</span>
	 <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>element<span style="color: #000040;">!</span><span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span>
	 <span style="color: #008000;">&#123;</span>
	    t<span style="color: #000080;">=</span>t<span style="color: #000040;">+</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>
	    sparse<span style="color: #008000;">&#91;</span>t<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>i<span style="color: #008080;">;</span>
	    sparse<span style="color: #008000;">&#91;</span>t<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>j<span style="color: #008080;">;</span>
	    sparse<span style="color: #008000;">&#91;</span>t<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>element<span style="color: #008080;">;</span>
	 <span style="color: #008000;">&#125;</span>
      <span style="color: #008000;">&#125;</span>
   <span style="color: #008000;">&#125;</span>
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>The sparse matrix is :<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>Row<span style="color: #000099; font-weight: bold;">\t</span>Column<span style="color: #000099; font-weight: bold;">\t</span>Element&quot;</span><span style="color: #008080;">;</span>
&nbsp;
<span style="color: #666666;">// displaying the matrix of non-zero value</span>
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #000080;">&lt;&lt;</span>m<span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span><span style="color: #000080;">&lt;&lt;</span>n<span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span><span style="color: #000080;">&lt;&lt;</span>t<span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
   <span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span>i<span style="color: #000080;">=</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>i<span style="color: #000080;">&lt;=</span>t<span style="color: #008080;">;</span>i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
   <span style="color: #008000;">&#123;</span>
      <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span>sparse<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span><span style="color: #000080;">&lt;&lt;</span>sparse<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span><span style="color: #000080;">&lt;&lt;</span>sparse<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
   <span style="color: #008000;">&#125;</span>
   sparse<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>n<span style="color: #008080;">;</span> sparse<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>m<span style="color: #008080;">;</span> sparse<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>t<span style="color: #008080;">;</span>
   q<span style="color: #000080;">=</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>
&nbsp;
<span style="color: #666666;">// transpose of the matrix</span>
   <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>t<span style="color: #000080;">&gt;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span>
   <span style="color: #008000;">&#123;</span>
      <span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span>i<span style="color: #000080;">=</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>i<span style="color: #000080;">&lt;=</span>n<span style="color: #008080;">;</span>i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
      <span style="color: #008000;">&#123;</span>
	 <span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span>j<span style="color: #000080;">=</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>j<span style="color: #000080;">&lt;=</span>t<span style="color: #008080;">;</span>j<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
	 <span style="color: #008000;">&#123;</span>
	    <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>sparse<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">==</span>i<span style="color: #008000;">&#41;</span>
	    <span style="color: #008000;">&#123;</span>
		transpose<span style="color: #008000;">&#91;</span>q<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
		transpose<span style="color: #008000;">&#91;</span>q<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
		transpose<span style="color: #008000;">&#91;</span>q<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>sparse<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
		q<span style="color: #000080;">=</span>q<span style="color: #000040;">+</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>
	    <span style="color: #008000;">&#125;</span>
	 <span style="color: #008000;">&#125;</span>
      <span style="color: #008000;">&#125;</span>
   <span style="color: #008000;">&#125;</span>
&nbsp;
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>The transpose of the sparse matrix :<span style="color: #000099; font-weight: bold;">\n</span> &quot;</span><span style="color: #008080;">;</span>
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Row<span style="color: #000099; font-weight: bold;">\t</span>Column<span style="color: #000099; font-weight: bold;">\t</span>Element<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
   <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span>sparse<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span><span style="color: #000080;">&lt;&lt;</span>sparse<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span><span style="color: #000080;">&lt;&lt;</span>sparse<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
   <span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span>i<span style="color: #000080;">=</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>i<span style="color: #000080;">&lt;=</span>t<span style="color: #008080;">;</span>i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
   <span style="color: #008000;">&#123;</span>
      <span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span>transpose<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span><span style="color: #000080;">&lt;&lt;</span>transpose<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span><span style="color: #000080;">&lt;&lt;</span>transpose<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
   <span style="color: #008000;">&#125;</span>
   getch<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span>
<span style="color: #666666;">//---------------------- END--------------------</span></pre></div></div>



<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-orkut">
			<a href="http://promote.orkut.com/preview?nt=orkut.com&amp;tt=C%2B%2B+Program+to+find+the+transpose+of+a+Sparse+matrix&amp;du=http://arunmvishnu.com/programming/c-and-c/c-program-find-the-transpose-of-a-sparse-matrix.html&amp;cn=C%2B%2B%20Program%20to%20find%20the%20transpose%20of%20a%20Sparse%20matrix.%0D%0A%0D%0A%2F%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%09%0D%0A%09Author%3A%20Arun%20Vishnu%20M%20V%0D%0A%09Web%3A%20www.arunmvishnu.com%0D%0A%09Description%3A%20C%2B%2B%20Program%20to%20find%20the%20transpose%20of%20a%20Sparse%20matrix%20%0D%0A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A" rel="nofollow" title="Promote this on Orkut">Promote this on Orkut</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://arunmvishnu.com/programming/c-and-c/c-program-find-the-transpose-of-a-sparse-matrix.html&amp;t=C%2B%2B+Program+to+find+the+transpose+of+a+Sparse+matrix" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://arunmvishnu.com/programming/c-and-c/c-program-find-the-transpose-of-a-sparse-matrix.html&amp;title=C%2B%2B+Program+to+find+the+transpose+of+a+Sparse+matrix" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://arunmvishnu.com/programming/c-and-c/c-program-find-the-transpose-of-a-sparse-matrix.html&amp;title=C%2B%2B+Program+to+find+the+transpose+of+a+Sparse+matrix" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=C%2B%2B+Program+to+find+the+transpose+of+a+Sparse+matrix+-+http://arunmvishnu.com/programming/c-and-c/c-program-find-the-transpose-of-a-sparse-matrix.html+(via+@arunmvishnu)" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://arunmvishnu.com/programming/c-and-c/c-program-find-the-transpose-of-a-sparse-matrix.html&amp;title=C%2B%2B+Program+to+find+the+transpose+of+a+Sparse+matrix" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-yahoobuzz">
			<a href="http://buzz.yahoo.com/submit/?submitUrl=http://arunmvishnu.com/programming/c-and-c/c-program-find-the-transpose-of-a-sparse-matrix.html&amp;submitHeadline=C%2B%2B+Program+to+find+the+transpose+of+a+Sparse+matrix&amp;submitSummary=C%2B%2B%20Program%20to%20find%20the%20transpose%20of%20a%20Sparse%20matrix.%0D%0A%0D%0A%2F%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%09%0D%0A%09Author%3A%20Arun%20Vishnu%20M%20V%0D%0A%09Web%3A%20www.arunmvishnu.com%0D%0A%09Description%3A%20C%2B%2B%20Program%20to%20find%20the%20transpose%20of%20a%20Sparse%20matrix%20%0D%0A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A&amp;submitCategory=science&amp;submitAssetType=image" rel="nofollow" title="Buzz up!">Buzz up!</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://arunmvishnu.com/programming/c-and-c/c-program-find-the-transpose-of-a-sparse-matrix.html&amp;title=C%2B%2B+Program+to+find+the+transpose+of+a+Sparse+matrix" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://arunmvishnu.com/programming/c-and-c/c-program-find-the-transpose-of-a-sparse-matrix.html" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-myspace">
			<a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://arunmvishnu.com/programming/c-and-c/c-program-find-the-transpose-of-a-sparse-matrix.html&amp;t=C%2B%2B+Program+to+find+the+transpose+of+a+Sparse+matrix" rel="nofollow" title="Post this to MySpace">Post this to MySpace</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://arunmvishnu.com/programming/c-and-c/c-program-find-the-transpose-of-a-sparse-matrix.html/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://arunmvishnu.com/programming/c-and-c/c-program-find-the-transpose-of-a-sparse-matrix.html&amp;title=C%2B%2B+Program+to+find+the+transpose+of+a+Sparse+matrix&amp;summary=C%2B%2B%20Program%20to%20find%20the%20transpose%20of%20a%20Sparse%20matrix.%0D%0A%0D%0A%2F%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%09%0D%0A%09Author%3A%20Arun%20Vishnu%20M%20V%0D%0A%09Web%3A%20www.arunmvishnu.com%0D%0A%09Description%3A%20C%2B%2B%20Program%20to%20find%20the%20transpose%20of%20a%20Sparse%20matrix%20%0D%0A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A&amp;source=bugs of a debugger" rel="nofollow" title="Share this on Linkedin">Share this on Linkedin</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://arunmvishnu.com/programming/c-and-c/c-program-find-the-transpose-of-a-sparse-matrix.html&amp;title=C%2B%2B+Program+to+find+the+transpose+of+a+Sparse+matrix" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-friendfeed">
			<a href="http://www.friendfeed.com/share?title=C%2B%2B+Program+to+find+the+transpose+of+a+Sparse+matrix&amp;link=http://arunmvishnu.com/programming/c-and-c/c-program-find-the-transpose-of-a-sparse-matrix.html" rel="nofollow" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
		<li class="sexy-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://arunmvishnu.com/programming/c-and-c/c-program-find-the-transpose-of-a-sparse-matrix.html&amp;t=C%2B%2B+Program+to+find+the+transpose+of+a+Sparse+matrix" rel="nofollow" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="sexy-wikio">
			<a href="http://www.wikio.com/sharethis?url=http://arunmvishnu.com/programming/c-and-c/c-program-find-the-transpose-of-a-sparse-matrix.html&amp;title=C%2B%2B+Program+to+find+the+transpose+of+a+Sparse+matrix" rel="nofollow" title="Share this on Wikio">Share this on Wikio</a>
		</li>
		<li class="sexy-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://arunmvishnu.com/programming/c-and-c/c-program-find-the-transpose-of-a-sparse-matrix.html&amp;title=C%2B%2B+Program+to+find+the+transpose+of+a+Sparse+matrix" rel="nofollow" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://arunmvishnu.com/programming/c-and-c/c-program-find-the-transpose-of-a-sparse-matrix.html&amp;n=C%2B%2B+Program+to+find+the+transpose+of+a+Sparse+matrix&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Farunmvishnu.com%2Fprogramming%2Fc-and-c%2Fc-program-find-the-transpose-of-a-sparse-matrix.html&amp;linkname=C%2B%2B%20Program%20to%20find%20the%20transpose%20of%20a%20Sparse%20matrix"><img src="http://arunmvishnu.com/home/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://arunmvishnu.com/programming/c-and-c/c-program-find-the-transpose-of-a-sparse-matrix.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C++ Program to implement a single linked list</title>
		<link>http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-single-linked-list.html</link>
		<comments>http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-single-linked-list.html#comments</comments>
		<pubDate>Thu, 27 Nov 2008 20:01:05 +0000</pubDate>
		<dc:creator>Arun Vishnu</dc:creator>
				<category><![CDATA[C and C++]]></category>
		<category><![CDATA[c and cpp]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[source code]]></category>

		<guid isPermaLink="false">http://arunmvishnu.com/?p=609</guid>
		<description><![CDATA[C++ Program to implement a single linked list and Perform the following operations.

/**************************************************************	
	Author: Arun Vishnu M V
	Web: www.arunmvishnu.com
	Description: C++ Program to implement a single linked list and Perform the following operations
		 1: Insertioin
		 2: Deletion
         3: Display
***************************************************************/
#include&#60;conio.h&#62;   	
#include&#60;iostream.h&#62; 
#include&#60;process.h&#62;  
&#160;
//   Creating a [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>C++ Program to implement a single linked list and Perform the following operations.</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #ff0000; font-style: italic;">/**************************************************************	
	Author: Arun Vishnu M V
	Web: www.arunmvishnu.com
	Description: C++ Program to implement a single linked list and Perform the following operations
		 1: Insertioin
		 2: Deletion
         3: Display
***************************************************************/</span>
<span style="color: #339900;">#include&lt;conio.h&gt;   	</span>
<span style="color: #339900;">#include&lt;iostream.h&gt; </span>
<span style="color: #339900;">#include&lt;process.h&gt;  </span>
&nbsp;
<span style="color: #666666;">//   Creating a NODE Structure</span>
<span style="color: #0000ff;">struct</span> node
<span style="color: #008000;">&#123;</span>
	<span style="color: #0000ff;">int</span> data<span style="color: #008080;">;</span>  <span style="color: #666666;">// data</span>
	<span style="color: #0000ff;">struct</span> node <span style="color: #000040;">*</span>next,<span style="color: #000040;">*</span>start<span style="color: #008080;">;</span> <span style="color: #666666;">//  link to next node and previous node</span>
<span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span>
&nbsp;
<span style="color: #666666;">// Creating a class LIST</span>
<span style="color: #0000ff;">class</span> list
<span style="color: #008000;">&#123;</span>
	<span style="color: #0000ff;">struct</span> node <span style="color: #000040;">*</span>start<span style="color: #008080;">;</span>
	<span style="color: #0000ff;">public</span><span style="color: #008080;">:</span>
		<span style="color: #0000ff;">void</span> create<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">// to create a list</span>
		<span style="color: #0000ff;">void</span> insert<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>  <span style="color: #666666;">// insertion</span>
		<span style="color: #0000ff;">void</span> del<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>    <span style="color: #666666;">// deletion</span>
		<span style="color: #0000ff;">void</span> show<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>   <span style="color: #666666;">// show</span>
<span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span>
<span style="color: #666666;">// Creating a new node</span>
<span style="color: #0000ff;">void</span> list<span style="color: #008080;">::</span><span style="color: #007788;">create</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
	<span style="color: #0000ff;">struct</span> node <span style="color: #000040;">*</span>nxt_node,<span style="color: #000040;">*</span>pre_node<span style="color: #008080;">;</span>
	<span style="color: #0000ff;">int</span> value,no,i<span style="color: #008080;">;</span>
	start<span style="color: #000080;">=</span>nxt_node<span style="color: #000080;">=</span>pre_node<span style="color: #000080;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #008080;">;</span>
	<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>CREATING A NEW LIST.........<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>How many nodes : &quot;</span><span style="color: #008080;">;</span>
	<span style="color: #0000dd;">cin</span><span style="color: #000080;">&gt;&gt;</span>no<span style="color: #008080;">;</span>
	<span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span>i<span style="color: #000080;">=</span><span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>i<span style="color: #000080;">&lt;=</span>no<span style="color: #008080;">;</span>i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
	<span style="color: #008000;">&#123;</span>
		<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;Enter &quot;</span><span style="color: #000080;">&lt;&lt;</span>no<span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot; DATAs: &quot;</span><span style="color: #008080;">;</span>
		<span style="color: #0000dd;">cin</span><span style="color: #000080;">&gt;&gt;</span>value<span style="color: #008080;">;</span>
		nxt_node<span style="color: #000080;">=</span><span style="color: #0000dd;">new</span> node<span style="color: #008080;">;</span>
		<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>pre_node<span style="color: #000040;">!</span><span style="color: #000080;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #008000;">&#41;</span>
			pre_node<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #000080;">=</span>nxt_node<span style="color: #008080;">;</span>
		<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>start<span style="color: #000080;">==</span><span style="color: #0000ff;">NULL</span><span style="color: #008000;">&#41;</span>
		  start<span style="color: #000080;">=</span>nxt_node<span style="color: #008080;">;</span>
		nxt_node<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>data<span style="color: #000080;">=</span>value<span style="color: #008080;">;</span>
		nxt_node<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #000080;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #008080;">;</span>
		pre_node<span style="color: #000080;">=</span>nxt_node<span style="color: #008080;">;</span>
	<span style="color: #008000;">&#125;</span>
	<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>The list is created!&quot;</span><span style="color: #008080;">;</span>
	show<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #666666;">// Displaying LIST</span>
<span style="color: #0000ff;">void</span> list<span style="color: #008080;">::</span><span style="color: #007788;">show</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
	<span style="color: #0000ff;">int</span> data<span style="color: #008080;">;</span>
	<span style="color: #0000ff;">struct</span> node <span style="color: #000040;">*</span>ptr<span style="color: #000080;">=</span>start<span style="color: #008080;">;</span>
	<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>The List is <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
	<span style="color: #0000ff;">while</span><span style="color: #008000;">&#40;</span>ptr<span style="color: #000040;">!</span><span style="color: #000080;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #008000;">&#41;</span>
	<span style="color: #008000;">&#123;</span>
		data<span style="color: #000080;">=</span>ptr<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>data<span style="color: #008080;">;</span>
		<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span>data<span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot; -&gt; &quot;</span><span style="color: #008080;">;</span>
		ptr<span style="color: #000080;">=</span>ptr<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #008080;">;</span>
	<span style="color: #008000;">&#125;</span>
	<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\b</span><span style="color: #000099; font-weight: bold;">\b</span><span style="color: #000099; font-weight: bold;">\b</span>   &quot;</span><span style="color: #008080;">;</span>
	getch<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #666666;">// Insert node at any position</span>
<span style="color: #0000ff;">void</span> list<span style="color: #008080;">::</span><span style="color: #007788;">insert</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
	<span style="color: #0000ff;">int</span> position,dat<span style="color: #008080;">;</span>
	<span style="color: #0000ff;">struct</span> node <span style="color: #000040;">*</span>ptr_b,<span style="color: #000040;">*</span>ptr_f,<span style="color: #000040;">*</span>ptr,<span style="color: #000040;">*</span>nxt_node,<span style="color: #000040;">*</span>pre_node<span style="color: #008080;">;</span>
	<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Insertion of a new node <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
	<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;Enter the DATA after which the new node is to be inserted.<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
	<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;[ If the data is not found the new node will be&quot;</span><span style="color: #008080;">;</span>
	<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot; created at first ]<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\t</span>-&gt;:  &quot;</span><span style="color: #008080;">;</span>
	<span style="color: #0000dd;">cin</span><span style="color: #000080;">&gt;&gt;</span>position<span style="color: #008080;">;</span>
	<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;Enter the data to insert: &quot;</span><span style="color: #008080;">;</span>
	<span style="color: #0000dd;">cin</span><span style="color: #000080;">&gt;&gt;</span>dat<span style="color: #008080;">;</span>
	ptr_b<span style="color: #000080;">=</span>start<span style="color: #008080;">;</span>
	ptr<span style="color: #000080;">=</span><span style="color: #0000dd;">new</span> node<span style="color: #008080;">;</span>
	ptr<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>data<span style="color: #000080;">=</span>dat<span style="color: #008080;">;</span>
	<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>start<span style="color: #000040;">!</span><span style="color: #000080;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #008000;">&#41;</span>
	<span style="color: #008000;">&#123;</span>
		<span style="color: #0000ff;">while</span><span style="color: #008000;">&#40;</span>ptr_b<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #000040;">!</span><span style="color: #000080;">=</span><span style="color: #0000ff;">NULL</span> <span style="color: #000040;">&amp;&amp;</span> ptr_b<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>data<span style="color: #000040;">!</span><span style="color: #000080;">=</span>position<span style="color: #008000;">&#41;</span>
		<span style="color: #008000;">&#123;</span>
			ptr_b<span style="color: #000080;">=</span>ptr_b<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #008080;">;</span>
		<span style="color: #008000;">&#125;</span>
	<span style="color: #008000;">&#125;</span>
	<span style="color: #0000ff;">else</span>
	<span style="color: #008000;">&#123;</span>
		clrscr<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
		start<span style="color: #000080;">=</span>nxt_node<span style="color: #000080;">=</span>pre_node<span style="color: #000080;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #008080;">;</span>
		nxt_node<span style="color: #000080;">=</span><span style="color: #0000dd;">new</span> node<span style="color: #008080;">;</span>
		<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>pre_node<span style="color: #000040;">!</span><span style="color: #000080;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #008000;">&#41;</span>
			pre_node<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #000080;">=</span>nxt_node<span style="color: #008080;">;</span>
		<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>start<span style="color: #000080;">==</span><span style="color: #0000ff;">NULL</span><span style="color: #008000;">&#41;</span>
		  start<span style="color: #000080;">=</span>nxt_node<span style="color: #008080;">;</span>
		nxt_node<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>data<span style="color: #000080;">=</span>dat<span style="color: #008080;">;</span>
		nxt_node<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #000080;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #008080;">;</span>
		pre_node<span style="color: #000080;">=</span>nxt_node<span style="color: #008080;">;</span>
		<span style="color: #0000ff;">return</span><span style="color: #008080;">;</span>
	<span style="color: #008000;">&#125;</span>
	<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>ptr_b<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #000080;">==</span><span style="color: #0000ff;">NULL</span> <span style="color: #000040;">&amp;&amp;</span> ptr_b<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>data<span style="color: #000040;">!</span><span style="color: #000080;">=</span>position<span style="color: #008000;">&#41;</span>
	<span style="color: #666666;">//Insertion at first</span>
	<span style="color: #008000;">&#123;</span>
		ptr<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #000080;">=</span>start<span style="color: #008080;">;</span>
		start<span style="color: #000080;">=</span>ptr<span style="color: #008080;">;</span>
	<span style="color: #008000;">&#125;</span>
	<span style="color: #0000ff;">else</span> <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>ptr_b<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #000080;">==</span><span style="color: #0000ff;">NULL</span> <span style="color: #000040;">&amp;&amp;</span> ptr_b<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>data<span style="color: #000080;">==</span>position<span style="color: #008000;">&#41;</span>
	<span style="color: #666666;">//insertion at the end of list</span>
	<span style="color: #008000;">&#123;</span>
		ptr_b<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #000080;">=</span>ptr<span style="color: #008080;">;</span>
		ptr<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #000080;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #008080;">;</span>
 	<span style="color: #008000;">&#125;</span>
	<span style="color: #0000ff;">else</span>
	<span style="color: #666666;">//Insertion between two nodes</span>
	<span style="color: #008000;">&#123;</span>
		ptr_f<span style="color: #000080;">=</span>ptr_b<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #008080;">;</span>
		ptr<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #000080;">=</span>ptr_b<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #008080;">;</span>
		ptr_b<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #000080;">=</span>ptr<span style="color: #008080;">;</span>
	<span style="color: #008000;">&#125;</span>
	<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>New node is inserted!!&quot;</span><span style="color: #008080;">;</span>
	getch<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span>  <span style="color: #666666;">//End of insertion</span>
&nbsp;
<span style="color: #666666;">//Delete node from any position</span>
<span style="color: #0000ff;">void</span> list<span style="color: #008080;">::</span><span style="color: #007788;">del</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
	<span style="color: #0000ff;">int</span> position,dat<span style="color: #008080;">;</span>
	<span style="color: #0000ff;">struct</span> node <span style="color: #000040;">*</span>ptr_b,<span style="color: #000040;">*</span>ptr_f,<span style="color: #000040;">*</span>ptr,<span style="color: #000040;">*</span>pntr<span style="color: #008080;">;</span>
	<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;Enter the data to be beleted: &quot;</span><span style="color: #008080;">;</span>
	<span style="color: #0000dd;">cin</span><span style="color: #000080;">&gt;&gt;</span>position<span style="color: #008080;">;</span>
	ptr<span style="color: #000080;">=</span>start<span style="color: #008080;">;</span>
	<span style="color: #0000ff;">while</span><span style="color: #008000;">&#40;</span>ptr<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #000040;">!</span><span style="color: #000080;">=</span><span style="color: #0000ff;">NULL</span> <span style="color: #000040;">&amp;&amp;</span> ptr<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>data<span style="color: #000040;">!</span><span style="color: #000080;">=</span>position<span style="color: #008000;">&#41;</span>
	<span style="color: #008000;">&#123;</span>
		pntr<span style="color: #000080;">=</span>ptr<span style="color: #008080;">;</span>
		ptr<span style="color: #000080;">=</span>ptr<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #008080;">;</span>
	<span style="color: #008000;">&#125;</span>
	<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>ptr<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #000080;">==</span><span style="color: #0000ff;">NULL</span> <span style="color: #000040;">&amp;&amp;</span> ptr<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>data<span style="color: #000040;">!</span><span style="color: #000080;">=</span>position<span style="color: #008000;">&#41;</span>
	<span style="color: #666666;">//Data not found</span>
	<span style="color: #008000;">&#123;</span>
		<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Data not found!!&quot;</span><span style="color: #008080;">;</span>
		getch<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
		<span style="color: #0000ff;">return</span><span style="color: #008080;">;</span>
	<span style="color: #008000;">&#125;</span>
	<span style="color: #0000ff;">else</span> <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>ptr<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #000080;">==</span><span style="color: #0000ff;">NULL</span> <span style="color: #000040;">&amp;&amp;</span> ptr<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>data<span style="color: #000080;">==</span>position<span style="color: #008000;">&#41;</span>
	<span style="color: #666666;">//Deletion from the end of list</span>
	<span style="color: #008000;">&#123;</span>
		ptr_b<span style="color: #000080;">=</span>pntr<span style="color: #008080;">;</span>
		<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>pntr<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #008000;">&#41;</span><span style="color: #666666;">//  Only one node</span>
			start<span style="color: #000080;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #008080;">;</span>
		dat<span style="color: #000080;">=</span>ptr<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>data<span style="color: #008080;">;</span>
		ptr_b<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #000080;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #008080;">;</span>
	<span style="color: #008000;">&#125;</span>
	<span style="color: #0000ff;">else</span>
	<span style="color: #666666;">//Deletion between two nodes or first node</span>
	<span style="color: #008000;">&#123;</span>
		dat<span style="color: #000080;">=</span>ptr<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>data<span style="color: #008080;">;</span>
		<span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>start<span style="color: #000080;">==</span>ptr<span style="color: #008000;">&#41;</span>  <span style="color: #666666;">// delete first node</span>
		<span style="color: #008000;">&#123;</span>
			start<span style="color: #000080;">=</span>ptr<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #008080;">;</span>
			ptr_f<span style="color: #000080;">=</span>start<span style="color: #008080;">;</span>
		<span style="color: #008000;">&#125;</span>
		<span style="color: #0000ff;">else</span> <span style="color: #666666;">// Deletion between two nodes</span>
		<span style="color: #008000;">&#123;</span>
			dat<span style="color: #000080;">=</span>ptr<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>data<span style="color: #008080;">;</span>
			ptr_b<span style="color: #000080;">=</span>pntr<span style="color: #008080;">;</span>
			ptr_b<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #000080;">=</span>ptr<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>next<span style="color: #008080;">;</span>
			<span style="color: #666666;">//ptr_f=ptr_b-&gt;next;</span>
		<span style="color: #008000;">&#125;</span>
	<span style="color: #008000;">&#125;</span>
	<span style="color: #0000dd;">delete</span> ptr<span style="color: #008080;">;</span>
	<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>The node is deleted!!<span style="color: #000099; font-weight: bold;">\n</span>Data= &quot;</span><span style="color: #000080;">&lt;&lt;</span>dat<span style="color: #008080;">;</span>
	getch<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span>  <span style="color: #666666;">//End of deletion</span>
&nbsp;
&nbsp;
<span style="color: #666666;">// Main function</span>
<span style="color: #0000ff;">int</span> main<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
	clrscr<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
	list l<span style="color: #008080;">;</span>
	l.<span style="color: #007788;">create</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">// to create a new node</span>
	<span style="color: #0000ff;">int</span> choice<span style="color: #008080;">;</span>
	<span style="color: #0000ff;">while</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span>
	<span style="color: #008000;">&#123;</span>
		<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>-------------------------------------------&quot;</span><span style="color: #008080;">;</span>
		<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span> LINKED LIST<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #008080;">;</span>
		<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;1:Insertion<span style="color: #000099; font-weight: bold;">\n</span>2:Deletion<span style="color: #000099; font-weight: bold;">\n</span>3:Display List<span style="color: #000099; font-weight: bold;">\n</span>4:Exit&quot;</span><span style="color: #008080;">;</span>
		<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Enter your choice(1-4): &quot;</span><span style="color: #008080;">;</span>
		<span style="color: #0000dd;">cin</span><span style="color: #000080;">&gt;&gt;</span>choice<span style="color: #008080;">;</span>
		<span style="color: #0000ff;">switch</span><span style="color: #008000;">&#40;</span>choice<span style="color: #008000;">&#41;</span>
		<span style="color: #008000;">&#123;</span>
		 <span style="color: #0000ff;">case</span> <span style="color: #0000dd;">1</span><span style="color: #008080;">:</span>  <span style="color: #666666;">// Insertion</span>
			l.<span style="color: #007788;">insert</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
			 <span style="color: #0000ff;">break</span><span style="color: #008080;">;</span>
		 <span style="color: #0000ff;">case</span> <span style="color: #0000dd;">2</span><span style="color: #008080;">:</span>   <span style="color: #666666;">// Deletion</span>
			l.<span style="color: #007788;">del</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
			<span style="color: #0000ff;">break</span><span style="color: #008080;">;</span>   
		 <span style="color: #0000ff;">case</span> <span style="color: #0000dd;">3</span><span style="color: #008080;">:</span>  <span style="color: #666666;">// Display</span>
			l.<span style="color: #007788;">show</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
			<span style="color: #0000ff;">break</span><span style="color: #008080;">;</span>
		 <span style="color: #0000ff;">case</span> <span style="color: #0000dd;">4</span><span style="color: #008080;">:</span>  <span style="color: #666666;">// Exit</span>
			<span style="color: #0000dd;">exit</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
			<span style="color: #0000ff;">break</span><span style="color: #008080;">;</span>
		 <span style="color: #0000ff;">default</span><span style="color: #008080;">:</span>
			<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;Please enter correct choice(1-4)!!&quot;</span><span style="color: #008080;">;</span>
		 getch<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
		 <span style="color: #0000ff;">break</span><span style="color: #008080;">;</span>
		<span style="color: #008000;">&#125;</span>
	<span style="color: #008000;">&#125;</span>
	<span style="color: #0000ff;">return</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span>
<span style="color: #666666;">//---------------------- END--------------------</span></pre></div></div>



<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-orkut">
			<a href="http://promote.orkut.com/preview?nt=orkut.com&amp;tt=C%2B%2B+Program+to+implement+a+single+linked+list&amp;du=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-single-linked-list.html&amp;cn=C%2B%2B%20Program%20to%20implement%20a%20single%20linked%20list%20and%20Perform%20the%20following%20operations.%0D%0A%0D%0A%2F%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%09%0D%0A%09Author%3A%20Arun%20Vishnu%20M%20V%0D%0A%09Web%3A%20www.arunmvishnu.com%0D%0A%09Description%3A%20C%2B%2B%20Program%20to%20implement%20a%20single%20linked%20list%20and%20Perform%20the%20following%20operatio" rel="nofollow" title="Promote this on Orkut">Promote this on Orkut</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-single-linked-list.html&amp;t=C%2B%2B+Program+to+implement+a+single+linked+list" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-single-linked-list.html&amp;title=C%2B%2B+Program+to+implement+a+single+linked+list" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-single-linked-list.html&amp;title=C%2B%2B+Program+to+implement+a+single+linked+list" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=C%2B%2B+Program+to+implement+a+single+linked+list+-+http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-single-linked-list.html+(via+@arunmvishnu)" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-single-linked-list.html&amp;title=C%2B%2B+Program+to+implement+a+single+linked+list" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-yahoobuzz">
			<a href="http://buzz.yahoo.com/submit/?submitUrl=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-single-linked-list.html&amp;submitHeadline=C%2B%2B+Program+to+implement+a+single+linked+list&amp;submitSummary=C%2B%2B%20Program%20to%20implement%20a%20single%20linked%20list%20and%20Perform%20the%20following%20operations.%0D%0A%0D%0A%2F%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%09%0D%0A%09Author%3A%20Arun%20Vishnu%20M%20V%0D%0A%09Web%3A%20www.arunmvishnu.com%0D%0A%09Description%3A%20C%2B%2B%20Program%20to%20implement%20a%20single%20linked%20list%20and%20Perform%20the%20following%20operatio&amp;submitCategory=science&amp;submitAssetType=image" rel="nofollow" title="Buzz up!">Buzz up!</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-single-linked-list.html&amp;title=C%2B%2B+Program+to+implement+a+single+linked+list" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-single-linked-list.html" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-myspace">
			<a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-single-linked-list.html&amp;t=C%2B%2B+Program+to+implement+a+single+linked+list" rel="nofollow" title="Post this to MySpace">Post this to MySpace</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-single-linked-list.html/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-single-linked-list.html&amp;title=C%2B%2B+Program+to+implement+a+single+linked+list&amp;summary=C%2B%2B%20Program%20to%20implement%20a%20single%20linked%20list%20and%20Perform%20the%20following%20operations.%0D%0A%0D%0A%2F%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%2A%09%0D%0A%09Author%3A%20Arun%20Vishnu%20M%20V%0D%0A%09Web%3A%20www.arunmvishnu.com%0D%0A%09Description%3A%20C%2B%2B%20Program%20to%20implement%20a%20single%20linked%20list%20and%20Perform%20the%20following%20operatio&amp;source=bugs of a debugger" rel="nofollow" title="Share this on Linkedin">Share this on Linkedin</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-single-linked-list.html&amp;title=C%2B%2B+Program+to+implement+a+single+linked+list" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-friendfeed">
			<a href="http://www.friendfeed.com/share?title=C%2B%2B+Program+to+implement+a+single+linked+list&amp;link=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-single-linked-list.html" rel="nofollow" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
		<li class="sexy-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-single-linked-list.html&amp;t=C%2B%2B+Program+to+implement+a+single+linked+list" rel="nofollow" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="sexy-wikio">
			<a href="http://www.wikio.com/sharethis?url=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-single-linked-list.html&amp;title=C%2B%2B+Program+to+implement+a+single+linked+list" rel="nofollow" title="Share this on Wikio">Share this on Wikio</a>
		</li>
		<li class="sexy-slashdot">
			<a href="http://slashdot.org/bookmark.pl?url=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-single-linked-list.html&amp;title=C%2B%2B+Program+to+implement+a+single+linked+list" rel="nofollow" title="Submit this to SlashDot">Submit this to SlashDot</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-single-linked-list.html&amp;n=C%2B%2B+Program+to+implement+a+single+linked+list&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Farunmvishnu.com%2Fprogramming%2Fc-and-c%2Fc-program-to-implement-a-single-linked-list.html&amp;linkname=C%2B%2B%20Program%20to%20implement%20a%20single%20linked%20list"><img src="http://arunmvishnu.com/home/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://arunmvishnu.com/programming/c-and-c/c-program-to-implement-a-single-linked-list.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching using disk

Served from: server1.shellboy.com @ 2010-09-09 23:29:23 -->