<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Lab Programs for Students of Anna University of Technology - Roy Brothers</title>
	<atom:link href="http://labprograms.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://labprograms.wordpress.com</link>
	<description>Photon Soft Solutions</description>
	<lastBuildDate>Fri, 25 Nov 2011 15:31:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='labprograms.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Lab Programs for Students of Anna University of Technology - Roy Brothers</title>
		<link>http://labprograms.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://labprograms.wordpress.com/osd.xml" title="Lab Programs for Students of Anna University of Technology - Roy Brothers" />
	<atom:link rel='hub' href='http://labprograms.wordpress.com/?pushpress=hub'/>
		<item>
		<title>MOTOROLA SCHOLAR PROGRAM : 2011-12</title>
		<link>http://labprograms.wordpress.com/2011/11/16/motorola-scholar-program-2011-12/</link>
		<comments>http://labprograms.wordpress.com/2011/11/16/motorola-scholar-program-2011-12/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 17:14:05 +0000</pubDate>
		<dc:creator>இராய் அந்தோனி அர்னால்டு</dc:creator>
				<category><![CDATA[News_Students]]></category>
		<category><![CDATA[Scholarship]]></category>
		<category><![CDATA[Special]]></category>
		<category><![CDATA[Students]]></category>

		<guid isPermaLink="false">http://labprograms.wordpress.com/?p=534</guid>
		<description><![CDATA[Dear All, MOTOROLA SCHOLAR PROGRAM : 2011-12 Website : www.faer.ac.in FAER announces the Motorola Scholar program to select scholars from engineering colleges based on a project work in the areas of 1) Computer Science and IT 2) Communications 3) Renewable Energy Systems 4) resources 5) Rural technologies 6) Health care Technologies 7) Labour saving Technologies for Women Ecology and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labprograms.wordpress.com&amp;blog=8434488&amp;post=534&amp;subd=labprograms&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Dear All,</p>
<p>MOTOROLA SCHOLAR PROGRAM : 2011-12<br />
Website : <a href="http://www.faer.ac.in/" rel="nofollow" target="_blank">www.faer.ac.in</a></p>
<p>FAER announces the Motorola Scholar program to select scholars from engineering colleges based on a project work in the areas of</p>
<p>1) Computer Science and IT</p>
<p>2) Communications</p>
<p>3) Renewable Energy Systems</p>
<p>4) resources</p>
<p>5) Rural technologies</p>
<p>6) Health care Technologies</p>
<p>7) Labour saving Technologies for Women</p>
<p> <img src='http://s0.wp.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> Ecology and Environment 9) Applications.</p>
<p>Selections will be done by Foundation for Advancement for Education and Research (FAER). It consists of two stages.</p>
<p>Stage 1 : FAER will receive project proposals from students in engineering colleges, screen them with the help of experts and select projects for<br />
funding. An amount to a maximum of Rs. 5000/- will be reimbursed to the project team after their completion of the project.</p>
<p>Stage 2 : Selection of “Motorola Scholars” based on the evaluation of the completed projects through a Seminar-cum-Exhibition and best projects will be awarded with Cash Prize and Certificates in Motorola Scholar Awards Presentation Function.</p>
<p>There will be a special award for students from disadvantaged sections.</p>
<p>Last date for receipt of hardcopy of the proposals for projects : 15th December 2011</p>
<p>Project Approvals by FAER : 16th February 2012</p>
<p><strong>Prizes:</strong></p>
<p><strong><em>First Prize : Rs. 1,00,000/-</em></strong><br />
<strong><em>Second Prize : Rs. 75,000/-</em></strong><br />
<strong><em>Third Prize : Rs. 50,000/-</em></strong><br />
<strong><em>Special Award : Rs. 25,000/-</em></strong></p>
<p>Bonafide students doing B.E. / M.C.A. courses in final year are eligible to participate in this contest. Students should be studying in a<br />
recognized college / institute / university.</p>
<p>For further details, format for submitting project proposals please visit FAER website.</p>
<p>Foundation for Advancement of Education and Research<br />
G5, Swiss Complex, 33, Race Course Road, Bangalore- 560001<br />
E-mail: <a href="mailto:office%40faer.ac.in" rel="nofollow" target="_blank">office@faer.ac.in</a> , Website: <a href="http://www.faer.ac.in/" rel="nofollow" target="_blank">www.faer.ac.in</a></p>
<p>Best Wishes!</p>
<br />Filed under: <a href='http://labprograms.wordpress.com/category/news_students/'>News_Students</a> Tagged: <a href='http://labprograms.wordpress.com/tag/scholarship/'>Scholarship</a>, <a href='http://labprograms.wordpress.com/tag/special/'>Special</a>, <a href='http://labprograms.wordpress.com/tag/students/'>Students</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/labprograms.wordpress.com/534/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/labprograms.wordpress.com/534/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/labprograms.wordpress.com/534/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/labprograms.wordpress.com/534/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/labprograms.wordpress.com/534/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/labprograms.wordpress.com/534/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/labprograms.wordpress.com/534/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/labprograms.wordpress.com/534/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/labprograms.wordpress.com/534/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/labprograms.wordpress.com/534/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/labprograms.wordpress.com/534/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/labprograms.wordpress.com/534/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/labprograms.wordpress.com/534/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/labprograms.wordpress.com/534/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labprograms.wordpress.com&amp;blog=8434488&amp;post=534&amp;subd=labprograms&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://labprograms.wordpress.com/2011/11/16/motorola-scholar-program-2011-12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bfc8ca04ec731c01be8c56ac90e9ba34?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Arnold</media:title>
		</media:content>
	</item>
		<item>
		<title>Working with Database in VB6.0 without using Data Control</title>
		<link>http://labprograms.wordpress.com/2011/03/21/working-with-database-in-vb6-0-without-using-data-control/</link>
		<comments>http://labprograms.wordpress.com/2011/03/21/working-with-database-in-vb6-0-without-using-data-control/#comments</comments>
		<pubDate>Mon, 21 Mar 2011 07:24:16 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[DBMS]]></category>
		<category><![CDATA[Visual Basic 6.0]]></category>
		<category><![CDATA[Students]]></category>
		<category><![CDATA[VB6]]></category>

		<guid isPermaLink="false">http://labprograms.wordpress.com/2011/03/21/working-with-database-in-vb6-0-without-using-data-control/</guid>
		<description><![CDATA[Basically, the novice users will use the data control to connect the data base with VB6.0. There are many different ways to connect with the database in VB6.0 The objective of this post is to explain the easy way to connect to Access database without using data control. To do that follow the steps: Design [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labprograms.wordpress.com&amp;blog=8434488&amp;post=524&amp;subd=labprograms&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Basically, the novice users will use the data control to connect the data base with VB6.0. There are many different ways to connect with the database in VB6.0</p>
<p>The objective of this post is to explain the easy way to connect to Access database without using data control. To do that follow the steps:</p>
<ol>
<li>
<div>Design a form as shown below:</div>
<p><img src="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith1.png?w=460" alt="" /></li>
<li>
<div>Open the Visual Data Manager from your VB Project</div>
<p><img src="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith2.png?w=460" alt="" /></li>
<li>
<div>The Visual Data Manager will appear on the screen</div>
<p><img src="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith3.png?w=460" alt="" /></li>
<li>
<div>Create a new Access Database</div>
<p><img src="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith4.png?w=460" alt="" /></li>
<li>
<div>Save the database in a location where you have saved your VB Project. (i.e. VB Project and the Database should be in the same folder-only for this post)</div>
<p><img src="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith5.png?w=460" alt="" /></li>
<li>
<div>Right click on the database window and click &#8220;Create Table&#8221;</div>
<p><img src="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith6.png?w=460" alt="" /></li>
<li>
<div>Give a name for your table</div>
<p><img src="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith7.png?w=460" alt="" /></li>
<li>
<div>Then click &#8220;Add Field&#8221; Button to add the fields for your table</div>
<p><img src="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith8.png?w=460" alt="" /></li>
<li>
<div>Once you created all the fields, click OK button. Then click &#8220;Build the Table&#8221; Button.</div>
<p><img src="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith9.png?w=460" alt="" /></li>
<li>
<div>Once the table is created, click the &#8220;Dynaset type Recordset&#8221; , the second icon in the toolbar.</div>
<p><img src="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith10.png?w=460" alt="" /></li>
<li>
<div>Then click the &#8220;Use Data Control on New Form&#8221; , the fourth icon in the toolbar.</div>
<p><img src="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith11.png?w=460" alt="" /></li>
<li>
<div>The double click on the &#8220;stu&#8221;, table icon in the Database window. And you will get following input screen.</div>
<p><img src="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith12.png?w=460" alt="" /></li>
<li>Now, you can add data to your table. Once you entered press the &#8220;Close&#8221; Button.</li>
</ol>
<p><span style="text-decoration:underline;"><strong>Coding Part:<br />
</strong></span></p>
<ol>
<li>
<div>Go to the General declaration area of your coding window. In that type the following:</div>
<p><span style="color:#c00000;">Dim dbStu As Database<br />
</span></p>
<p><span style="color:#c00000;">Dim rsStu As Recordset<br />
</span></p>
<p><span style="color:#c00000;">Dim Add As String<br />
</span></li>
<li>
<div>Go to the Form_Load() event. In that type the following:</div>
<p>Private Sub Form_Load()</p>
<p><span style="color:#c00000;">Set dbStu = OpenDatabase(App.Path &amp; &#8220;\student.mdb&#8221;)<br />
</span></p>
<p><span style="color:#c00000;">Set rsStu = dbStu.OpenRecordset(&#8220;Select * from stu &#8220;)<br />
</span></p>
<p>End Sub</li>
<li>
<div>Go to the Click() event of the AddNew Button and type the following:</div>
<p><span style="color:#c00000;">Add = &#8220;Insert into stu values(&#8216;&#8221; &amp; Text1 &amp; &#8220;&#8216;, &#8216;&#8221; &amp; Text2 &amp; &#8220;&#8216;,&#8217;&#8221; &amp; Text3 &amp; &#8220;&#8216;,&#8221; &amp; Val(Text4) &amp; &#8220;,&#8221; &amp; Val(Text5) &amp; &#8220;)&#8221;<br />
</span></p>
<p><span style="color:#c00000;">dbStu.Execute Add<br />
</span></p>
<p><span style="color:#c00000;">Call Clear<br />
</span></li>
<li>
<div>Go to the Click() event of the Update Button and type the following:</div>
<p><span style="color:#c00000;">Set rsStu = dbStu.OpenRecordset(&#8220;Select * from stu where rno = &#8216;&#8221; &amp; Text1 &amp; &#8220;&#8216;&#8221;)  &#8216;Search the stu  table for given roll number in the Text1 text box.<br />
</span></p>
<p><span style="color:#c00000;"> If rsStu.RecordCount = 0 Then<br />
</span></p>
<p><span style="color:#c00000;"> MsgBox &#8220;No Record Found&#8221;<br />
</span></p>
<p><span style="color:#c00000;"> Else<br />
</span></p>
<p><span style="color:#c00000;"> rsStu.Edit     &#8216;Activating Edit Mode<br />
</span></p>
<p><span style="color:#c00000;"> rsStu(0) = Text1<br />
</span></p>
<p><span style="color:#c00000;"> rsStu(1) = Text2<br />
</span></p>
<p><span style="color:#c00000;"> rsStu(2) = Text3<br />
</span></p>
<p><span style="color:#c00000;"> rsStu(3) = Val(Text4)<br />
</span></p>
<p><span style="color:#c00000;"> rsStu(4) = Val(Text5)<br />
</span></p>
<p><span style="color:#c00000;"> rsStu.Update<br />
</span></p>
<p><span style="color:#c00000;"> Call Clear<br />
</span></p>
<p><span style="color:#c00000;"> End If<br />
</span></p>
<p><span style="color:#c00000;"> If Not rsStu Is Nothing Then<br />
</span></p>
<p><span style="color:#c00000;"> Set rsStu = Nothing<br />
</span></p>
<p><span style="color:#c00000;"> End If<br />
</span></li>
<li>
<div>Go to the Click() event of the Delete button and type the following:</div>
<p><span style="color:#c00000;">rsStu.Delete<br />
</span></p>
<p><span style="color:#c00000;">Call Clear<br />
</span></li>
<li>
<div>Go to the Click() event of the Find button and type the following:</div>
<p><span style="color:#c00000;"> strName = InputBox(&#8220;Enter Student Name&#8230;&#8221;, &#8220;Input Required&#8221;)<br />
</span></p>
<p><span style="color:#c00000;"> Set rsStu = dbStu.OpenRecordset(&#8220;Select * from stu where name = &#8216;&#8221; &amp; strName &amp; &#8220;&#8216;&#8221;)<br />
</span></p>
<p><span style="color:#c00000;"> If rsStu.EOF = True Then<br />
</span></p>
<p><span style="color:#c00000;"> MsgBox &#8220;No Record Found&#8221;<br />
</span></p>
<p><span style="color:#c00000;"> Else<br />
</span></p>
<p><span style="color:#c00000;"> Text1 = rsStu(0)<br />
</span></p>
<p><span style="color:#c00000;"> Text2 = rsStu(1)<br />
</span></p>
<p><span style="color:#c00000;"> Text3 = rsStu(2)<br />
</span></p>
<p><span style="color:#c00000;"> Text4 = rsStu(3)<br />
</span></p>
<p><span style="color:#c00000;"> Text5 = rsStu(4)<br />
</span></p>
<p><span style="color:#c00000;"> End If<br />
</span></p>
<p><span style="color:#c00000;"> If Not rsStu Is Nothing Then<br />
</span></p>
<p><span style="color:#c00000;"> Set rsStu = Nothing<br />
</span></p>
<p><span style="color:#c00000;"> Else<br />
</span></p>
<p><span style="color:#c00000;"> rsStu.Close<br />
</span></p>
<p><span style="color:#c00000;"> End If<br />
</span></li>
<li>
<div>Go to the Click() event of the Clear Button and type the following:</div>
<p><span style="color:#c00000;">Call Clear<br />
</span></p>
<p>This will call the Clear function, which should be defined first. The code is given below:</p>
<p>Sub Clear()</p>
<p style="margin-left:36pt;"><span style="color:#c00000;">Text1.Text = &#8220;&#8221;<br />
</span></p>
<p style="margin-left:36pt;"><span style="color:#c00000;">Text2.Text = &#8220;&#8221;<br />
</span></p>
<p style="margin-left:36pt;"><span style="color:#c00000;">Text3.Text = &#8220;&#8221;<br />
</span></p>
<p style="margin-left:36pt;"><span style="color:#c00000;">Text4.Text = &#8220;&#8221;<br />
</span></p>
<p style="margin-left:36pt;"><span style="color:#c00000;">Text5.Text = &#8220;&#8221;<br />
</span></p>
<p style="margin-left:36pt;"><span style="color:#c00000;">If Not rsStu Is Nothing Then<br />
</span></p>
<p style="margin-left:36pt;"><span style="color:#c00000;"> Set rsStu = Nothing<br />
</span></p>
<p style="margin-left:36pt;"><span style="color:#c00000;"> Else<br />
</span></p>
<p style="margin-left:36pt;"><span style="color:#c00000;"> rsStu.Close<br />
</span></p>
<p style="margin-left:36pt;"><span style="color:#c00000;"> End If </span></p>
<p>End Sub</li>
<li>
<div>Go to the Click() event of the MoveFirst button and type the following:</div>
<p><span style="color:#c00000;">If rsStu Is Nothing Then<br />
</span></p>
<p><span style="color:#c00000;"> Set rsStu = dbStu.OpenRecordset(&#8220;Select * from stu &#8220;)<br />
</span></p>
<p><span style="color:#c00000;">End If<br />
</span></p>
<p><span style="color:#c00000;">rsStu.MoveFirst<br />
</span></p>
<p><span style="color:#c00000;">Call LoadText<br />
</span></li>
<li>
<div>Go to the Click() event of the MovePrevious button and type the following:</div>
<p><span style="color:#c00000;">If rsStu Is Nothing Then<br />
</span></p>
<p><span style="color:#c00000;"> Set rsStu = dbStu.OpenRecordset(&#8220;Select * from stu &#8220;)<br />
</span></p>
<p><span style="color:#c00000;">End If<br />
</span></p>
<p><span style="color:#c00000;">On Error GoTo X:<br />
</span></p>
<p><span style="color:#c00000;"> rsStu.MovePrevious<br />
</span></p>
<p><span style="color:#c00000;">If rsStu.BOF = False Then<br />
</span></p>
<p><span style="color:#c00000;"> Call LoadText<br />
</span></p>
<p><span style="color:#c00000;">Else<br />
</span></p>
<p><span style="color:#c00000;"> MsgBox &#8220;Reached First Record of the Table&#8221;, vbInformation, &#8220;First Record&#8221;<br />
</span></p>
<p><span style="color:#c00000;">End If<br />
</span></p>
<p><span style="color:#c00000;">X:<br />
</span></p>
<p><span style="color:#c00000;"> &#8216;Display the error<br />
</span></li>
<li>
<div>Go to the Click() event of the MoveNext button and type the following:</div>
<p><span style="color:#c00000;">On Error GoTo X:<br />
</span></p>
<p><span style="color:#c00000;">If rsStu Is Nothing Then<br />
</span></p>
<p><span style="color:#c00000;"> Set rsStu = dbStu.OpenRecordset(&#8220;Select * from stu &#8220;)<br />
</span></p>
<p><span style="color:#c00000;">End If<br />
</span></p>
<p><span style="color:#c00000;">rsStu.MoveNext<br />
</span></p>
<p><span style="color:#c00000;">If rsStu.EOF = False Then<br />
</span></p>
<p><span style="color:#c00000;"> Call LoadText<br />
</span></p>
<p><span style="color:#c00000;">Else<br />
</span></p>
<p><span style="color:#c00000;"> MsgBox &#8220;Reached Last Record of the Table&#8221;, vbInformation, &#8220;Last Record&#8221;<br />
</span></p>
<p><span style="color:#c00000;">End If<br />
</span></p>
<p><span style="color:#c00000;">X:<br />
</span></p>
<p><span style="color:#c00000;"> &#8216;Display the error<br />
</span></li>
<li>
<div>Go to the Click() event of the MoveLast button and type the following:</div>
<p><span style="color:#c00000;">If rsStu Is Nothing Then<br />
</span></p>
<p><span style="color:#c00000;"> Set rsStu = dbStu.OpenRecordset(&#8220;Select * from stu &#8220;)<br />
</span></p>
<p><span style="color:#c00000;">End If<br />
</span></p>
<p><span style="color:#c00000;">rsStu.MoveLast<br />
</span></p>
<p><span style="color:#c00000;">Call LoadText<br />
</span></li>
<li>
<div>Create the LoadText() function with the following code:</div>
<p><span style="color:#c00000;"> Text1 = rsStu(0)<br />
</span></p>
<p><span style="color:#c00000;"> Text2 = rsStu(1)<br />
</span></p>
<p><span style="color:#c00000;"> Text3 = rsStu(2)<br />
</span></p>
<p><span style="color:#c00000;"> Text4 = rsStu(3)<br />
</span></p>
<p><span style="color:#c00000;"> Text5 = rsStu(4)<br />
</span></li>
<li>Press F5 to execute the program.</li>
</ol>
<br />Filed under: <a href='http://labprograms.wordpress.com/category/dbms/'>DBMS</a>, <a href='http://labprograms.wordpress.com/category/visual-basic-6-0/'>Visual Basic 6.0</a> Tagged: <a href='http://labprograms.wordpress.com/tag/dbms/'>DBMS</a>, <a href='http://labprograms.wordpress.com/tag/students/'>Students</a>, <a href='http://labprograms.wordpress.com/tag/vb6/'>VB6</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/labprograms.wordpress.com/524/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/labprograms.wordpress.com/524/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/labprograms.wordpress.com/524/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/labprograms.wordpress.com/524/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/labprograms.wordpress.com/524/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/labprograms.wordpress.com/524/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/labprograms.wordpress.com/524/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/labprograms.wordpress.com/524/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/labprograms.wordpress.com/524/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/labprograms.wordpress.com/524/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/labprograms.wordpress.com/524/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/labprograms.wordpress.com/524/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/labprograms.wordpress.com/524/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/labprograms.wordpress.com/524/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labprograms.wordpress.com&amp;blog=8434488&amp;post=524&amp;subd=labprograms&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://labprograms.wordpress.com/2011/03/21/working-with-database-in-vb6-0-without-using-data-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ae82bcd79f13432292e319acf39c9da?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">richiindia</media:title>
		</media:content>

		<media:content url="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith1.png" medium="image" />

		<media:content url="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith2.png" medium="image" />

		<media:content url="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith3.png" medium="image" />

		<media:content url="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith4.png" medium="image" />

		<media:content url="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith5.png" medium="image" />

		<media:content url="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith6.png" medium="image" />

		<media:content url="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith7.png" medium="image" />

		<media:content url="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith8.png" medium="image" />

		<media:content url="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith9.png" medium="image" />

		<media:content url="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith10.png" medium="image" />

		<media:content url="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith11.png" medium="image" />

		<media:content url="http://labprograms.files.wordpress.com/2011/03/032111_0723_workingwith12.png" medium="image" />
	</item>
		<item>
		<title>OOAD &#8211; Unit 1 Notes &#8211; B.E. CSE (Anna University of Technology, Tirunelveli)</title>
		<link>http://labprograms.wordpress.com/2011/02/17/ooad-unit-1-notes-b-e-cse-anna-university-of-technology-tirunelveli/</link>
		<comments>http://labprograms.wordpress.com/2011/02/17/ooad-unit-1-notes-b-e-cse-anna-university-of-technology-tirunelveli/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 10:18:23 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[Notes]]></category>
		<category><![CDATA[OOAD]]></category>

		<guid isPermaLink="false">http://labprograms.wordpress.com/?p=506</guid>
		<description><![CDATA[Notes : OOAD &#8211; Unit 1 OOAD &#8211; Unit 1 Notes &#8211; Download &#8212;&#8212;-&#62;Unit I OOAD Filed under: Notes, OOAD Tagged: Notes, OOAD<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labprograms.wordpress.com&amp;blog=8434488&amp;post=506&amp;subd=labprograms&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2 style="text-align:center;">Notes : OOAD &#8211; Unit 1</h2>
<p>OOAD &#8211; Unit 1 Notes &#8211; Download &#8212;&#8212;-&gt;<a href="http://labprograms.files.wordpress.com/2011/02/unit-i-ooad.pdf">Unit I OOAD</a></p>
<br />Filed under: <a href='http://labprograms.wordpress.com/category/notes/'>Notes</a>, <a href='http://labprograms.wordpress.com/category/ooad/'>OOAD</a> Tagged: <a href='http://labprograms.wordpress.com/tag/notes/'>Notes</a>, <a href='http://labprograms.wordpress.com/tag/ooad/'>OOAD</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/labprograms.wordpress.com/506/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/labprograms.wordpress.com/506/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/labprograms.wordpress.com/506/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/labprograms.wordpress.com/506/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/labprograms.wordpress.com/506/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/labprograms.wordpress.com/506/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/labprograms.wordpress.com/506/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/labprograms.wordpress.com/506/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/labprograms.wordpress.com/506/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/labprograms.wordpress.com/506/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/labprograms.wordpress.com/506/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/labprograms.wordpress.com/506/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/labprograms.wordpress.com/506/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/labprograms.wordpress.com/506/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labprograms.wordpress.com&amp;blog=8434488&amp;post=506&amp;subd=labprograms&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://labprograms.wordpress.com/2011/02/17/ooad-unit-1-notes-b-e-cse-anna-university-of-technology-tirunelveli/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ae82bcd79f13432292e319acf39c9da?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">richiindia</media:title>
		</media:content>
	</item>
		<item>
		<title>Government Funded Project for Students</title>
		<link>http://labprograms.wordpress.com/2011/01/10/government-funded-project-for-students/</link>
		<comments>http://labprograms.wordpress.com/2011/01/10/government-funded-project-for-students/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 15:28:52 +0000</pubDate>
		<dc:creator>இராய் அந்தோனி அர்னால்டு</dc:creator>
				<category><![CDATA[News_Students]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Students]]></category>

		<guid isPermaLink="false">http://labprograms.wordpress.com/?p=501</guid>
		<description><![CDATA[No end-date for this scheme&#8230; It is an on-going scheme for the students&#8230; Application Link: http://www.cdc.org.in/schemes/fellowship.aspx Filed under: News_Students Tagged: News, Students<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labprograms.wordpress.com&amp;blog=8434488&amp;post=501&amp;subd=labprograms&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://labprograms.files.wordpress.com/2011/01/fellowship-scheme.jpg"><img class="alignnone size-full wp-image-502" title="fellowship scheme" src="http://labprograms.files.wordpress.com/2011/01/fellowship-scheme.jpg?w=460&#038;h=554" alt="" width="460" height="554" /></a></p>
<p>No end-date for this scheme&#8230;</p>
<p>It is an on-going scheme for the students&#8230;</p>
<p>Application Link:</p>
<p><a href="http://www.cdc.org.in/schemes/fellowship.aspx">http://www.cdc.org.in/schemes/fellowship.aspx</a></p>
<br />Filed under: <a href='http://labprograms.wordpress.com/category/news_students/'>News_Students</a> Tagged: <a href='http://labprograms.wordpress.com/tag/news/'>News</a>, <a href='http://labprograms.wordpress.com/tag/students/'>Students</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/labprograms.wordpress.com/501/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/labprograms.wordpress.com/501/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/labprograms.wordpress.com/501/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/labprograms.wordpress.com/501/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/labprograms.wordpress.com/501/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/labprograms.wordpress.com/501/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/labprograms.wordpress.com/501/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/labprograms.wordpress.com/501/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/labprograms.wordpress.com/501/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/labprograms.wordpress.com/501/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/labprograms.wordpress.com/501/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/labprograms.wordpress.com/501/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/labprograms.wordpress.com/501/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/labprograms.wordpress.com/501/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labprograms.wordpress.com&amp;blog=8434488&amp;post=501&amp;subd=labprograms&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://labprograms.wordpress.com/2011/01/10/government-funded-project-for-students/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bfc8ca04ec731c01be8c56ac90e9ba34?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Arnold</media:title>
		</media:content>

		<media:content url="http://labprograms.files.wordpress.com/2011/01/fellowship-scheme.jpg" medium="image">
			<media:title type="html">fellowship scheme</media:title>
		</media:content>
	</item>
		<item>
		<title>C code for Travelling Sales Person Problem &#8211; Branch and Bound Approach</title>
		<link>http://labprograms.wordpress.com/2010/10/29/c-code-for-travelling-sales-person-problem-branch-and-bound-approach/</link>
		<comments>http://labprograms.wordpress.com/2010/10/29/c-code-for-travelling-sales-person-problem-branch-and-bound-approach/#comments</comments>
		<pubDate>Fri, 29 Oct 2010 17:41:53 +0000</pubDate>
		<dc:creator>இராய் அந்தோனி அர்னால்டு</dc:creator>
				<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[Data Structure]]></category>
		<category><![CDATA[Algorithm]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[DS]]></category>

		<guid isPermaLink="false">http://labprograms.wordpress.com/?p=494</guid>
		<description><![CDATA[/*Branch and Bound Algorithm for Travelling Sales Person*/ #include&#60;stdio.h&#62; #include&#60;conio.h&#62; int a[10][10],visited[10],n,cost=0; void get() { int i,j; printf(&#8220;Enter No. of Cities: &#8220;); scanf(&#8220;%d&#8221;,&#38;n); printf(&#8220;\nEnter Cost Matrix: \n&#8221;); for( i=0;i&#60;n;i++) { printf(&#8220;\n Enter Elements of Row # : %d\n&#8221;,i+1); for( j=0;j&#60;n;j++) scanf(&#8220;%d&#8221;,&#38;a[i][j]); visited[i]=0; } printf(&#8220;\n\nThe cost list is:\n\n&#8221;); for( i=0;i&#60;n;i++) { printf(&#8220;\n\n&#8221;); for( j=0;j&#60;n;j++) printf(&#8220;\t%d&#8221;,a[i][j]); } [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labprograms.wordpress.com&amp;blog=8434488&amp;post=494&amp;subd=labprograms&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>/*Branch and Bound Algorithm for Travelling Sales Person*/</strong></p>
<p><strong> </strong></p>
<p><strong>#include&lt;stdio.h&gt;</strong></p>
<p><strong>#include&lt;conio.h&gt;</strong></p>
<p><strong> </strong></p>
<p><strong>int a[10][10],visited[10],n,cost=0;</strong></p>
<p><strong><br />
</strong></p>
<p><strong> </strong></p>
<p><strong>void get()</strong></p>
<p><strong>{</strong></p>
<p><strong> int i,j;</strong></p>
<p><strong> </strong></p>
<p><strong>printf(&#8220;Enter No. of Cities: &#8220;);</strong></p>
<p><strong> scanf(&#8220;%d&#8221;,&amp;n);</strong></p>
<p><strong> </strong></p>
<p><strong>printf(&#8220;\nEnter Cost Matrix: \n&#8221;);</strong></p>
<p><strong> for( i=0;i&lt;n;i++)</strong></p>
<p><strong> {</strong></p>
<p><strong> printf(&#8220;\n Enter Elements of Row # : %d\n&#8221;,i+1);</strong></p>
<p><strong> for( j=0;j&lt;n;j++)</strong></p>
<p><strong> scanf(&#8220;%d&#8221;,&amp;a[i][j]);</strong></p>
<p><strong> visited[i]=0;</strong></p>
<p><strong> }</strong></p>
<p><strong> </strong></p>
<p><strong> printf(&#8220;\n\nThe cost list is:\n\n&#8221;);</strong></p>
<p><strong> for( i=0;i&lt;n;i++)</strong></p>
<p><strong> {</strong></p>
<p><strong> printf(&#8220;\n\n&#8221;);</strong></p>
<p><strong> for( j=0;j&lt;n;j++)</strong></p>
<p><strong> printf(&#8220;\t%d&#8221;,a[i][j]);</strong></p>
<p><strong> }</strong></p>
<p><strong>}</strong></p>
<p><strong><br />
</strong></p>
<p><strong> </strong></p>
<p><strong>void mincost(int city)</strong></p>
<p><strong>{</strong></p>
<p><strong> int i,ncity;</strong></p>
<p><strong> visited[city]=1;</strong></p>
<p><strong> printf(&#8220;%d &#8211;&gt;&#8221;,city+1);</strong></p>
<p><strong> ncity=least(city);</strong></p>
<p><strong> </strong></p>
<p><strong> if(ncity==999)</strong></p>
<p><strong> {</strong></p>
<p><strong> ncity=0;</strong></p>
<p><strong> printf(&#8220;%d&#8221;,ncity+1);</strong></p>
<p><strong> cost+=a[city][ncity];</strong></p>
<p><strong> return;</strong></p>
<p><strong> }</strong></p>
<p><strong> </strong></p>
<p><strong> mincost(ncity);</strong></p>
<p><strong>}</strong></p>
<p><strong><br />
</strong></p>
<p><strong> </strong></p>
<p><strong>int least(int c)</strong></p>
<p><strong>{</strong></p>
<p><strong> int i,nc=999;</strong></p>
<p><strong> int min=999,kmin;</strong></p>
<p><strong> for(i=0;i&lt;n;i++)</strong></p>
<p><strong> {</strong></p>
<p><strong> if((a[c][i]!=0)&amp;&amp;(visited[i]==0))</strong></p>
<p><strong> if(a[c][i]&lt;min)</strong></p>
<p><strong> {</strong></p>
<p><strong> min=a[i][0]+a[c][i];</strong></p>
<p><strong> kmin=a[c][i];</strong></p>
<p><strong> nc=i;</strong></p>
<p><strong> }</strong></p>
<p><strong> }</strong></p>
<p><strong> if(min!=999)</strong></p>
<p><strong> cost+=kmin;</strong></p>
<p><strong> return nc;</strong></p>
<p><strong>}</strong></p>
<p><strong><br />
</strong></p>
<p><strong> </strong></p>
<p><strong>void put()</strong></p>
<p><strong>{</strong></p>
<p><strong> printf(&#8220;\n\nMinimum cost:&#8221;);</strong></p>
<p><strong> printf(&#8220;%d&#8221;,cost);</strong></p>
<p><strong>}</strong></p>
<p><strong> </strong></p>
<p><strong>void main()</strong></p>
<p><strong>{</strong></p>
<p><strong> clrscr();</strong></p>
<p><strong> get();</strong></p>
<p><strong> printf(&#8220;\n\nThe Path is:\n\n&#8221;);</strong></p>
<p><strong> mincost(0);</strong></p>
<p><strong> put();</strong></p>
<p><strong> getch();</strong></p>
<p><strong>}</strong></p>
<p><strong> </strong></p>
<p><strong>Input Sample: </strong></p>
<p><strong>No. of Nodes : 6</strong></p>
<p><strong>Cost Matrix:</strong></p>
<p><strong>99            10            15            20            99            8</strong></p>
<p><strong>5              99            9              10            8              99</strong></p>
<p><strong>6              13            99            12            99            5</strong></p>
<p><strong>8              8              9              99            6              99</strong></p>
<p><strong>99            10            99            6              99            99</strong></p>
<p><strong>10            99            5              99            99            99</strong></p>
<br />Filed under: <a href='http://labprograms.wordpress.com/category/algorithms/'>Algorithms</a>, <a href='http://labprograms.wordpress.com/category/data-structure/'>Data Structure</a> Tagged: <a href='http://labprograms.wordpress.com/tag/algorithm/'>Algorithm</a>, <a href='http://labprograms.wordpress.com/tag/c/'>C</a>, <a href='http://labprograms.wordpress.com/tag/ds/'>DS</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/labprograms.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/labprograms.wordpress.com/494/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/labprograms.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/labprograms.wordpress.com/494/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/labprograms.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/labprograms.wordpress.com/494/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/labprograms.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/labprograms.wordpress.com/494/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/labprograms.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/labprograms.wordpress.com/494/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/labprograms.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/labprograms.wordpress.com/494/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/labprograms.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/labprograms.wordpress.com/494/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labprograms.wordpress.com&amp;blog=8434488&amp;post=494&amp;subd=labprograms&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://labprograms.wordpress.com/2010/10/29/c-code-for-travelling-sales-person-problem-branch-and-bound-approach/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bfc8ca04ec731c01be8c56ac90e9ba34?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Arnold</media:title>
		</media:content>
	</item>
		<item>
		<title>C Code for Knapsack Problem using Backtracking Approach</title>
		<link>http://labprograms.wordpress.com/2010/10/20/c-code-for-knapsack-problem-using-backtracking-approach/</link>
		<comments>http://labprograms.wordpress.com/2010/10/20/c-code-for-knapsack-problem-using-backtracking-approach/#comments</comments>
		<pubDate>Wed, 20 Oct 2010 17:45:06 +0000</pubDate>
		<dc:creator>இராய் அந்தோனி அர்னால்டு</dc:creator>
				<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[C Programming]]></category>
		<category><![CDATA[Data Structure]]></category>
		<category><![CDATA[Algorithm]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[DS]]></category>

		<guid isPermaLink="false">http://labprograms.wordpress.com/?p=487</guid>
		<description><![CDATA[/* knapsack  problem using backtracking*/ /* Variable Description&#8230;. n   &#8211; Total no. of items available w[] &#8211; Weight of each item p[] &#8211; Profit of each item m   &#8211; Maximum Capacity of the Sack unit[] &#8211; Profit of each item per Unit p[]/w[] x[] &#8211; Final list of items put into the Sack y[] &#8211; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labprograms.wordpress.com&amp;blog=8434488&amp;post=487&amp;subd=labprograms&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2><strong>/* knapsack  problem using backtracking*/</strong></h2>
<p><strong>/* Variable Description&#8230;.</strong></p>
<p><strong> n   &#8211; Total no. of items available</strong></p>
<p><strong> w[] &#8211; Weight of each item</strong></p>
<p><strong> p[] &#8211; Profit of each item</strong></p>
<p><strong> m   &#8211; Maximum Capacity of the Sack</strong></p>
<p><strong> unit[] &#8211; Profit of each item per Unit p[]/w[]</strong></p>
<p><strong> x[] &#8211; Final list of items put into the Sack</strong></p>
<p><strong> y[] &#8211; Intermediate list of selected items</strong></p>
<p><strong> fp  &#8211; Final Profit</strong></p>
<p><strong> fw  &#8211; Final Weight</strong></p>
<p><strong> cp  &#8211; Current Profit</strong></p>
<p><strong> cw  &#8211; Current Weight</strong></p>
<p><strong>*/</strong></p>
<p><strong> </strong></p>
<p><strong>#include &lt;stdio.h&gt;</strong></p>
<p><strong>#include &lt;conio.h&gt;</strong></p>
<p><strong>#define max 10</strong></p>
<p><strong> </strong></p>
<p><strong>int w[max],i,j,p[max];</strong></p>
<p><strong>int n,m;</strong></p>
<p><strong>float unit[max];</strong></p>
<p><strong>int y[max],x[max],fp=-1,fw;</strong></p>
<p><strong> </strong></p>
<p><strong>void get()</strong></p>
<p><strong>{</strong></p>
<p><strong> printf(&#8220;\n Enter total number of items: &#8220;);</strong></p>
<p><strong> scanf(&#8220;%d&#8221;,&amp;n);</strong></p>
<p><strong> printf(&#8220;\n Enter the Maximum capacity of the Sack: &#8220;);</strong></p>
<p><strong> scanf(&#8220;%d&#8221;,&amp;m);</strong></p>
<p><strong> for(i=0;i&lt;n;i++)</strong></p>
<p><strong> {</strong></p>
<p><strong> printf(&#8220;\n Enter the weight of the item # %d : &#8220;,i+1);</strong></p>
<p><strong> scanf(&#8220;%d&#8221;,&amp;w[i]);</strong></p>
<p><strong> printf(&#8220;\n Enter the profit of the item # %d : &#8220;, i+1);</strong></p>
<p><strong> scanf(&#8220;%d&#8221;, &amp;p[i]);</strong></p>
<p><strong> }</strong></p>
<p><strong>}</strong></p>
<p><strong> </strong></p>
<p><strong>void show()</strong></p>
<p><strong>{</strong></p>
<p><strong> float s=0.0;</strong></p>
<p><strong> printf(&#8220;\n\tItem\tWeight\tCost\tUnit Profit\tSelected &#8220;);</strong></p>
<p><strong> for(i=0;i&lt;n;i++)</strong></p>
<p><strong> printf(&#8220;\n\t%d\t%d\t%d\t%f\t%d&#8221;,i+1,w[i],p[i],unit[i],x[i]);</strong></p>
<p><strong> printf(&#8220;\n\n The Sack now holds following items : &#8220;);</strong></p>
<p><strong> for(i=0;i&lt;n;i++)</strong></p>
<p><strong> if(x[i]==1)</strong></p>
<p><strong> {</strong></p>
<p><strong> printf(&#8220;%d\t&#8221;,i+1);</strong></p>
<p><strong> s += (float) p[i] * (float) x[i];</strong></p>
<p><strong> }</strong></p>
<p><strong> printf(&#8220;\n Maximum Profit: %f &#8220;,s);</strong></p>
<p><strong>}</strong></p>
<p><strong> </strong></p>
<p><strong>/*Arrange the item based on high profit per Unit*/</strong></p>
<p><strong>void sort()</strong></p>
<p><strong>{</strong></p>
<p><strong> int t,t1;</strong></p>
<p><strong> float t2;</strong></p>
<p><strong> for(i=0;i&lt;n;i++)</strong></p>
<p><strong> unit[i] = (float) p[i] / (float) w[i];</strong></p>
<p><strong> </strong></p>
<p><strong> for(i=0;i&lt;n-1;i++)</strong></p>
<p><strong> {</strong></p>
<p><strong> for(j=i+1;j&lt;n;j++)</strong></p>
<p><strong> {</strong></p>
<p><strong> if(unit[i]  &lt; unit[j])</strong></p>
<p><strong> {</strong></p>
<p><strong> t2 = unit[i];</strong></p>
<p><strong> unit[i] = unit[j];</strong></p>
<p><strong> unit[j] = t2;</strong></p>
<p><strong> </strong></p>
<p><strong> t = p[i];</strong></p>
<p><strong> p[i] = p[j];</strong></p>
<p><strong> p[j] = t;</strong></p>
<p><strong> </strong></p>
<p><strong> t1 = w[i];</strong></p>
<p><strong> w[i] = w[j];</strong></p>
<p><strong> w[j] =t1;</strong></p>
<p><strong> }</strong></p>
<p><strong> }</strong></p>
<p><strong> }</strong></p>
<p><strong>}</strong></p>
<p><strong> </strong></p>
<p><strong>float bound(float cp,float cw,int k)</strong></p>
<p><strong>{</strong></p>
<p><strong> float b = cp;</strong></p>
<p><strong> float c = cw;</strong></p>
<p><strong> for(i=k;i&lt;=n;i++)</strong></p>
<p><strong> {</strong></p>
<p><strong> c = c+w[i];</strong></p>
<p><strong> if( c &lt; m)</strong></p>
<p><strong> b = b +p[i];</strong></p>
<p><strong> else</strong></p>
<p><strong> return (b+(1-(c-m)/ (float)w[i])*p[i]);</strong></p>
<p><strong> }</strong></p>
<p><strong> return b;</strong></p>
<p><strong>}</strong></p>
<p><strong> </strong></p>
<p><strong>void knapsack(int k,float cp,float cw)</strong></p>
<p><strong>{</strong></p>
<p><strong> if(cw+w[k] &lt;= m)</strong></p>
<p><strong> {</strong></p>
<p><strong> y[k] = 1;</strong></p>
<p><strong> if(k &lt;= n)</strong></p>
<p><strong> knapsack(k+1,cp+p[k],cw+w[k]);</strong></p>
<p><strong> if(((cp+p[k]) &gt; fp) &amp;&amp; ( k == n))</strong></p>
<p><strong> {</strong></p>
<p><strong> fp = cp+p[k];</strong></p>
<p><strong> fw = cw+w[k];</strong></p>
<p><strong> for(j=0;j&lt;=k;j++)</strong></p>
<p><strong> x[j] = y[j];</strong></p>
<p><strong> }</strong></p>
<p><strong> }</strong></p>
<p><strong> if(bound(cp,cw,k) &gt;= fp)</strong></p>
<p><strong> {</strong></p>
<p><strong> y[k] = 0;</strong></p>
<p><strong> if( k &lt;= n)</strong></p>
<p><strong> knapsack(k+1,cp,cw);</strong></p>
<p><strong> if((cp &gt; fp) &amp;&amp; (k == n))</strong></p>
<p><strong> {</strong></p>
<p><strong> fp = cp;</strong></p>
<p><strong> fw = cw;</strong></p>
<p><strong> for(j=0;j&lt;=k;j++)</strong></p>
<p><strong> x[j] = y[j];</strong></p>
<p><strong> }</strong></p>
<p><strong> }</strong></p>
<p><strong>}</strong></p>
<p><strong> </strong></p>
<p><strong>void main()</strong></p>
<p><strong>{</strong></p>
<p><strong> clrscr();</strong></p>
<p><strong> printf(&#8220;\n\n\n\t\t    ******** KNAPSACK PROBLEM ********&#8221;);</strong></p>
<p><strong> printf(&#8220;\n\t\t &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&#8221;);</strong></p>
<p><strong> get();</strong></p>
<p><strong> printf(&#8220;\n The Sack is arranged in the order&#8230;\n&#8221;);</strong></p>
<p><strong> sort();</strong></p>
<p><strong> knapsack(0,0.0,0.0);</strong></p>
<p><strong> show();</strong></p>
<p><strong> getch();</strong></p>
<p><strong>}</strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong><span style="text-decoration:underline;">Output:</span></strong></p>
<p><strong> </strong></p>
<p><strong> </strong><strong> ******** KNAPSACK PROBLEM ********</strong></p>
<p><strong> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</strong></p>
<p><strong> Enter total number of items: 3</strong></p>
<p><strong> </strong></p>
<p><strong> Enter the Maximum capacity of the Sack: 25</strong></p>
<p><strong> </strong></p>
<p><strong> Enter the weight of the item # 1 : 1</strong></p>
<p><strong> </strong></p>
<p><strong> Enter the profit of the item # 1 : 11</strong></p>
<p><strong> </strong></p>
<p><strong> Enter the weight of the item # 2 : 11</strong></p>
<p><strong> </strong></p>
<p><strong> Enter the profit of the item # 2 : 21</strong></p>
<p><strong> </strong></p>
<p><strong> Enter the weight of the item # 3 : 21</strong></p>
<p><strong> </strong></p>
<p><strong> Enter the profit of the item # 3 : 31</strong></p>
<p><strong> </strong></p>
<p><strong>The Sack is arranged in the order&#8230;</strong></p>
<p><strong> </strong></p>
<p><strong> Item    Weight     Cost    Unit Profit     Selected</strong></p>
<p><strong> 1            1      11      11.000000          1</strong></p>
<p><strong> 2            11     21      1.909091           0</strong></p>
<p><strong> 3            21    31      1.476190           1</strong></p>
<p><strong> </strong></p>
<p><strong> The Sack now holds following items : 1 3</strong></p>
<p><strong> Maximum Profit: 42.000000</strong></p>
<p><strong>Reference:</strong></p>
<p><strong>Computer Algorithms / C++ 2nd Edition by Ellis Horowitz, Sartaj Sahni and Sanguthevar Rajasekaran<br />
</strong></p>
<br />Filed under: <a href='http://labprograms.wordpress.com/category/algorithms/'>Algorithms</a>, <a href='http://labprograms.wordpress.com/category/c-programming/'>C Programming</a>, <a href='http://labprograms.wordpress.com/category/data-structure/'>Data Structure</a> Tagged: <a href='http://labprograms.wordpress.com/tag/algorithm/'>Algorithm</a>, <a href='http://labprograms.wordpress.com/tag/c/'>C</a>, <a href='http://labprograms.wordpress.com/tag/ds/'>DS</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/labprograms.wordpress.com/487/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/labprograms.wordpress.com/487/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/labprograms.wordpress.com/487/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/labprograms.wordpress.com/487/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/labprograms.wordpress.com/487/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/labprograms.wordpress.com/487/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/labprograms.wordpress.com/487/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/labprograms.wordpress.com/487/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/labprograms.wordpress.com/487/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/labprograms.wordpress.com/487/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/labprograms.wordpress.com/487/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/labprograms.wordpress.com/487/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/labprograms.wordpress.com/487/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/labprograms.wordpress.com/487/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labprograms.wordpress.com&amp;blog=8434488&amp;post=487&amp;subd=labprograms&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://labprograms.wordpress.com/2010/10/20/c-code-for-knapsack-problem-using-backtracking-approach/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bfc8ca04ec731c01be8c56ac90e9ba34?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Arnold</media:title>
		</media:content>
	</item>
		<item>
		<title>Implementation of Randomized Quick Sort</title>
		<link>http://labprograms.wordpress.com/2010/10/13/implementation-of-randomized-quick-sort/</link>
		<comments>http://labprograms.wordpress.com/2010/10/13/implementation-of-randomized-quick-sort/#comments</comments>
		<pubDate>Wed, 13 Oct 2010 17:21:35 +0000</pubDate>
		<dc:creator>இராய் அந்தோனி அர்னால்டு</dc:creator>
				<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[C Programming]]></category>
		<category><![CDATA[Data Structure]]></category>
		<category><![CDATA[Algorithm]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[DS]]></category>

		<guid isPermaLink="false">http://labprograms.wordpress.com/?p=484</guid>
		<description><![CDATA[/* Randomized Quick Sort */ #include&#60;stdio.h&#62; #include&#60;conio.h&#62; #include&#60;stdlib.h&#62; int n; void swap(int *a, int *b) { int x; x = *a; *a = *b; *b = x; } void quicksort(int s[], int l, int h) { int p; /* index of partition */ if ((h &#8211; l) &#62; 0) { p = partition(s, l, h); [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labprograms.wordpress.com&amp;blog=8434488&amp;post=484&amp;subd=labprograms&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>/* Randomized Quick Sort */</strong></p>
<p>#include&lt;stdio.h&gt;</p>
<p>#include&lt;conio.h&gt;</p>
<p>#include&lt;stdlib.h&gt;</p>
<p>int n;</p>
<p>void swap(int *a, int *b)</p>
<p>{</p>
<p>int x;</p>
<p>x = *a;</p>
<p>*a = *b;</p>
<p>*b = x;</p>
<p>}</p>
<p>void quicksort(int s[], int l, int h)</p>
<p>{</p>
<p>int p; /* index of partition */</p>
<p>if ((h &#8211; l) &gt; 0) {</p>
<p>p = partition(s, l, h);</p>
<p>quicksort(s, l, p &#8211; 1);</p>
<p>quicksort(s, p + 1, h);</p>
<p>}</p>
<p>}</p>
<p>int partition(int s[], int l, int h)</p>
<p>{</p>
<p>int i;</p>
<p>int p; /* pivot element index */</p>
<p>int firsthigh; /* divider position for pivot element */</p>
<p>p = l + (random(n) % (h &#8211; l + 1));</p>
<p>swap(&amp;s[p], &amp;s[h]);</p>
<p>firsthigh = l;</p>
<p>for (i = l; i &lt; h; i++)</p>
<p>if(s[i] &lt; s[h]) {</p>
<p>swap(&amp;s[i], &amp;s[firsthigh]);</p>
<p>firsthigh++;</p>
<p>}</p>
<p>swap(&amp;s[h], &amp;s[firsthigh]);</p>
<p>&nbsp;</p>
<p>return(firsthigh);</p>
<p>}</p>
<p>void main()</p>
<p>{</p>
<p>int s[20],i;</p>
<p>clrscr();</p>
<p>printf(&#8220;\nRandomized Quick Sort&#8221;);</p>
<p>printf(&#8220;\nEnter the no. of elements&#8230;&#8221;);</p>
<p>scanf(&#8220;%d&#8221;, &amp;n);</p>
<p>printf(&#8220;\nEnter the elements one by one&#8230;&#8221;);</p>
<p>for(i=0;i&lt;n;i++)</p>
<p>scanf(&#8220;%d&#8221;,&amp;s[i]);</p>
<p>quicksort(s,0,n-1);</p>
<p>printf(&#8220;\nAfter sorting&#8230;\n&#8221;);</p>
<p>for(i=0;i&lt;n;i++)</p>
<p>printf(&#8220;%d\t&#8221;,s[i]);</p>
<p>getch();</p>
<p>}</p>
<br />Filed under: <a href='http://labprograms.wordpress.com/category/algorithms/'>Algorithms</a>, <a href='http://labprograms.wordpress.com/category/c-programming/'>C Programming</a>, <a href='http://labprograms.wordpress.com/category/data-structure/'>Data Structure</a> Tagged: <a href='http://labprograms.wordpress.com/tag/algorithm/'>Algorithm</a>, <a href='http://labprograms.wordpress.com/tag/c/'>C</a>, <a href='http://labprograms.wordpress.com/tag/ds/'>DS</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/labprograms.wordpress.com/484/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/labprograms.wordpress.com/484/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/labprograms.wordpress.com/484/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/labprograms.wordpress.com/484/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/labprograms.wordpress.com/484/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/labprograms.wordpress.com/484/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/labprograms.wordpress.com/484/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/labprograms.wordpress.com/484/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/labprograms.wordpress.com/484/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/labprograms.wordpress.com/484/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/labprograms.wordpress.com/484/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/labprograms.wordpress.com/484/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/labprograms.wordpress.com/484/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/labprograms.wordpress.com/484/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labprograms.wordpress.com&amp;blog=8434488&amp;post=484&amp;subd=labprograms&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://labprograms.wordpress.com/2010/10/13/implementation-of-randomized-quick-sort/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bfc8ca04ec731c01be8c56ac90e9ba34?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Arnold</media:title>
		</media:content>
	</item>
		<item>
		<title>Working with DDL Commands</title>
		<link>http://labprograms.wordpress.com/2010/08/18/working-with-ddl-commands/</link>
		<comments>http://labprograms.wordpress.com/2010/08/18/working-with-ddl-commands/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 17:06:57 +0000</pubDate>
		<dc:creator>இராய் அந்தோனி அர்னால்டு</dc:creator>
				<category><![CDATA[DBMS]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://labprograms.wordpress.com/?p=479</guid>
		<description><![CDATA[DDL Commands TO CREATE TABLE. SQL&#62; create table depart(dno number(10),dname varchar2(10),primary key(dno)); Table created. SQL&#62; desc depart; Name                                      Null?                           Type &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- DNO                                       NOT NULL               NUMBER(10) DNAME                                                                    VARCHAR2(10) SQL&#62; create table emp(eno number(10),ename varchar2(10),dno number(10),sal number(10),jobid varchar2(10),mgrid varchar2(10),foreign key(dno) references depart(dno)); Table created SQL&#62; desc emp; Name                                 Null?        Type &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labprograms.wordpress.com&amp;blog=8434488&amp;post=479&amp;subd=labprograms&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2 style="text-align:center;">DDL Commands</h2>
<h3><strong><span style="text-decoration:underline;">TO CREATE TABLE.</span></strong></h3>
<p><strong>SQL&gt; create table depart(dno number(10),dname varchar2(10),primary key(dno));</strong></p>
<p>Table created.</p>
<p><strong> </strong></p>
<p><strong>SQL&gt; desc depart;</strong></p>
<p>Name                                      Null?                           Type</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>DNO                                       NOT NULL               NUMBER(10)</p>
<p>DNAME                                                                    VARCHAR2(10)</p>
<p><strong>SQL&gt; create table emp(eno number(10),ename varchar2(10),dno number(10),sal number(10),jobid varchar2(10),mgrid varchar2(10),foreign key(dno) references depart(dno));</strong></p>
<p><strong> </strong></p>
<p>Table created</p>
<p><strong>SQL&gt; desc emp;</strong></p>
<p>Name                                 Null?        Type</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>ENO                                                 NUMBER(10)</p>
<p>ENAME                                           VARCHAR2(10)</p>
<p>DNO                                                 NUMBER(10)</p>
<p>SAL                                                  NUMBER(10)</p>
<p>JOBID                                              VARCHAR2(10)</p>
<p>MGRID                                            VARCHAR2(10)</p>
<h3><strong><span style="text-decoration:underline;">TO ALTER THE TABLE</span></strong></h3>
<p><strong><span style="text-decoration:underline;">ADD</span></strong></p>
<p><strong>SQL&gt; alter table emp add(primary key(eno),addr varchar2(10));</strong></p>
<p>Table altered.</p>
<p><strong>SQL&gt; desc emp;</strong></p>
<p><strong> </strong></p>
<p>Name                                      Null?                           Type</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>ENO                                       NOT NULL               NUMBER(10)</p>
<p>ENAME                                                                     VARCHAR2(10)</p>
<p>DNO                                                                          NUMBER(10)</p>
<p>SAL                                                                           NUMBER(10)</p>
<p>JOBID                                                                       VARCHAR2(10)</p>
<p>MGRID                                                                     VARCHAR2(10)</p>
<p>ADDR                                                                         VARCHAR2(10)</p>
<p><strong>SQL&gt; alter table emp add(phno number(5));</strong></p>
<p>Table altered.</p>
<p><strong>SQL&gt; desc emp;</strong></p>
<p>Name                                      Null?                           Type</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>ENO                                       NOT NULL               NUMBER(10)</p>
<p>ENAME                                                                     VARCHAR2(10)</p>
<p>DNO                                                                          NUMBER(10)</p>
<p>SAL                                                                           NUMBER(10)</p>
<p>JOBID                                                                       CHAR(20)</p>
<p>MGRID                                                                     VARCHAR2(10)</p>
<p>ADDR                                                                       VARCHAR2(10)</p>
<p>PHNO                                                                        NUMBER(5)</p>
<p><strong><span style="text-decoration:underline;">MODIFY</span></strong></p>
<p><strong>SQL&gt; alter table emp modify(jobid char);</strong></p>
<p>Table altered.</p>
<p><strong> </strong></p>
<p><strong>SQL&gt; desc emp;</strong></p>
<p>Name                                 Null?                    Type</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>ENO                               NOT NULL           NUMBER(10)</p>
<p>ENAME                                                         VARCHAR2(10)</p>
<p>DNO                                                              NUMBER(10)</p>
<p>SAL                                                               NUMBER(10)</p>
<p>JOBID                                                           CHAR(20)</p>
<p>MGRID                                                         VARCHAR2(10)</p>
<p>ADDR                                                            VARCHAR2(10)</p>
<p>PHNO                                                            VARCHAR2(10)</p>
<p><strong>SQL&gt; alter table emp modify(jobid char(20));</strong></p>
<p>Table altered.</p>
<p><strong>SQL&gt; desc emp;</strong></p>
<p>Name                                  Null?                    Type</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>ENO                               NOT NULL           NUMBER(10)</p>
<p>ENAME                                                         VARCHAR2(10)</p>
<p>DNO                                                              NUMBER(10)</p>
<p>SAL                                                               NUMBER(10)</p>
<p>JOBID                                                           CHAR(20)</p>
<p>MGRID                                                         VARCHAR2(10)</p>
<p>ADDR                                                            VARCHAR2(10)</p>
<p>PHNO                                                            VARCHAR2(10)</p>
<p><strong>SQL&gt; alter table emp modify(jobid char(5));</strong></p>
<p>alter table emp modify(jobid char(5))</p>
<p>*</p>
<p>ERROR at line 1:</p>
<p>ORA-01441: cannot decrease column length because some value is too big</p>
<p><strong><span style="text-decoration:underline;">DROP</span></strong></p>
<p><strong>SQL&gt; alter table emp drop(phno);</strong></p>
<p>Table altered.</p>
<p><strong> </strong></p>
<p><strong>SQL&gt; desc emp;</strong></p>
<p>Name                                 Null?                    Type</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>ENO                                  NOT NULL        NUMBER(10)</p>
<p>ENAME                                                         VARCHAR2(10)</p>
<p>DNO                                                              NUMBER(10)</p>
<p>SAL                                                               NUMBER(10)</p>
<p>JOBID                                                           CHAR(20)</p>
<p>MGRID                                                         VARCHAR2(10)</p>
<p>ADDR                                                             VARCHAR2(10)</p>
<p><strong>SQL&gt; alter table emp drop(addr);</strong></p>
<p>Table altered.</p>
<p><strong>SQL&gt; desc emp;</strong></p>
<p>Name                                 Null?                     Type</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>ENO                                NOT NULL           NUMBER(10)</p>
<p>ENAME                                                          VARCHAR2(10)</p>
<p>DNO                                                               NUMBER(10)</p>
<p>SAL                                                                NUMBER(10)</p>
<p>JOBID                                                            CHAR(20)</p>
<p>MGRID                                                        VARCHAR2(10)</p>
<h3><strong><span style="text-decoration:underline;">TO DROP THE TABLE</span></strong></h3>
<p><strong>SQL&gt; drop table emp;</strong></p>
<p>Table dropped.</p>
<p><strong>SQL&gt; desc emp;</strong></p>
<p>ERROR:</p>
<p>ORA-04043: object emp does not exist</p>
<p><strong> </strong></p>
<br />Filed under: <a href='http://labprograms.wordpress.com/category/dbms/'>DBMS</a>, <a href='http://labprograms.wordpress.com/category/oracle/'>Oracle</a> Tagged: <a href='http://labprograms.wordpress.com/tag/dbms/'>DBMS</a>, <a href='http://labprograms.wordpress.com/tag/oracle/'>Oracle</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/labprograms.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/labprograms.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/labprograms.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/labprograms.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/labprograms.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/labprograms.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/labprograms.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/labprograms.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/labprograms.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/labprograms.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/labprograms.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/labprograms.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/labprograms.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/labprograms.wordpress.com/479/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labprograms.wordpress.com&amp;blog=8434488&amp;post=479&amp;subd=labprograms&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://labprograms.wordpress.com/2010/08/18/working-with-ddl-commands/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bfc8ca04ec731c01be8c56ac90e9ba34?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Arnold</media:title>
		</media:content>
	</item>
		<item>
		<title>Printer Troubleshooting</title>
		<link>http://labprograms.wordpress.com/2010/08/18/printer-troubleshooting/</link>
		<comments>http://labprograms.wordpress.com/2010/08/18/printer-troubleshooting/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 16:54:10 +0000</pubDate>
		<dc:creator>இராய் அந்தோனி அர்னால்டு</dc:creator>
				<category><![CDATA[C Programming]]></category>
		<category><![CDATA[MicroProcessor]]></category>
		<category><![CDATA[8086]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[uP]]></category>

		<guid isPermaLink="false">http://labprograms.wordpress.com/?p=476</guid>
		<description><![CDATA[Working with Printers #include &#60;dos.h&#62; #include &#60;stdio.h&#62; #include &#60;conio.h&#62; #define MAX 40 #define CR 13 #define LF 10 union REGS inregs,outregs; struct SREGS segregs; int mask,i; char strng[MAX]; void main() {       clrscr(); printf(&#8220;\n\n Printer Troubleshooting&#8221;); printf(&#8220;\n\n Enter a string terminated by a &#60;cr&#62;&#8221;); for(i=0;i&#60;MAX-2;i++) { inregs.h.ah = 0&#215;01; intdos(&#38;inregs,&#38;outregs); if (outregs.h.al == CR) {          printf(&#8220;\n&#8221;); [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labprograms.wordpress.com&amp;blog=8434488&amp;post=476&amp;subd=labprograms&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2 style="text-align:center;">Working with Printers</h2>
<p>#include &lt;dos.h&gt;</p>
<p>#include &lt;stdio.h&gt;</p>
<p>#include &lt;conio.h&gt;</p>
<p>#define MAX 40</p>
<p>#define CR 13</p>
<p>#define LF 10</p>
<p>union REGS inregs,outregs;</p>
<p>struct SREGS segregs;</p>
<p>int mask,i;</p>
<p>char strng[MAX];</p>
<p>void main()</p>
<p>{       clrscr();</p>
<p>printf(&#8220;\n\n Printer Troubleshooting&#8221;);</p>
<p>printf(&#8220;\n\n Enter a string terminated by a &lt;cr&gt;&#8221;);</p>
<p>for(i=0;i&lt;MAX-2;i++)</p>
<p>{</p>
<p>inregs.h.ah = 0&#215;01;</p>
<p>intdos(&amp;inregs,&amp;outregs);</p>
<p>if (outregs.h.al == CR)</p>
<p>{          printf(&#8220;\n&#8221;);</p>
<p>strng[i] = CR;</p>
<p>strng[i+1] = LF;</p>
<p>break;</p>
<p>}</p>
<p>else</p>
<p>strng[i] = outregs.h.al;</p>
<p>}</p>
<p>strng[MAX-2] = CR;</p>
<p>strng[MAX-1] = LF;</p>
<p>inregs.h.ah = 2;</p>
<p>inregs.x.dx = 0;</p>
<p>int86(0&#215;17,&amp;inregs,&amp;outregs);</p>
<p>mask = 0&#215;80;</p>
<p>outregs.h.ah &amp;=mask;</p>
<p>if (outregs.h.ah == 0)</p>
<p>printf(&#8220;\n Printer in OFFLINE&#8221;);</p>
<p>else</p>
<p>printf(&#8220;\n Buffering&#8221;);</p>
<p>for (i=0;i &lt; strlen(strng); ++i)</p>
<p>{ inregs.h.ah = 0&#215;05;</p>
<p>inregs.h.dl = strng[i];</p>
<p>intdos(&amp;inregs,&amp;outregs);</p>
<p>}</p>
<p>getch();</p>
<p>}</p>
<br />Filed under: <a href='http://labprograms.wordpress.com/category/c-programming/'>C Programming</a>, <a href='http://labprograms.wordpress.com/category/microprocessor/'>MicroProcessor</a> Tagged: <a href='http://labprograms.wordpress.com/tag/8086/'>8086</a>, <a href='http://labprograms.wordpress.com/tag/c/'>C</a>, <a href='http://labprograms.wordpress.com/tag/up/'>uP</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/labprograms.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/labprograms.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/labprograms.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/labprograms.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/labprograms.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/labprograms.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/labprograms.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/labprograms.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/labprograms.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/labprograms.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/labprograms.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/labprograms.wordpress.com/476/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/labprograms.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/labprograms.wordpress.com/476/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labprograms.wordpress.com&amp;blog=8434488&amp;post=476&amp;subd=labprograms&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://labprograms.wordpress.com/2010/08/18/printer-troubleshooting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bfc8ca04ec731c01be8c56ac90e9ba34?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Arnold</media:title>
		</media:content>
	</item>
		<item>
		<title>Floppy Disk Troubleshooting</title>
		<link>http://labprograms.wordpress.com/2010/08/18/floppy-disk-trouble-shooting/</link>
		<comments>http://labprograms.wordpress.com/2010/08/18/floppy-disk-trouble-shooting/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 16:51:59 +0000</pubDate>
		<dc:creator>இராய் அந்தோனி அர்னால்டு</dc:creator>
				<category><![CDATA[C Programming]]></category>
		<category><![CDATA[MicroProcessor]]></category>
		<category><![CDATA[8086]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[uP]]></category>

		<guid isPermaLink="false">http://labprograms.wordpress.com/?p=473</guid>
		<description><![CDATA[Working with Floppy Disk #include &#60;dos.h&#62; #include &#60;stdio.h&#62; #include &#60;conio.h&#62; union REGS inregs,outregs; void main() {       clrscr(); printf(&#8220;\n\n FDD Trouble shooting&#8221;); inregs.h.ah = 0&#215;36; inregs.h.dl = 0&#215;01; intdos(&#38;inregs,&#38;outregs); if (outregs.h.al == 255) printf(&#8220;\n\n Disk not found or Data Error&#8221;); else { printf(&#8220;\n\n Normal Disk&#8221;); printf(&#8220;\n\n No.of sectors/cluster = %u&#8221;, outregs.x.ax); printf(&#8220;\n\n No. of available clusters [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labprograms.wordpress.com&amp;blog=8434488&amp;post=473&amp;subd=labprograms&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2 style="text-align:center;">Working with Floppy Disk</h2>
<p>#include &lt;dos.h&gt;</p>
<p>#include &lt;stdio.h&gt;</p>
<p>#include &lt;conio.h&gt;</p>
<p>union REGS inregs,outregs;</p>
<p>void main()</p>
<p>{       clrscr();</p>
<p>printf(&#8220;\n\n FDD Trouble shooting&#8221;);</p>
<p>inregs.h.ah = 0&#215;36;</p>
<p>inregs.h.dl = 0&#215;01;</p>
<p>intdos(&amp;inregs,&amp;outregs);</p>
<p>if (outregs.h.al == 255)</p>
<p>printf(&#8220;\n\n Disk not found or Data Error&#8221;);</p>
<p>else</p>
<p>{</p>
<p>printf(&#8220;\n\n Normal Disk&#8221;);</p>
<p>printf(&#8220;\n\n No.of sectors/cluster = %u&#8221;, outregs.x.ax);</p>
<p>printf(&#8220;\n\n No. of available clusters = %u&#8221;, outregs.x.bx);</p>
<p>printf(&#8220;\n\n Size in bytes of physical sector = %u&#8221;, outregs.x.cx);</p>
<p>printf(&#8220;\n\n No. of clusters = %u&#8221;, outregs.x.dx);</p>
<p>}</p>
<p>getch();</p>
<p>}</p>
<br />Filed under: <a href='http://labprograms.wordpress.com/category/c-programming/'>C Programming</a>, <a href='http://labprograms.wordpress.com/category/microprocessor/'>MicroProcessor</a> Tagged: <a href='http://labprograms.wordpress.com/tag/8086/'>8086</a>, <a href='http://labprograms.wordpress.com/tag/c/'>C</a>, <a href='http://labprograms.wordpress.com/tag/up/'>uP</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/labprograms.wordpress.com/473/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/labprograms.wordpress.com/473/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/labprograms.wordpress.com/473/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/labprograms.wordpress.com/473/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/labprograms.wordpress.com/473/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/labprograms.wordpress.com/473/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/labprograms.wordpress.com/473/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/labprograms.wordpress.com/473/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/labprograms.wordpress.com/473/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/labprograms.wordpress.com/473/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/labprograms.wordpress.com/473/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/labprograms.wordpress.com/473/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/labprograms.wordpress.com/473/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/labprograms.wordpress.com/473/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=labprograms.wordpress.com&amp;blog=8434488&amp;post=473&amp;subd=labprograms&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://labprograms.wordpress.com/2010/08/18/floppy-disk-trouble-shooting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bfc8ca04ec731c01be8c56ac90e9ba34?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Arnold</media:title>
		</media:content>
	</item>
	</channel>
</rss>
