<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-3845298350965943586</atom:id><lastBuildDate>Fri, 01 Nov 2024 11:51:57 +0000</lastBuildDate><category>C Programming Language</category><category>Java Programming Language</category><category>Data Structure</category><category>about me</category><category>event</category><category>wise word</category><title>Tutorial of My Programming Experience in College</title><description>This webblog is my note when I studied in Computer Science..&#xa;It contains about programming language which I have learned in college..&#xa;So, I want to share my experience in this webblog..&#xa;I hope this blog can be useful for you..</description><link>http://tutorial-programming.blogspot.com/</link><managingEditor>noreply@blogger.com (7effrey)</managingEditor><generator>Blogger</generator><openSearch:totalResults>17</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3845298350965943586.post-2384892120724055253</guid><pubDate>Sat, 09 Aug 2008 04:10:00 +0000</pubDate><atom:updated>2008-08-09T11:26:47.536+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Data Structure</category><title>[Data Structure] Circularly Linked List - Java Programming Language</title><description>&lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center; line-height: 150%;&quot; align=&quot;center&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 16pt; line-height: 150%; color: red;&quot;&gt;Circularly&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 16pt; line-height: 150%;&quot;&gt;-&lt;span style=&quot;color: rgb(153, 51, 102);&quot;&gt;Linked List&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center; line-height: 150%;&quot; align=&quot;center&quot;&gt;&lt;br /&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size: 16pt; line-height: 150%;&quot;&gt;&lt;span style=&quot;color: rgb(153, 51, 102);&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 102, 0);&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p style=&quot;text-align: justify; line-height: 150%;&quot;&gt;A variant of a linked list in which the first and final nodes are linked together. This can be done for both singly and doubly linked lists. To traverse a circular linked list, you begin at any node and follow the list in either direction until you return to the original node. Viewed another way, circularly-linked lists can be seen as having no beginning or end. This type of list is most useful for managing buffers for data ingest, and in cases where you have one object in a list and wish to see all other objects in the list. The pointer pointing to the whole list may be called the access pointer.&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;a href=&quot;http://tutorial-programming.blogspot.com&quot;&gt;Feel free to visit my blog!!&lt;/a&gt;&lt;/div&gt;</description><link>http://tutorial-programming.blogspot.com/2008/08/data-structure-circularly-linked-list.html</link><author>noreply@blogger.com (7effrey)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3845298350965943586.post-5742146540933586725</guid><pubDate>Fri, 18 Jul 2008 04:40:00 +0000</pubDate><atom:updated>2008-07-18T11:45:19.290+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Data Structure</category><title>[Data Structure] Doubly Linked List - Java Programming Language</title><description>&lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center; line-height: 150%;&quot; align=&quot;center&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;line-height: 150%;font-size:14;color:purple;&quot;  &gt;Doubly&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;line-height: 150%;font-size:14;&quot; &gt;-&lt;span style=&quot;color: rgb(255, 102, 0);&quot;&gt;Linked List&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center; line-height: 150%;&quot; align=&quot;center&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGFMlEhkJRNxKdZDKCRlnamETDGwp00E8GcIz2M64vS5XOvl1R_Ugs2eshSWwlrRo0z3aouUtZ31Q4Bhp6-vY3Cf2YUJpo_PzG4jlPbBSng-Y7UD2A22gDK2iTxeFAEeO8pXLczuxmHRc/s1600-h/DLLNC-Kel+10.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGFMlEhkJRNxKdZDKCRlnamETDGwp00E8GcIz2M64vS5XOvl1R_Ugs2eshSWwlrRo0z3aouUtZ31Q4Bhp6-vY3Cf2YUJpo_PzG4jlPbBSng-Y7UD2A22gDK2iTxeFAEeO8pXLczuxmHRc/s320/DLLNC-Kel+10.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5224210261946940290&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center; line-height: 150%;&quot; align=&quot;center&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;line-height: 150%;font-size:14;&quot; &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify; line-height: 150%;&quot;&gt;A variant of a linked list in which each node has two links : one points to the &lt;i style=&quot;&quot;&gt;previous &lt;/i&gt;node, or points to a null value or empty list if it is the first node; and one points to the &lt;i style=&quot;&quot;&gt;next &lt;/i&gt;node, or points to a null value or empty list if it is the final node. This allows easily accessing list items backward as well as forward and deleting any item in constant time.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;a href=&quot;http://tutorial-programming.blogspot.com&quot;&gt;Feel free to visit my blog!!&lt;/a&gt;&lt;/div&gt;</description><link>http://tutorial-programming.blogspot.com/2008/07/data-structure-doubly-linked-list-java.html</link><author>noreply@blogger.com (7effrey)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGFMlEhkJRNxKdZDKCRlnamETDGwp00E8GcIz2M64vS5XOvl1R_Ugs2eshSWwlrRo0z3aouUtZ31Q4Bhp6-vY3Cf2YUJpo_PzG4jlPbBSng-Y7UD2A22gDK2iTxeFAEeO8pXLczuxmHRc/s72-c/DLLNC-Kel+10.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3845298350965943586.post-8920434458655171010</guid><pubDate>Thu, 06 Mar 2008 14:42:00 +0000</pubDate><atom:updated>2008-03-06T21:59:19.208+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Data Structure</category><title>[Data Structure] Singly Linked List - Java Programming Language</title><description>&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;  &lt;/p&gt;&lt;h2 style=&quot;margin-bottom: 12pt; text-align: center;&quot; align=&quot;center&quot;&gt;&lt;span style=&quot;color:maroon;&quot;&gt;Singly&lt;/span&gt;-&lt;span style=&quot;color:green;&quot;&gt;Linked List&lt;/span&gt;&lt;/h2&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0Gb-nlp_k7QxEdsgkHv92eoxN7n9FHI-nXtznalo3Tknte9-4x-9d3PapxaAJOut2_CdS4qZX4WT09-UvY4ZN6UOEYhw5jqxcLR5OtrI04CpXHCIs8pLsgdeG4j0lFqu_jw_0RFZriOc/s1600-h/SLLNC-Kel+10.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0Gb-nlp_k7QxEdsgkHv92eoxN7n9FHI-nXtznalo3Tknte9-4x-9d3PapxaAJOut2_CdS4qZX4WT09-UvY4ZN6UOEYhw5jqxcLR5OtrI04CpXHCIs8pLsgdeG4j0lFqu_jw_0RFZriOc/s320/SLLNC-Kel+10.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5174639491724065170&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify; line-height: 150%;&quot;&gt;Each item called Node in the Singly linked list is stored with an indication of where the next item is. To access the data in the middle of the list, head, which is the first node, is used to know where the first item is. Different with array, a linked list allows addition or deletion of items in the middle of collection with only a constant amount of data movement. To conclude, The list will be a chain of objects of type Node that contain the data and a reference to the next Node in the list.&lt;/p&gt;    &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;span class=&quot;fullpost&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;The implementation of class Singly Linked List in Java Programming Language :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;class Node{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;int data;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;Node next;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;class &lt;b style=&quot;&quot;&gt;LinkedList&lt;/b&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;Node head;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//posisi awal dari linked list&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;Node tail;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//posisi akhir dari linked list&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:blue;&quot;   &gt;/**&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:blue;&quot;   &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;* Fungsi untuk mengecek apakah linked list masih kosong&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:blue;&quot;   &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;*/&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;boolean &lt;b style=&quot;&quot;&gt;isEmpty&lt;/b&gt;(){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: 18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;return (head==null);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;void &lt;b style=&quot;&quot;&gt;addFirst&lt;/b&gt;(Node input){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;if (isEmpty()){&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//Jika linked list masih kosong,&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;head = input;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//maka head dan tail sama dengan node input&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;tail = input;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;else {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;input.next = head;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//Jika linked list sudah berisi,&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;head = input;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//maka input akan di depan dan menjadi head&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;void &lt;b style=&quot;&quot;&gt;addLast&lt;/b&gt;(Node input){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;if (isEmpty()){&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//Jika linked list masih kosong,&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;head = input;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//maka head dan tail sama dengan node input&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;tail = input;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;else {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;tail.next = input;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//Jika linked list sudah berisi,&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;tail = input;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//maka input akan di belakang dan menjadi tail&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;void &lt;b style=&quot;&quot;&gt;insertAfter&lt;/b&gt;(int key,Node input){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;Node temp = head;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;do {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;if (temp.data == key){&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//Jika data sama dengan key, maka input&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;              &lt;/span&gt;input.next = temp.next; &lt;span style=&quot;color:blue;&quot;&gt;//disambung diantara temp dan temp.next&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;              &lt;/span&gt;temp.next = input;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;              &lt;/span&gt;System.out.println(&quot;Insert data is succeed.&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;break;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//dari temp --&gt; temp.next menjadi :&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;}&lt;span style=&quot;&quot;&gt;                   &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//temp --&gt; input --&gt; temp.next&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;temp = temp.next;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;while (temp!=null);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;void &lt;b style=&quot;&quot;&gt;insertBefore&lt;/b&gt;(int key,Node input){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;Node temp = head;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;while (temp != null){&lt;span style=&quot;&quot;&gt;               &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;if ((temp.data == key)&amp;amp;&amp;amp;(temp == head)){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;this.addFirst(input);&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;/* jika insert pada awal linked list&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;color:blue;&quot;   &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;                                      &lt;/span&gt;maka call method addFirst */&lt;/span&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;System.out.println(&quot;Insert data is succeed.&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;else if (temp.next.data == key){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;input.next = temp.next;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//dari temp --&gt; temp.next menjadi&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;temp.next = input;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//temp --&gt; input --&gt; temp.next&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;System.out.println(&quot;Insert data is succeed.&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;temp = temp.next;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;void &lt;b style=&quot;&quot;&gt;removeFirst&lt;/b&gt;(){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;Node temp = head;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;if (!isEmpty()){&lt;span style=&quot;&quot;&gt;                          &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;if (head == tail){&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//jika element linked list hanya 1,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;head = tail = null;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//maka head dan tail menjadi null&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;}&lt;span style=&quot;&quot;&gt;                      &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//sehingga linked list kosong&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;else {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;temp = temp.next;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//memajukan temp ke temp.next&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;head = temp;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//kemudian head dipindah ke temp&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;temp = null;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//kemudian temp di-null (optional)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;else System.out.println(&quot;Data is empty!&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;void &lt;b style=&quot;&quot;&gt;removeLast&lt;/b&gt;(){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;Node temp = head;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;if (!isEmpty()){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;if (tail == head){&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//jika element linked list hanya 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;head = tail = null;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//maka head dan tail menjadi null&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;}&lt;span style=&quot;&quot;&gt;                      &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//sehingga linked list kosong&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;else {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;while (temp.next != tail){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;temp = temp.next;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//memajukan temp hingga satu elemen&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;}&lt;span style=&quot;&quot;&gt;                                  &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//sebelum tail.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;temp.next = null;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//temp.next di-null,dan jadi akhir LL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;tail = temp;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//tail dipindah ke temp&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;temp = null;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;else System.out.println(&quot;Data is empty!&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;void &lt;b style=&quot;&quot;&gt;remove&lt;/b&gt;(int key){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;Node temp = head;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;if (!isEmpty()){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;while (temp != null){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;if (temp.next.data == key){&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//mengganti temp.next dengan&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;temp.next = temp.next.next; &lt;span style=&quot;color:blue;&quot;&gt;//temp.next.next&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;break;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//dari temp --&gt; temp.next --&gt;temp.next.next&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;}&lt;span style=&quot;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//menjadi temp --&gt; temp.next.next&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;else if ((temp.data == key)&amp;amp;&amp;amp;(temp == head)){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;this.removeFirst();&lt;span style=&quot;color:blue;&quot;&gt;//jika key berada pada awal linked list,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;                &lt;/span&gt;break;&lt;span style=&quot;&quot;&gt;              &lt;/span&gt;&lt;span style=&quot;color:blue;&quot;&gt;//maka call method removeFirst&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;             &lt;/span&gt;temp = temp.next;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;} else System.out.println(&quot;Data is empty!&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;void &lt;b style=&quot;&quot;&gt;find&lt;/b&gt; (int key){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;int i = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;boolean found = false;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;Node temp = head;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;while (temp != null){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;if (temp.data == key){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;found = true;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;i++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;temp = temp.next;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;if (found){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;System.out.println(key+&quot; is found at index &quot;+i);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;else System.out.println(&quot;Data isn&#39;t found&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;void &lt;b style=&quot;&quot;&gt;printNode&lt;/b&gt;(){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;Node temp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;temp = head;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;while (temp != null){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;System.out.println(temp.data);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;temp = temp.next;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;a href=&quot;http://tutorial-programming.blogspot.com&quot;&gt;Feel free to visit my blog!!&lt;/a&gt;&lt;/div&gt;</description><link>http://tutorial-programming.blogspot.com/2008/03/data-structure-singly-linked-list-java.html</link><author>noreply@blogger.com (7effrey)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0Gb-nlp_k7QxEdsgkHv92eoxN7n9FHI-nXtznalo3Tknte9-4x-9d3PapxaAJOut2_CdS4qZX4WT09-UvY4ZN6UOEYhw5jqxcLR5OtrI04CpXHCIs8pLsgdeG4j0lFqu_jw_0RFZriOc/s72-c/SLLNC-Kel+10.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3845298350965943586.post-6933220207091688309</guid><pubDate>Thu, 06 Mar 2008 12:57:00 +0000</pubDate><atom:updated>2008-03-06T20:33:47.849+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Java Programming Language</category><title>[Java] Linked List - Introduction - Data Structures</title><description>&lt;h2 style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;Linked List&lt;/span&gt; - &lt;span style=&quot;color: rgb(204, 153, 255);&quot;&gt;Introduction&lt;/span&gt;&lt;/h2&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 12pt 0cm 6pt; text-align: justify; line-height: 150%;&quot;&gt;A Linked List is a concrete data structure consisting of a sequence of nodes, each containing arbitrary data fields and one or two references (&quot;links&quot;) pointing to the next and/or previous nodes.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 12pt 0cm 6pt; text-align: justify; line-height: 150%;&quot;&gt;The principal benefit of a linked list over a conventional array is that the order of the linked items may be different from the order that the data items are stored in memory or on disk, allowing the list of items to be traversed in a different order. &lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 12pt 0cm 6pt; text-align: justify; line-height: 150%;&quot;&gt;A linked list is a self-referential data type because it contains a pointer or link to another node of the same type. &lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin: 12pt 0cm 6pt; text-align: justify; line-height: 150%;&quot;&gt;Linked lists permit insertion and removal of nodes at any point in the list in constant time, but do not allow random access like array. &lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;Several types of linked list :&lt;/p&gt;  &lt;ol style=&quot;margin-top: 0cm;&quot; start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;Singly-Linked List&lt;/li&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;Doubly-Linked List&lt;/li&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;Circularly-Linked List &lt;/li&gt;&lt;/ol&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 54pt; text-indent: -18pt; line-height: 150%;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;&quot;&gt;a.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;       &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Single-Circularly-Linked List&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 54pt; text-indent: -18pt; line-height: 150%;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;&quot;&gt;b.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Double-Circularly-Linked List&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;a href=&quot;http://tutorial-programming.blogspot.com&quot;&gt;Feel free to visit my blog!!&lt;/a&gt;&lt;/div&gt;</description><link>http://tutorial-programming.blogspot.com/2008/03/java-linked-list-introduction-data.html</link><author>noreply@blogger.com (7effrey)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3845298350965943586.post-2252721847762263135</guid><pubDate>Thu, 06 Mar 2008 10:07:00 +0000</pubDate><atom:updated>2008-03-06T17:38:15.348+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Java Programming Language</category><title>[Java] Array - Java Programming Language</title><description>&lt;h2 style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;Array – &lt;span style=&quot;color: red;&quot;&gt;Java Programming Language&lt;/span&gt;&lt;/h2&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -90pt; line-height: 150%;&quot;&gt;Array Declaration and Initialization : &lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -90pt; line-height: 150%;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;a)&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;b style=&quot;&quot;&gt;1 Dimensional Array&lt;/b&gt; :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -54pt; line-height: 150%;&quot;&gt;Declaration :&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;&lt;span style=&quot;font-size: 10pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;|data type|[ ] |variable name|;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: 27pt; line-height: 150%;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;|data type||variable name|[ ];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -54pt; line-height: 150%;&quot;&gt;Example : &lt;span style=&quot;font-size: 10pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;int x[ ];&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;/* or */ int [ ] x;&lt;/span&gt;&lt;/p&gt;  &lt;span class=&quot;fullpost&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -54pt; line-height: 150%;&quot;&gt;Initialize Array / Instansiate Object with &lt;i style=&quot;&quot;&gt;constructor&lt;/i&gt; :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: 27pt; line-height: 150%;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;|variable name|= new |data type|[sum_of_array];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -54pt; line-height: 150%;&quot;&gt;Example : &lt;span style=&quot;font-size: 10pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;x = new int[10];&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -54pt; line-height: 150%;&quot;&gt;We can also write these together &lt;span style=&quot;&quot;&gt; &lt;/span&gt;:&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: 27pt; line-height: 150%;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;|data type||variable name|[ ] = new |data type|[sum_of_array];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify; line-height: 150%;&quot;&gt;Example : &lt;span style=&quot;font-size: 10pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;int x[ ] = new int [10];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -90pt; line-height: 150%;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;b)&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;b style=&quot;&quot;&gt;2 Dimensional Array &lt;/b&gt;:&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -54pt; line-height: 150%;&quot;&gt;Declaration : &lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;font-size: 10pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;|data type|[ ][ ] |variable name|;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: 27pt; line-height: 150%;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;|data type||variable name|[ ][ ];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -54pt; line-height: 150%;&quot;&gt;Example : &lt;span style=&quot;font-size: 10pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;int x[ ][ ]; /* or */ int [ ][ ] x;&lt;/span&gt;&lt;/p&gt;  &lt;span class=&quot;fullpost&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -54pt; line-height: 150%;&quot;&gt;Initialize Array / Instansiate Object with &lt;i style=&quot;&quot;&gt;constructor&lt;/i&gt; :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: 27pt; line-height: 150%;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;|variable name|= new |data type|[sum_of_array][sum_of_array];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -54pt; line-height: 150%;&quot;&gt;Example : &lt;span style=&quot;font-size: 10pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;x = new int[10][10];&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -54pt; line-height: 150%;&quot;&gt;We can also write these together &lt;span style=&quot;&quot;&gt; &lt;/span&gt;:&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-indent: 27pt; line-height: 150%;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;|data type||variable name|[ ] = new |data type|[sum_of_array] [sum_of_array];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -54pt; line-height: 150%;&quot;&gt;Example : &lt;span style=&quot;font-size: 10pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;int x[ ][ ] = new int [10][10];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;a href=&quot;http://tutorial-programming.blogspot.com&quot;&gt;Feel free to visit my blog!!&lt;/a&gt;&lt;/div&gt;</description><link>http://tutorial-programming.blogspot.com/2008/03/java-array-java-programming-language.html</link><author>noreply@blogger.com (7effrey)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3845298350965943586.post-8326503983629011600</guid><pubDate>Mon, 03 Mar 2008 16:53:00 +0000</pubDate><atom:updated>2008-03-04T00:06:25.813+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Java Programming Language</category><title>[Java] Simple Java Coding - Hello World!</title><description>&lt;h2 style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;Simple Java Coding – &lt;span style=&quot;color: rgb(204, 0, 0);&quot;&gt;H&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 255, 0);&quot;&gt;e&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 153, 0);&quot;&gt;ll&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 102);&quot;&gt;o&lt;/span&gt; &lt;span style=&quot;color: rgb(255, 153, 0);&quot;&gt;W&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 102, 102);&quot;&gt;o&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 0, 204);&quot;&gt;r&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 51, 0);&quot;&gt;l&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 255, 255);&quot;&gt;d&lt;/span&gt;!&lt;/h2&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify; line-height: 150%;&quot;&gt;What’s wrong with the program below?&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;public class &lt;st1:place st=&quot;on&quot;&gt;Main&lt;/st1:place&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 45pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;void show(){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;System.out.println(&quot;Hello World!&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 45pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 45pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;public static void main (String args[])&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 45pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;int value;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;show();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;System.out.println(value);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 45pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;span class=&quot;fullpost&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;The answer :&lt;/p&gt;  &lt;ol style=&quot;margin-top: 0cm;&quot; start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;the value of variable int value isn’t initialized yet&lt;/li&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;Method which has static access modifier can only      call method which type is static&lt;/li&gt;&lt;/ol&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;Correction :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;public class &lt;st1:place st=&quot;on&quot;&gt;Main&lt;/st1:place&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 45pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;static void show(){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;System.out.println(&quot;Hello World!&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 45pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 45pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;public static void main (String args[])&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 45pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;int value = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;show();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;System.out.println(value);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 45pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;line-height: 150%;&quot;&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;This program will&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;run well. Try it to make a simple java program.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;a href=&quot;http://tutorial-programming.blogspot.com&quot;&gt;Feel free to visit my blog!!&lt;/a&gt;&lt;/div&gt;</description><link>http://tutorial-programming.blogspot.com/2008/03/java-simple-java-coding-hello-world.html</link><author>noreply@blogger.com (7effrey)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3845298350965943586.post-7537139058327681076</guid><pubDate>Mon, 03 Mar 2008 16:14:00 +0000</pubDate><atom:updated>2008-03-03T23:36:24.020+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Java Programming Language</category><title>[Java] Simple Java Programming Language Keywords</title><description>&lt;h2 style=&quot;text-align: center; color: rgb(102, 0, 0);&quot; align=&quot;center&quot;&gt;Simple Java Keywords&lt;/h2&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -72pt; line-height: 150%;&quot;&gt;a) &lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;font-size: 11pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;&quot;&gt;       &lt;/span&gt;: &lt;span style=&quot;&quot;&gt; &lt;/span&gt;Produce a single instans from a class dan make reference to that object.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -72pt; line-height: 150%;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;Example :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;class box {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;int w,h,l;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;box() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;         &lt;/span&gt;this.w = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;         &lt;/span&gt;this.h = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;         &lt;/span&gt;this.l = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;public class BoxData&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;public static void main(String[] args)&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;         &lt;/span&gt;box k = new box();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;//k is a reference to an object of box class&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -90pt; line-height: 150%;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;b)&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;font-size: 11pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;private&lt;/span&gt;:&lt;span style=&quot;&quot;&gt; &lt;/span&gt;Give a special access to a class so it can only be used by its class.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -90pt; line-height: 150%;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;Example :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;class box {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;int w,h,l;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;box() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;         &lt;/span&gt;this.w = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;         &lt;/span&gt;this.h = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;         &lt;/span&gt;this.l = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -72pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;&quot;&gt;//w,h,and l variable can only be used by class Box&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -72pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -90pt; line-height: 150%;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;c)&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;font-size: 11pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;:&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;Give a special access to a class so it can be used by all classes. &lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -90pt; line-height: 150%;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;Example :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;class box {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;int w,h,l;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;box() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;         &lt;/span&gt;this.w = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;         &lt;/span&gt;this.h = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;         &lt;/span&gt;this.l = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -72pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;&quot;&gt;//class box can be accessed by all classes include different package.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -72pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -90pt; line-height: 150%;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;d)&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;font-size: 10pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;:&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;A special referenced symbol used in a method accessed by active object.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -90pt; line-height: 150%;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;Example :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;class box {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;int w,h,l;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;box() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;         &lt;/span&gt;this.w = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;         &lt;/span&gt;this.h = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;         &lt;/span&gt;this.l = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt; text-align: justify; text-indent: -54pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -72pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -90pt; line-height: 150%;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;e)&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;font-size: 10pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;protected&lt;/span&gt;: Give a special access to a class so it can be used by a method which is in that class and subclass elements. &lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -90pt; line-height: 150%;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;Example :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -72pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;class box {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -72pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;protected int w,h,l;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -72pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;protected getW(){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -72pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;return this.w;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -72pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -72pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;box() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -72pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;this.w = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -72pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;this.h = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -72pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;this.l = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -72pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -72pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;};&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt; text-align: justify; text-indent: -72pt; line-height: 150%;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;a href=&quot;http://tutorial-programming.blogspot.com&quot;&gt;Feel free to visit my blog!!&lt;/a&gt;&lt;/div&gt;</description><link>http://tutorial-programming.blogspot.com/2008/03/java-simple-java-programming-language.html</link><author>noreply@blogger.com (7effrey)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3845298350965943586.post-7951488388124194989</guid><pubDate>Sun, 02 Mar 2008 17:07:00 +0000</pubDate><atom:updated>2008-03-04T00:34:07.060+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Java Programming Language</category><title>[Java] Introduction to Java Programming Language</title><description>&lt;h2 style=&quot;text-align: center; line-height: 150%;&quot; align=&quot;center&quot;&gt;Introduction to &lt;span style=&quot;color: rgb(204, 0, 0);&quot;&gt;Java Programming Language&lt;/span&gt;&lt;/h2&gt;  &lt;p style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9IAo_BmaTsrCHqiM341ZWrA06yzQj4Cy55nNVk_fTqD-YKKh1BZDL7UTlQxg0OF4WWn9cFNshmPKwFKXQSaaQCLxmRUsn9-_T54OdPqkzuwxwYVSLDQ2WvB8TaEnc78VoWBBTUO0Frwg/s1600-h/java_sun.jpg&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9IAo_BmaTsrCHqiM341ZWrA06yzQj4Cy55nNVk_fTqD-YKKh1BZDL7UTlQxg0OF4WWn9cFNshmPKwFKXQSaaQCLxmRUsn9-_T54OdPqkzuwxwYVSLDQ2WvB8TaEnc78VoWBBTUO0Frwg/s320/java_sun.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5173569694848486210&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;b&gt;Java&lt;/b&gt; is a programming language originally developed by Sun Microsystems and released in 1995 as a core component of Sun&#39;s Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to bytecode which can run on any Java virtual machine (JVM) regardless of computer architecture.&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/p&gt;  &lt;p style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify; line-height: 150%;&quot;&gt;The original and reference implementation Java compilers, virtual machines, and class libraries were developed by Sun from 1995. As of May 2007, in compliance with the specifications of the Java Community Process, Sun made available most of their Java technologies as free software under the GNU General Public License. Others have also developed alternative implementations of these Sun technologies, such as the GNU Compiler for Java and GNU Classpath.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;span class=&quot;fullpost&quot;&gt;&lt;h3 style=&quot;line-height: 150%;&quot;&gt;HISTORY&lt;/h3&gt;  &lt;p style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify; line-height: 150%;&quot;&gt;The Java language was created by James Gosling in June 1991 for use in a set top box project. The language was initially called &lt;i&gt;Oak&lt;/i&gt;, after an &lt;span class=&quot;mw-redirect&quot;&gt;oak tree&lt;/span&gt; that stood outside Gosling&#39;s office - and also went by the name &lt;i&gt;Green&lt;/i&gt; - and ended up later being renamed to &lt;i&gt;Java&lt;/i&gt;, from a list of random words. Gosling&#39;s goals were to implement a virtual machine and a language that had a familiar C/C++ style of notation. The first public implementation was Java 1.0 in 1995. It promised &quot;Write Once, Run Anywhere&quot; (WORA), providing no-cost runtimes on popular platforms. It was fairly secure and its security was configurable, allowing network and file access to be restricted. Major web browsers soon incorporated the ability to run secure Java &lt;i&gt;applets&lt;/i&gt; within web pages. Java quickly became popular. With the advent of &lt;i&gt;Java 2&lt;/i&gt;, new versions had multiple configurations built for different types of platforms. For example, &lt;span class=&quot;mw-redirect&quot;&gt;&lt;i&gt;J2EE&lt;/i&gt;&lt;/span&gt; was for enterprise applications and the greatly stripped down version &lt;span class=&quot;mw-redirect&quot;&gt;&lt;i&gt;J2ME&lt;/i&gt;&lt;/span&gt; was for mobile applications. &lt;span class=&quot;mw-redirect&quot;&gt;&lt;i&gt;J2SE&lt;/i&gt;&lt;/span&gt; was the designation for the Standard Edition. In 2006, for marketing purposes, new &lt;i&gt;J2&lt;/i&gt; versions were renamed &lt;i&gt;Java EE&lt;/i&gt;, &lt;i&gt;Java ME&lt;/i&gt;, and &lt;i&gt;Java SE&lt;/i&gt;, respectively.&lt;/p&gt;  &lt;p style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify; line-height: 150%;&quot;&gt;In 1997, Sun Microsystems approached the ISO/IEC JTC1 standards body and later the Ecma International to formalize Java, but it soon withdrew from the process. Java remains a de facto standard that is controlled through the Java Community Process. At one time, Sun made most of its Java implementations available without charge although they were proprietary software. Sun&#39;s revenue from Java was generated by the selling of licenses for specialized products such as the Java Enterprise System. Sun distinguishes between its &lt;span class=&quot;mw-redirect&quot;&gt;Software Development Kit (SDK)&lt;/span&gt; and Runtime Environment (JRE) which is a subset of the SDK, the primary distinction being that in the JRE, the compiler, utility programs, and many necessary header files are not present.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify; line-height: 150%;&quot;&gt;On 13 November 2006, Sun released much of Java as free software under the terms of the GNU General Public License (GPL). On 8 May 2007 Sun finished the process, making all of Java&#39;s core code open source, aside from a small portion of code to which Sun did not hold the copyright.&lt;/p&gt;  &lt;/span&gt;&lt;h3 style=&quot;line-height: 150%;&quot;&gt;JAVA IDE&lt;/h3&gt;  &lt;p style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify; line-height: 150%;&quot;&gt;Java IDE makes us easier to make a program because we don’t need to remember the syntax and we can compile just with one click. For Java Programming Language, I suggest you to use NetBeans 6.0 and install Java Development Kit (1.6) which are free licensed. JCreator also can be used, but you must purchase a licensed. So, I suggest to use NetBeans 6.0 for learning. &lt;/p&gt;  &lt;p style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify; line-height: 150%;&quot;&gt;You can download&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;it here :&lt;br /&gt;&lt;a href=&quot;http://java.sun.com/javase/downloads/index.jsp&quot;&gt;http://java.sun.com/javase/downloads/index.jsp&lt;/a&gt;&lt;/p&gt;  &lt;p style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;span class=&quot;fullpost&quot;&gt;&lt;p style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify; line-height: 150%;&quot;&gt;Source : en.wikipedia.org/wiki&lt;/p&gt;  &lt;p style=&quot;margin: 0cm 0cm 0.0001pt; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;a href=&quot;http://tutorial-programming.blogspot.com&quot;&gt;Feel free to visit my blog!!&lt;/a&gt;&lt;/div&gt;</description><link>http://tutorial-programming.blogspot.com/2008/03/java-introduction-to-java-programming.html</link><author>noreply@blogger.com (7effrey)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9IAo_BmaTsrCHqiM341ZWrA06yzQj4Cy55nNVk_fTqD-YKKh1BZDL7UTlQxg0OF4WWn9cFNshmPKwFKXQSaaQCLxmRUsn9-_T54OdPqkzuwxwYVSLDQ2WvB8TaEnc78VoWBBTUO0Frwg/s72-c/java_sun.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3845298350965943586.post-6990667061904466499</guid><pubDate>Fri, 22 Feb 2008 16:04:00 +0000</pubDate><atom:updated>2008-02-22T23:14:21.373+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">wise word</category><title>[WISE WORD] A Story About Frog</title><description>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;h2&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;A Story About&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 153, 0);&quot;&gt;FROG&lt;/span&gt;&lt;br /&gt;&lt;/h2&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZUql0Z33bhpaAvLi1qLoCTFmzASbmRuWkxjNpYTR4VC2Se_lwjLvEi6A0xIIBEfdcHqNimOTxX9AHj8jXwmCyRLnIXrrp8CPwGUVRdFtrW_y1cPZDgo_Ry8m5Rs_G_lkFp7n4HQfChlk/s1600-h/FROG0406.JPG&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 181px; height: 209px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZUql0Z33bhpaAvLi1qLoCTFmzASbmRuWkxjNpYTR4VC2Se_lwjLvEi6A0xIIBEfdcHqNimOTxX9AHj8jXwmCyRLnIXrrp8CPwGUVRdFtrW_y1cPZDgo_Ry8m5Rs_G_lkFp7n4HQfChlk/s320/FROG0406.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5169838189285178738&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;One day there was a competition. That was a race competition and the participants were frogs. The first frog who can climb and reach the top of the tower would be the winner. Then the competition was begun. Frogs were trying hard to climb that tower, many audiences screamed &quot;It&#39;s impossible to reach the top of the tower because it&#39;s too high&quot;. What have the audiences said became true, many frogs were falling down. Finally just one frog left, and that frog can reach the top. He was a winner. He was succeeded lose his frightened. The audiences were confused why it could be happened. In fact the frog who was the winner was deaf so he couldn&#39;t hear what the audiences have screamed.&lt;br /&gt;&lt;/div&gt;&lt;p align=&quot;center&quot;&gt;&lt;br /&gt;&lt;strong&gt;WHAT YOU THINK IT&#39;S BECOME TRUE SO ALWAYS POSITIVE THINKING and WHAT YOU HEAR IS INFLUENTED YOUR MIND N POWER SO BECOME A &quot;DEAF&quot; IS THE BEST WAY, NEVER HEAR WORDS THAT IS NEGATIVE. BECAUSE THE NEGATIVE WORD CAN DROP OUR WISHED N OUR EFFORT...ALWAYS BELIEVES YOURSELF N NEVER SAY NEVER N IMPOSSIBLE!&lt;/strong&gt;&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;a href=&quot;http://tutorial-programming.blogspot.com&quot;&gt;Feel free to visit my blog!!&lt;/a&gt;&lt;/div&gt;</description><link>http://tutorial-programming.blogspot.com/2008/02/wise-word-story-about-frog.html</link><author>noreply@blogger.com (7effrey)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZUql0Z33bhpaAvLi1qLoCTFmzASbmRuWkxjNpYTR4VC2Se_lwjLvEi6A0xIIBEfdcHqNimOTxX9AHj8jXwmCyRLnIXrrp8CPwGUVRdFtrW_y1cPZDgo_Ry8m5Rs_G_lkFp7n4HQfChlk/s72-c/FROG0406.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3845298350965943586.post-3041162111991601903</guid><pubDate>Sat, 16 Feb 2008 13:39:00 +0000</pubDate><atom:updated>2008-03-03T23:48:48.289+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Programming Language</category><title>[C Programming Language] Repetition/Looping in C Programming Language</title><description>&lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size:14;&quot;&gt;REPETITION / LOOPING IN C PROGRAMMING LANGUAGE&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size:14;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Repetiton / Looping :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-indent: -18pt;&quot;&gt;-&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;A process which is done contionusly until particular value. If the limit isn’t typed, then syntax will be error because that process will be an infinite loop.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Looping which is usually used is Counting Loops. Why is it called conting loops? Because its repetition is managed by a loop control variable whose value represents a count. It is used when we can determine how many loops will be needed exactly.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;The pseudocode of Counting Loops :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;Set loop control variable to an initial value of 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;While loop control variable &lt;&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;... //Do something multiple times&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;Increase loop control variable by 1.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Three types of Counting Loops in C Programming Language :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;a.&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;FOR&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;Syntax : &lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;               &lt;/span&gt;for(initialize; test; update)&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 63pt;&quot;&gt;{&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 81pt;&quot;&gt;//Steps to perform each iteration&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 63pt;&quot;&gt;}&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 63pt;&quot;&gt;Initialize - - &gt; initial condition of control variable&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 63pt;&quot;&gt;Test - - &gt; relational expression which is a condition&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 63pt;&quot;&gt;Update - - &gt; change the value of control variable&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;For Example :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 36pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;int p = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 36pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;int i;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 36pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;for (i=0;i&lt;10;i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 36pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-indent: 36pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;p=p+i;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;Note :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;p = p + 1&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;is equal with p++ and p += 1.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;Flowchart :&lt;/p&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGiB6lTG2K8zOiMckpRHN_lGBGbHPB-7VEm32B8oziIxFuQrqWtGax5o1RMBNZhKK84fTGCHGnYhJaBCx_dUe5knTwI0avDdisDhqUNAoLK955jrigc3DySTIOkQNVcBqSiX0sIcIoN_I/s1600-h/DO-WHILE+Flowchart.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGiB6lTG2K8zOiMckpRHN_lGBGbHPB-7VEm32B8oziIxFuQrqWtGax5o1RMBNZhKK84fTGCHGnYhJaBCx_dUe5knTwI0avDdisDhqUNAoLK955jrigc3DySTIOkQNVcBqSiX0sIcIoN_I/s320/DO-WHILE+Flowchart.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5167572692820786434&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;span class=&quot;fullpost&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;b.&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;WHILE (Pre Tested &lt;st1:place st=&quot;on&quot;&gt;Loop&lt;/st1:place&gt;) :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;Syntax :&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 63pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;While(condition)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 63pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;//Steps to perform.&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;These should eventually &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;// result in condition being false&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 63pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;For Example :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;int p=0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;int i=0;&lt;span style=&quot;&quot;&gt;          &lt;/span&gt;//initialization&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 36pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;while (i&lt;10)&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;//testing&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 36pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-indent: 36pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;p=p+i;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;i++;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;//updating&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 36pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;Note :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;If any of initialization, testing and updating are skipped, it may produce an infinite loop.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;Flowchart :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGiB6lTG2K8zOiMckpRHN_lGBGbHPB-7VEm32B8oziIxFuQrqWtGax5o1RMBNZhKK84fTGCHGnYhJaBCx_dUe5knTwI0avDdisDhqUNAoLK955jrigc3DySTIOkQNVcBqSiX0sIcIoN_I/s1600-h/DO-WHILE+Flowchart.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGiB6lTG2K8zOiMckpRHN_lGBGbHPB-7VEm32B8oziIxFuQrqWtGax5o1RMBNZhKK84fTGCHGnYhJaBCx_dUe5knTwI0avDdisDhqUNAoLK955jrigc3DySTIOkQNVcBqSiX0sIcIoN_I/s320/DO-WHILE+Flowchart.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5167572692820786434&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;c.&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;DO-WHILE (Post Tested &lt;st1:place st=&quot;on&quot;&gt;Loop&lt;/st1:place&gt;) :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;Syntax :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 63pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;Do&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 63pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;//Steps to perform.&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;These should eventually &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 90pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;// result in condition being false&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 63pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 63pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;While (condition);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;For Example :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;int i=0&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;//initialization&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;int p=0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 36pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;do&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;p=p+1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-indent: 36pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;i++;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;//updating&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 36pt;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:10;&quot;  &gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;while (i&lt;10);&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;//testing&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;Flowchart :&lt;/p&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoop777H2xDYucOosEp2G-JuUFdL9HMGGoupZ7dUOcztOOesHsP2AEQgoe9A6Swajpx1Pqeg85iaSOUu-iigU0kmd2yYGRt9yWwfQ_nL8UZZJgThpi1FxkaeBEBYDAktuv_UO4Y-eZ2dg/s1600-h/FOR-WHILE+Flowchart.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoop777H2xDYucOosEp2G-JuUFdL9HMGGoupZ7dUOcztOOesHsP2AEQgoe9A6Swajpx1Pqeg85iaSOUu-iigU0kmd2yYGRt9yWwfQ_nL8UZZJgThpi1FxkaeBEBYDAktuv_UO4Y-eZ2dg/s320/FOR-WHILE+Flowchart.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5167572512432159986&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;Debug and Test Looping Programs :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-indent: -18pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;&quot;&gt;1.&lt;span style=&quot;;font-family:&amp;quot;;font-size:7;&quot;  &gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Using debugger programs.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-indent: -18pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;&quot;&gt;2.&lt;span style=&quot;;font-family:&amp;quot;;font-size:7;&quot;  &gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Use several printf statement to output the value of variables.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-indent: -18pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;&quot;&gt;3.&lt;span style=&quot;;font-family:&amp;quot;;font-size:7;&quot;  &gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Testing the programs with try and error.&lt;/p&gt;&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;a href=&quot;http://tutorial-programming.blogspot.com&quot;&gt;Feel free to visit my blog!!&lt;/a&gt;&lt;/div&gt;</description><link>http://tutorial-programming.blogspot.com/2008/02/c-programming-language.html</link><author>noreply@blogger.com (7effrey)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGiB6lTG2K8zOiMckpRHN_lGBGbHPB-7VEm32B8oziIxFuQrqWtGax5o1RMBNZhKK84fTGCHGnYhJaBCx_dUe5knTwI0avDdisDhqUNAoLK955jrigc3DySTIOkQNVcBqSiX0sIcIoN_I/s72-c/DO-WHILE+Flowchart.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3845298350965943586.post-4309777988166199968</guid><pubDate>Sat, 16 Feb 2008 13:36:00 +0000</pubDate><atom:updated>2008-02-16T20:43:44.158+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Programming Language</category><title>[C Programming Language] Standard Function in C Programming Language</title><description>&lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center; line-height: 150%;&quot; align=&quot;center&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;line-height: 150%;font-size:14;&quot; &gt;C Programming Language Standard Function&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify; line-height: 150%;&quot;&gt;Functions which is often used in C Programming Language :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;a.&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;printf&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify; line-height: 150%;&quot;&gt;a function in stdio.h library which is used to show string and also placeholders to screen.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;b.&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;puts&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify; line-height: 150%;&quot;&gt;a function used to show a string to screen when the placeholders isn’t used. &lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;c.&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;scanf&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify; line-height: 150%;&quot;&gt;a function which is used to store data whose type is represented by a placeholder in string format to variable memory address which has been decided.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;d.&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;getch&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify; line-height: 150%;&quot;&gt;a function which is used to read data whose type is character without key ENTER pressed and it won’t be showed. This function is usually used to show output on the screen until key ENTER pressed.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;e.&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;getche&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify; line-height: 150%;&quot;&gt;a function which is used to read data whose type is character without key ENTER pressed and the character will be showed on the screen.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;f.&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;getchar&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify; line-height: 150%;&quot;&gt;a function which is used to read data whose type is character, the character will be showed on screen and must be finished with key ENTER pressed.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;g.&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;clrscr&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify; line-height: 150%;&quot;&gt;a function which is used to clear screen and move the cursor back to the upper left corner.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify; line-height: 150%;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;h.&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;%3d dan %-3d&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify; line-height: 150%;&quot;&gt;int x=1;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify; line-height: 150%;&quot;&gt;%3d will show &lt;span style=&quot;&quot;&gt;  &lt;/span&gt;: _ _ 1&lt;span style=&quot;&quot;&gt;              &lt;/span&gt;- - &gt; it still give 2 space&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify; line-height: 150%;&quot;&gt;%-3d will show &lt;span style=&quot;&quot;&gt; &lt;/span&gt;: 1&lt;span style=&quot;&quot;&gt;     &lt;/span&gt;- - &gt; empty space will be deleted.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify; line-height: 150%;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt; &lt;br /&gt;&lt;span class=&quot;fullpost&quot;&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify; line-height: 150%;&quot;&gt;Function Random and Randomize in Dev C++ :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify; line-height: 150%;&quot;&gt;1.&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;Randomize :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; line-height: 150%;&quot;&gt;To make randomize in order to produce a different random number every time the program running.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; line-height: 150%;&quot;&gt;Syntax : srand ((unsigned)time(NULL));&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify; line-height: 150%;&quot;&gt;2.&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;Random(int num) :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; line-height: 150%;&quot;&gt;To get a random number between 0 – (num – 1).&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; line-height: 150%;&quot;&gt;Syntax : int x = rand( )% (int num);&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; line-height: 150%;&quot;&gt;For example :&lt;/p&gt;  &lt;p class=&quot;Style1&quot;&gt;#include &lt;stdio.h&gt;&lt;/stdio.h&gt;&lt;/p&gt;  &lt;p class=&quot;Style1&quot;&gt;#include &lt;conio.h&gt;&lt;/conio.h&gt;&lt;/p&gt;  &lt;p class=&quot;Style1&quot;&gt;#include &lt;stdlib.h&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;//definition of srand, rand&lt;/stdlib.h&gt;&lt;/p&gt;  &lt;p class=&quot;Style1&quot;&gt;#include &lt;time.h&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;//definition of time&lt;/time.h&gt;&lt;/p&gt;  &lt;p class=&quot;Style1&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;Style1&quot;&gt;int main&lt;/p&gt;  &lt;p class=&quot;Style1&quot;&gt;{&lt;/p&gt;  &lt;p class=&quot;Style1&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;int n,&lt;/p&gt;  &lt;p class=&quot;Style1&quot; style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;x;&lt;/p&gt;  &lt;p class=&quot;Style1&quot; style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;printf(“Enter the value of maximum random number : “);&lt;/p&gt;  &lt;p class=&quot;Style1&quot; style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;scanf(“%d”,&amp;amp;n);&lt;/p&gt;  &lt;p class=&quot;Style1&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;srand((unsigned)time(NULL));&lt;/p&gt;  &lt;p class=&quot;Style1&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;x = rand()%100; &lt;/p&gt;  &lt;p class=&quot;Style1&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;printf(“Random Number : %d\n”,x);&lt;/p&gt;  &lt;p class=&quot;Style1&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;getch();&lt;/p&gt;  &lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;a href=&quot;http://tutorial-programming.blogspot.com&quot;&gt;Feel free to visit my blog!!&lt;/a&gt;&lt;/div&gt;</description><link>http://tutorial-programming.blogspot.com/2008/02/c-programming-language-standard.html</link><author>noreply@blogger.com (7effrey)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3845298350965943586.post-8072305993921242843</guid><pubDate>Sat, 16 Feb 2008 13:21:00 +0000</pubDate><atom:updated>2008-02-16T20:32:42.682+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Programming Language</category><title>[C Programming Language] C Programming Language Main Structure</title><description>&lt;span style=&quot;&quot;&gt;&lt;/span&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;font-size:14;&quot;&gt;C Programming Language Main Structures&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;C Programming Language Elements :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;1.&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;Preprocessor directives &lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;Command line which is given instruction to preprocessor.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;There are two types of preprocessor : &lt;span class=&quot;Style1Char&quot;&gt;&lt;span style=&quot;&quot;&gt;#include&lt;/span&gt;&lt;/span&gt; and &lt;span class=&quot;Style1Char&quot;&gt;&lt;span style=&quot;&quot;&gt;#define.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span class=&quot;Style1Char&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;#include library.h &lt;/span&gt;&lt;/span&gt;tell preprocessor the library to find the meaning of standard identifier.&lt;span class=&quot;Style1Char&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-indent: -18pt;&quot;&gt;&lt;span class=&quot;Style1Char&quot;&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;#define NAME value &lt;/span&gt;&lt;/span&gt;tell preprocessor to change every identifier NAME with value before the program was compiled.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;Example :&lt;/p&gt;  &lt;p class=&quot;Style1&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;#include stdio.h&lt;/p&gt;  &lt;p class=&quot;Style1&quot;&gt;&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;#define PI 3.14&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;2.&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;Comment&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;Texts which is started with /* or // and finished with */, and contains information about program in order to make the program is understood easily by other programmer. Compiler will ignore comments.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;3.&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;Main Function&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;Syntax :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;int main(void)&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;{&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;/* main function */&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;}&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;Main function is made up from 2 parts :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;1.&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;Declaration&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;2.&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;Executeable Statement&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;4.&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;Reserved Word and Identifier&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;Reserved Word :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;- word which has special meaning in C and can’t be used again for other.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;Example : int, void, double, return, etc.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;Identifier :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-indent: -18pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;&quot;&gt;a.&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Standard Identifier :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;A word which has special meaning in C but it can’t be redefined by user(not recommended).&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;Example : printf, scanf, etc.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-indent: -18pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;&quot;&gt;b.&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;User Defined Identifier :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;A word which is choosed by user to rename memory cell and user defined operation.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;Example : miles, name, x, PI, &lt;span style=&quot;&quot;&gt; &lt;/span&gt;etc&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;span class=&quot;fullpost&quot;&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot;&gt;Expression Evaluation Rule :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;1.&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;Parentheses Rule&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;2.&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;Operator Presedence Rule&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;From High to Low :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;Function calls&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;!, +, -, &amp;amp; (operator unary)&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;*, /, %&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;+, -&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;&lt;, &lt;=, &gt;=, &gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;==, !=&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;&amp;amp;&amp;amp;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;||&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;=&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;3.&lt;span style=&quot;&quot;&gt;   &lt;/span&gt;Associative Rule&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;Unary - - &gt; evaluate from Right to Left&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;&quot;&gt;      &lt;/span&gt;Binary - - &gt; evaluate from Left to Right&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;a href=&quot;http://tutorial-programming.blogspot.com&quot;&gt;Feel free to visit my blog!!&lt;/a&gt;&lt;/div&gt;</description><link>http://tutorial-programming.blogspot.com/2008/02/c-programming-language-c-programming.html</link><author>noreply@blogger.com (7effrey)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3845298350965943586.post-6580389683803602835</guid><pubDate>Fri, 15 Feb 2008 15:51:00 +0000</pubDate><atom:updated>2008-02-15T23:02:56.141+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Programming Language</category><title>[C Programming Language] Branching (IF ELSE / SWITCH CASE) in C Programming Language</title><description>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;h2&gt;BRANCHING/ DECISION&lt;br /&gt;(IF ELSE / SWITCH CASE)&lt;/h2&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;Three Main Construction of Programming :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-indent: -18pt; line-height: 150%;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;&quot;&gt;1.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Sequential&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-indent: -18pt; line-height: 150%;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;&quot;&gt;2.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Branching / Decision&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-indent: -18pt; line-height: 150%;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;&quot;&gt;3.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Looping / Repetition&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;Branching :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-indent: -18pt; line-height: 150%;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;&quot;&gt;-&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;          &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;A process to make a decision based on the condition which has been evaluated before.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;There are two types of branching :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-indent: -18pt; line-height: 150%;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;&quot;&gt;1.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;IF – ELSE&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;Syntax :&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;if (condition){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;statement – 1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;           &lt;/span&gt;statement – n;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;else if (condition){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;              &lt;/span&gt;statement – 1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;              &lt;/span&gt;statement – n;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;Flowchart :&lt;/p&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibNOo03gDSsMIX7wlIv2PVxEo1P42JvnIsT-6PT6FItyqhf2oQiRzHYUeLnB-Be3eHYasMDTIF_ebTNpqPgUMo6WJhch0b3eAIU74nWqX0AmPl9u49pffSoLrdlx8MwNxgqvK0bnZe2gA/s1600-h/IF-ELSE+Flowchart+Logic.JPG&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibNOo03gDSsMIX7wlIv2PVxEo1P42JvnIsT-6PT6FItyqhf2oQiRzHYUeLnB-Be3eHYasMDTIF_ebTNpqPgUMo6WJhch0b3eAIU74nWqX0AmPl9u49pffSoLrdlx8MwNxgqvK0bnZe2gA/s320/IF-ELSE+Flowchart+Logic.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5167235546477984978&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;Example :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;#include &lt;stdio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;#include &lt;conio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;int main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;int T;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;printf(&quot;Enter temperature (Celcius) : &quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;T);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;if (T&gt;30)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;printf(&quot;Arghhhhhhh, Hot!&quot;); &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;else if (T&lt;0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;printf(&quot;Ouchhhhh, Cold !&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;&quot;&gt;       &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;else printf(&quot;Yummy! Cool.&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;getch();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;return(0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 35.7pt; text-indent: -17.85pt; line-height: 150%;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;&quot;&gt;2.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;SWITCH – CASE&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 81pt; text-indent: -45pt;&quot;&gt;Syntax :&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot; lang=&quot;IN&quot;&gt;switch (kondisi) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 81pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot; lang=&quot;IN&quot;&gt;case 1 : pernyataan-1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 81pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot; lang=&quot;IN&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 81pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot; lang=&quot;IN&quot;&gt;case 2 : pernyataan-2;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 81pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot; lang=&quot;IN&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 81pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot; lang=&quot;IN&quot;&gt;.....&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 81pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot; lang=&quot;IN&quot;&gt;.....&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 81pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot; lang=&quot;IN&quot;&gt;case n : pernyataan-n;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 81pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot; lang=&quot;IN&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 17.85pt; line-height: 150%;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot; lang=&quot;IN&quot;&gt;&lt;span style=&quot;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;default : &lt;span style=&quot;&quot;&gt;      &lt;/span&gt;pernyataan-m &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 17.85pt; line-height: 150%;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot; lang=&quot;IN&quot;&gt;&lt;span style=&quot;&quot;&gt;         &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;Flowchart :&lt;/p&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZEVePxszcr3YpTFG_Bo_uRQQxcpX8E-bWkxp29WoojzNTcRJFM5FsrWw1EiyIdTy-oQgpO2M9dRRNWKCRt9_xM3X3MhqhWYgXL1nnO27CakGLLbbpoFjwBE_ah0O-JO5CI0PuaewcAE8/s1600-h/SWITCH-CASE+Flowchart+Logic.JPG&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZEVePxszcr3YpTFG_Bo_uRQQxcpX8E-bWkxp29WoojzNTcRJFM5FsrWw1EiyIdTy-oQgpO2M9dRRNWKCRt9_xM3X3MhqhWYgXL1nnO27CakGLLbbpoFjwBE_ah0O-JO5CI0PuaewcAE8/s320/SWITCH-CASE+Flowchart+Logic.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5167236070463995106&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 36pt;&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;IN&quot;&gt;Example :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;#include &lt;stdio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;#include &lt;conio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;int main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;char IP;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;printf(&quot;Enter your result in alphabet : &quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;scanf(&quot;%c&quot;,&amp;amp;IP);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;switch (IP)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;case &#39;A&#39; : printf(&quot;4&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;                   &lt;/span&gt;break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;case &#39;B&#39; : printf(&quot;3&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;                   &lt;/span&gt;break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;case &#39;C&#39; : printf(&quot;2&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;                   &lt;/span&gt;break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;case &#39;D&#39; : printf(&quot;1&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;                   &lt;/span&gt;break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;case &#39;E&#39; : printf(&quot;0&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;                   &lt;/span&gt;break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;default&lt;span style=&quot;&quot;&gt;  &lt;/span&gt;: printf(&quot;The input isn’t valid.&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;getch();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;return(0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;&quot; lang=&quot;IN&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 150%;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 150%; font-family: &amp;quot;Courier New&amp;quot;;&quot; lang=&quot;IN&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;The difference between IF-ELSE and SWITCH-CASE :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify; line-height: 150%;&quot;&gt;IF ELSE :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; line-height: 150%;&quot;&gt;To make a decision between 2 choices. For example : &lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; line-height: 150%;&quot;&gt;If the value is greater than 70 (seventy) then the student passes the exam.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; line-height: 150%;&quot;&gt;Else, the student doesn’t pass the exam.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-align: justify; line-height: 150%;&quot;&gt;SWITCH CASE :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; line-height: 150%;&quot;&gt;To make a decision which has more than 2 choices. For example :&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; line-height: 150%;&quot;&gt;A is converted to 4.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; line-height: 150%;&quot;&gt;B is converted to 3.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; line-height: 150%;&quot;&gt;C is converted to 2.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; line-height: 150%;&quot;&gt;D is converted to 1.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; text-align: justify; line-height: 150%;&quot;&gt;E is converted to 0.&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;a href=&quot;http://tutorial-programming.blogspot.com&quot;&gt;Feel free to visit my blog!!&lt;/a&gt;&lt;/div&gt;</description><link>http://tutorial-programming.blogspot.com/2008/02/c-programming-branching-if-else-switch.html</link><author>noreply@blogger.com (7effrey)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibNOo03gDSsMIX7wlIv2PVxEo1P42JvnIsT-6PT6FItyqhf2oQiRzHYUeLnB-Be3eHYasMDTIF_ebTNpqPgUMo6WJhch0b3eAIU74nWqX0AmPl9u49pffSoLrdlx8MwNxgqvK0bnZe2gA/s72-c/IF-ELSE+Flowchart+Logic.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3845298350965943586.post-2967189561017941929</guid><pubDate>Thu, 14 Feb 2008 15:41:00 +0000</pubDate><atom:updated>2008-02-15T23:04:03.433+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Programming Language</category><title>[C Programming Language] C Simple Data Types</title><description>&lt;h2&gt;&lt;a title=&quot;modifier&quot; name=&quot;modifier&quot;&gt;&lt;/a&gt;Primitive Data Types&lt;/h2&gt;&lt;br /&gt;C has five primitive data types :&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;int        : used to define integer numbers&lt;/li&gt;&lt;br /&gt;&lt;li&gt;char     : contains ASCII Code character (128 characters)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;float     : used to define floating point numbers&lt;/li&gt;&lt;br /&gt;&lt;li&gt;double : used to define big floating point numbers&lt;/li&gt;&lt;br /&gt;&lt;li&gt;bool      : used to define  two conditions --&amp;gt; true or false / 1 or 0&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;Example Variable Initialisation:&lt;br /&gt;&lt;br /&gt;1. int&lt;br /&gt;int tes;&lt;br /&gt;tes = 5;&lt;br /&gt;&lt;br /&gt;2. char&lt;br /&gt;char answer = &#39;x&#39;;&lt;br /&gt;&lt;br /&gt;3. float&lt;br /&gt;float score = 85.3;&lt;br /&gt;&lt;br /&gt;4. double&lt;br /&gt;double height = 1,6782992;&lt;br /&gt;&lt;br /&gt;5. bool&lt;br /&gt;bool check = true;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;fullpost&quot;&gt;&lt;br /&gt;&lt;h2&gt;&lt;a title=&quot;modifier&quot; name=&quot;modifier&quot;&gt;&lt;/a&gt;Modifiers&lt;/h2&gt;&lt;br /&gt;&lt;a title=&quot;modifier&quot; name=&quot;modifier&quot;&gt;&lt;/a&gt;The three data types above have the following modifiers.&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a title=&quot;modifier&quot; name=&quot;modifier&quot;&gt;&lt;/a&gt;short&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a title=&quot;modifier&quot; name=&quot;modifier&quot;&gt;&lt;/a&gt;long&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a title=&quot;modifier&quot; name=&quot;modifier&quot;&gt;&lt;/a&gt;signed&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a title=&quot;modifier&quot; name=&quot;modifier&quot;&gt;&lt;/a&gt;unsigned&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;a title=&quot;modifier&quot; name=&quot;modifier&quot;&gt;&lt;/a&gt;The modifiers define the amount of storage allocated to the variable. ANSI has the following rules :&lt;br /&gt;&lt;blockquote&gt;&lt;a title=&quot;modifier&quot; name=&quot;modifier&quot;&gt;&lt;/a&gt;short int &amp;lt;= int &amp;lt;= long int&lt;br /&gt;float        &amp;lt;= double &amp;lt;= long double&lt;/blockquote&gt;&lt;table class=&quot;wikitable&quot;&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;th&gt;Implicit specifier(s)&lt;/th&gt;&lt;br /&gt;&lt;th&gt;Explicit specifier&lt;/th&gt;&lt;br /&gt;&lt;th&gt;Bits&lt;/th&gt;&lt;br /&gt;&lt;th&gt;Bytes&lt;/th&gt;&lt;br /&gt;&lt;th&gt;Minimum value&lt;/th&gt;&lt;br /&gt;&lt;th&gt;Maximum value&lt;/th&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;code&gt;signed char&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;i&gt;same&lt;/i&gt;&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: center;&quot;&gt;8&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: center;&quot;&gt;1&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: right;&quot;&gt;−128&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: right;&quot;&gt;+127&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;code&gt;unsigned char&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;i&gt;same&lt;/i&gt;&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: center;&quot;&gt;8&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: center;&quot;&gt;1&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: right;&quot;&gt;0&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: right;&quot;&gt;255&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;code&gt;char&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;i&gt;one of the above&lt;/i&gt;&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: center;&quot;&gt;8&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: center;&quot;&gt;1&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: right;&quot;&gt;−128 &lt;i&gt;or&lt;/i&gt; 0&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: right;&quot;&gt;+127 &lt;i&gt;or&lt;/i&gt; 255&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr bgcolor=&quot;#f0f7f7&quot;&gt;&lt;br /&gt;&lt;td&gt;&lt;code&gt;short&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;code&gt;signed short int&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: center;&quot;&gt;16&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: center;&quot;&gt;2&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: right;&quot;&gt;−32,768&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: right;&quot;&gt;+32,767&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr bgcolor=&quot;#f0f7f7&quot;&gt;&lt;br /&gt;&lt;td&gt;&lt;code&gt;unsigned short&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;code&gt;unsigned short int&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: center;&quot;&gt;16&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: center;&quot;&gt;2&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: right;&quot;&gt;0&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: right;&quot;&gt;65,535&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;code&gt;signed int&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: center;&quot;&gt;16 &lt;i&gt;or&lt;/i&gt; 32&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: center;&quot;&gt;2 &lt;i&gt;or&lt;/i&gt; 4&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: right;&quot;&gt;−32,768 &lt;i&gt;or&lt;/i&gt;&lt;br /&gt;−2,147,483,648&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: right;&quot;&gt;+32,767 &lt;i&gt;or&lt;/i&gt;&lt;br /&gt;+2,147,483,647&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;code&gt;unsigned&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;code&gt;unsigned int&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: center;&quot;&gt;16 &lt;i&gt;or&lt;/i&gt; 32&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: center;&quot;&gt;2 &lt;i&gt;or&lt;/i&gt; 4&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: right;&quot;&gt;0&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: right;&quot;&gt;65,535 &lt;i&gt;or&lt;/i&gt;&lt;br /&gt;4,294,967,295&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr bgcolor=&quot;#f0f7f7&quot;&gt;&lt;br /&gt;&lt;td&gt;&lt;code&gt;long&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;code&gt;signed long int&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: center;&quot;&gt;32&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: center;&quot;&gt;4&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: right;&quot;&gt;−2,147,483,648&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: right;&quot;&gt;+2,147,483,647&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr bgcolor=&quot;#f0f7f7&quot;&gt;&lt;br /&gt;&lt;td&gt;&lt;code&gt;unsigned long&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;code&gt;unsigned long int&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: center;&quot;&gt;32&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: center;&quot;&gt;4&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: right;&quot;&gt;0&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: right;&quot;&gt;4,294,967,295&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;code&gt;long long&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;code&gt;signed long long int&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: center;&quot;&gt;64&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: center;&quot;&gt;8&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: right;&quot;&gt;−9,223,372,036,854,775,808&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: right;&quot;&gt;+9,223,372,036,854,775,807&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;code&gt;unsigned long long&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;code&gt;unsigned long long int&lt;/code&gt;&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: center;&quot;&gt;64&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: center;&quot;&gt;8&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: right;&quot;&gt;0&lt;/td&gt;&lt;br /&gt;&lt;td style=&quot;text-align: right;&quot;&gt;18,446,744,073,709,551,615&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;h2&gt;&lt;a title=&quot;modifier&quot; name=&quot;modifier&quot;&gt;&lt;/a&gt;Qualifier&lt;/h2&gt;&lt;br /&gt;1. &lt;b&gt;Const &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The &lt;i&gt;const&lt;/i&gt; qualifier is used to tell C that the variable value can not  change after initialisation.&lt;br /&gt;&lt;br /&gt;For example, const float pi=3.14159;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;So, &lt;/i&gt;the value of &lt;i&gt;pi&lt;/i&gt; cannot be changed at a later time within the program.&lt;br /&gt;&lt;br /&gt;Another way to define constants is with the  #define preprocessor which has the advantage that it does not use any storage.&lt;br /&gt;&lt;br /&gt;For example, #define PI 3.14159&lt;br /&gt;&lt;br /&gt;2 . &lt;b&gt;Volatile&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;volatile&lt;/b&gt; means the storage is likely to change at anytime  and be changed but something outside the control of the user program. This means that if you reference the variable, the program should always check the physical address (ie a mapped input fifo), and not use it in a cashed way.&lt;br /&gt;&lt;br /&gt;(www.space.unibe.ch)&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;a title=&quot;modifier&quot; name=&quot;modifier&quot;&gt;&lt;/a&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;a href=&quot;http://tutorial-programming.blogspot.com&quot;&gt;Feel free to visit my blog!!&lt;/a&gt;&lt;/div&gt;</description><link>http://tutorial-programming.blogspot.com/2008/02/c-language-c-simple-data-types.html</link><author>noreply@blogger.com (7effrey)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3845298350965943586.post-7422999388778422484</guid><pubDate>Thu, 14 Feb 2008 15:34:00 +0000</pubDate><atom:updated>2008-02-15T23:04:28.959+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C Programming Language</category><title>[C Programming Language]  Introduction to C Programming Language</title><description>&lt;h2&gt;&lt;span class=&quot;mw-headline&quot;&gt;Introduction&lt;/span&gt;&lt;/h2&gt;&lt;br /&gt;&lt;b&gt;C&lt;/b&gt; is a general-purpose, block structured, procedural, imperative computer programming  language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use  with the Unix operating system. It has since spread to many  other platforms. Although predominantly used for system software, C is used not only for system  but also  for applications widely.  C has also greatly influenced many other popular languages, especially C++, which was designed as an enhancement to C.&lt;br /&gt;&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mw-headline&quot;&gt;Philosophy&lt;/span&gt;&lt;/h2&gt;&lt;br /&gt;C is an imperative (procedural) systems  implementation language. Its design goals were for it to be compiled using a  relatively straightforward compiler,  provide low-level access to memory, provide language constructs that map  efficiently to machine instructions, and require minimal run-time support. C was therefore useful for many  applications that had formerly been coded in assembly language.&lt;br /&gt;&lt;br /&gt;Despite its low-level capabilities, the language was designed to encourage machine-independent programming. A  standards-compliant and portably  written C program can be compiled for a very wide variety of computer platforms  and operating systems with minimal change to its source code. The language has  become available on a very wide range of platforms, from embedded  microcontrollers to supercomputers.&lt;br /&gt;&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mw-headline&quot;&gt;Characteristics&lt;/span&gt;&lt;/h2&gt;&lt;br /&gt;As most imperative languages in the ALGOL tradition, C has facilities for structured  programming and allows lexical variable scope and recursion, while a static type system prevents many  unintended operations. Parameters of C functions are  always passed by value. Pass-by-reference is achieved in C by explicitly passing  pointer  values. Heterogeneous aggregate data types (the struct in C) allow related data elements to be combined  and manipulated as a unit. C has around 30 reserved keywords and  the source text is free-format, using semicolon as a statement terminator (not a  delimiter).&lt;br /&gt;&lt;br /&gt;C also exhibits the following more specific characteristics:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;Non-nestable function definitions, although variables may be hidden in  blocks to any level of depth&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Partially weak typing,  for instance, characters can be used as integers in a way similar to assembly&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Low-level access to computer memory via machine addresses and typed  pointers&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Function pointers allowing for a rudimentary form of closures and runtime polymorphism&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Array indexing as a secondary notion,  defined in terms of pointer arithmetic&lt;/li&gt;&lt;br /&gt; &lt;li&gt;A standardized C  preprocessor for macro definition, source code file inclusion,  conditional compilation, etc.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Complex functionality such as I/O and mathematical functions consistently  delegated to library routines&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Syntax divergent from ALGOL, often  following the lead of C&#39;s predecessor B, for example using&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;&lt;code&gt;{ ... }&lt;/code&gt; rather than ALGOL&#39;s &lt;code&gt;begin ... end&lt;/code&gt;&lt;/li&gt;&lt;br /&gt; &lt;li&gt;the equal-sign for assignment (copying), much like Fortran&lt;/li&gt;&lt;br /&gt; &lt;li&gt;two consecutive equal-signs to test for equality (compare to  &lt;code&gt;.EQ.&lt;/code&gt; in Fortran or the  equal-sign in BASIC)&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; and &lt;code&gt;||&lt;/code&gt; in place of ALGOL&#39;s &lt;code&gt;and&lt;/code&gt; and &lt;code&gt;or&lt;/code&gt;, which&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;are syntactically distinct from the bit-wise operators &lt;code&gt;&amp;amp;&lt;/code&gt;  and &lt;code&gt;|&lt;/code&gt; (B used &lt;code&gt;&amp;amp;&lt;/code&gt; and  &lt;code&gt;|&lt;/code&gt; in both meanings)&lt;/li&gt;&lt;br /&gt; &lt;li&gt;never evaluate the right operand if the result can be determined from the  left alone (short-circuit evaluation)&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt; &lt;li&gt;a large number of compound operators, such as &lt;code&gt;+=&lt;/code&gt;,  &lt;code&gt;++&lt;/code&gt;, etc.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h2&gt;&lt;span class=&quot;mw-headline&quot;&gt;Uses&lt;/span&gt;&lt;/h2&gt;&lt;br /&gt;C&#39;s primary use is for &quot;system programming&quot;, including implementing  operating systems  and embedded system  applications, due to a combination of desirable characteristics such as code  portability and efficiency, ability to access specific hardware addresses,  ability to &quot;pun&quot; types to  match externally imposed data access requirements, and low runtime demand on system resources.&lt;br /&gt;&lt;br /&gt;C has also been widely used to implement end-user applications, although  as applications became larger much of that development shifted to other,  higher-level languages.&lt;br /&gt;&lt;br /&gt;One consequence of C&#39;s wide acceptance and efficiency is that the compilers,  libraries, and interpreters of other higher-level languages are often  implemented in C.&lt;br /&gt;&lt;br /&gt;C is used as an intermediate language by some  higher-level languages. This is implemented in one of two ways, as languages  which:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;Emit C source code, and one or more other representations: machine code, object code, and/or bytecodes. Examples: some dialects of Lisp (Lush, Gambit), Haskell (Glasgow  Haskell Compiler); Squeak&#39;s C-subset  Slang.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Emit C source code only, and no other representation. Examples: Eiffel, Sather; Esterel.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;C source code is then input to a C compiler, which then outputs finished  machine or object code. This is done to gain portability (C compilers exist for  nearly all platforms) and to avoid having to develop machine-specific code  generators.&lt;br /&gt;&lt;br /&gt;Unfortunately, C was designed as a programming language, not as a compiler  target language, and is thus less than ideal for use as an intermediate  language. This has led to development of C-based intermediate languages such as  C--.&lt;br /&gt;&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mw-headline&quot;&gt;Libraries&lt;/span&gt;&lt;/h2&gt;&lt;br /&gt;The C programming language uses libraries as its primary method of  extension. In C, a library is a set of functions contained within a single  &quot;archive&quot; file. Each library typically has a header file, which contains the prototypes of the  functions contained within the library that may be used by a program, and  declarations of special data types and macro symbols used with these functions.  In order for a program to use a library, it must include the library&#39;s header  file, and the library must be linked with the program, which in many cases  requires compiler flags  (e.g., &lt;code&gt;-lm&lt;/code&gt;, shorthand for &quot;math library&quot;).&lt;br /&gt;&lt;br /&gt;The most common C library is the C standard library, which is specified by  the ISO and ANSI C standards and  comes with every C implementation. (&quot;Freestanding&quot; [embedded] C implementations  may provide only a subset of the standard library.) This library supports stream  input and output, memory allocation, mathematics, character strings, and time  values.&lt;br /&gt;&lt;br /&gt;Another common set of C library functions are those used by applications  specifically targeted for Unix and Unix-like systems, especially  functions which provide an interface to the kernel. These functions are  detailed in various standards such as POSIX and the Single UNIX Specification.&lt;br /&gt;&lt;br /&gt;Since many programs have been written in C, there are a wide variety of other  libraries available. Libraries are often written in C because C compilers  generate efficient object  code; programmers then create interfaces to the library so that the routines  can be used from higher-level languages like Java, Perl, and Python.&lt;br /&gt;&lt;h2&gt;&lt;span class=&quot;editsection&quot;&gt;&lt;/span&gt;&lt;span class=&quot;mw-headline&quot;&gt;Related languages&lt;/span&gt;&lt;/h2&gt;&lt;br /&gt;&lt;a title=&quot;Other_influences&quot; id=&quot;Other_influences&quot; name=&quot;Other_influences&quot;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;C has directly or indirectly influenced many later languages such as Java, C#, Perl, PHP, JavaScript, and Unix&#39;s C Shell. The most pervasive influence has been  syntactical: all of the languages mentioned combine the statement and (more or  less recognizably) expression syntax of C with type systems, data models and/or  large-scale program structures that differ from those of C, sometimes  radically.&lt;br /&gt;&lt;h2&gt;&lt;span class=&quot;mw-headline&quot;&gt;C Compiler&lt;/span&gt;&lt;/h2&gt;&lt;br /&gt;&lt;h2&gt;&lt;a href=&quot;http://programmingtutorial.wordpress.com/files/2008/02/dev-c-interface.jpg&quot; title=&quot;Dev-C++ GUI Screenshot&quot;&gt;&lt;img src=&quot;http://programmingtutorial.wordpress.com/files/2008/02/dev-c-interface.jpg&quot; alt=&quot;Dev-C++ GUI Screenshot&quot; /&gt;&lt;/a&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p align=&quot;left&quot;&gt;&lt;b&gt;Dev-C++&lt;/b&gt; is a free integrated development  environment (IDE) distributed under the GNU  General Public License for programming in C/C++. It is bundled with the open source MinGW compiler. The IDE is written in Delphi. The latest release of Dev-C++ version is 4.9.9.2 which is launched in February 22, 2005.&lt;/p&gt;&lt;br /&gt;The project is hosted by SourceForge. Dev-C++ was originally developed by  programmer Colin Laplace. Dev-C++ runs exclusively on Microsoft  Windows.&lt;br /&gt;&lt;br /&gt;The program itself has a look-and-feel similar to that of the more  widely-used Microsoft Visual Studio. One additional  aspect of Dev-C++ is its use of DevPaks, packaged extensions on the programming  environment with additional libraries, templates, and utilities. DevPaks often  contain, but are not limited to, GUI utilities, including popular  toolkits such as GTK+, wxWidgets, and FLTK. Other DevPaks include libraries for more advanced  function use.&lt;br /&gt;&lt;br /&gt;Dev-C++ can be downloaded from : &lt;a href=&quot;http://sourceforge.net/projects/dev-cpp/&quot; title=&quot;Download Dev-C++ IDE&quot; target=&quot;_blank&quot;&gt;http://sourceforge.net/projects/dev-cpp/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Source : en.wikipedia.org/wiki&lt;br /&gt;                  &lt;a href=&quot;http:%5C%5Cprogrammingtutorial.wordpress.com&quot;&gt;programmingtutorial.wordpress.com&lt;/a&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;a href=&quot;http://tutorial-programming.blogspot.com&quot;&gt;Feel free to visit my blog!!&lt;/a&gt;&lt;/div&gt;</description><link>http://tutorial-programming.blogspot.com/2008/02/c-language-introduction-to-c.html</link><author>noreply@blogger.com (7effrey)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3845298350965943586.post-7936577646767650764</guid><pubDate>Thu, 14 Feb 2008 14:50:00 +0000</pubDate><atom:updated>2008-02-14T21:51:20.229+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">event</category><title>[EVENT] Happy Valentines Day!!</title><description>&lt;center&gt;&lt;br /&gt;&lt;embed type=&quot;application/x-shockwave-flash&quot; pluginspage=&quot;http://www.macromedia.com/go/getflashplayer&quot; name=&quot;flashplayer&quot; src=&quot;http://www.wishafriend.com/ac/swf/valentinesday25.swf&quot; quality=&quot;high&quot; swliveconnect=&quot;true&quot; allowscriptaccess=&quot;samedomain&quot; height=&quot;300&quot; width=&quot;340&quot;&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=&quot;fullpost&quot;&gt;&lt;br /&gt;&lt;embed type=&quot;application/x-shockwave-flash&quot; pluginspage=&quot;http://www.macromedia.com/go/getflashplayer&quot; name=&quot;flashplayer&quot; src=&quot;http://www.wishafriend.com/ac/swf/valentinesday18.swf&quot; quality=&quot;high&quot; swliveconnect=&quot;true&quot; allowscriptaccess=&quot;samedomain&quot; height=&quot;210&quot; width=&quot;340&quot;&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/center&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;a href=&quot;http://tutorial-programming.blogspot.com&quot;&gt;Feel free to visit my blog!!&lt;/a&gt;&lt;/div&gt;</description><link>http://tutorial-programming.blogspot.com/2008/02/event-happy-valentines-day.html</link><author>noreply@blogger.com (7effrey)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3845298350965943586.post-5446956835681852765</guid><pubDate>Sun, 10 Feb 2008 09:39:00 +0000</pubDate><atom:updated>2008-02-22T16:42:09.655+07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">about me</category><title>About 7effrey</title><description>&lt;div style=&quot;text-align: center; color: rgb(102, 0, 204);&quot;&gt;&lt;h1&gt;7eff&lt;span style=&quot;color: rgb(255, 102, 0);&quot;&gt;rey&lt;/span&gt;&lt;/h1&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;h1&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-6nKekTPeOjngbbJFvuIpnLxnvYqLJcuKfkiBK6l7txKYLVuAcejGF7dOriLKsV8n0QMiJoSDQi1HJE1z68UdjbY8RfeANB-9CW49xPdJA-gMJkiBBAyibaFsm_TjN_dzQGtJI0Y97iUR/s1600-h/logo+konyol.jpg&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-6nKekTPeOjngbbJFvuIpnLxnvYqLJcuKfkiBK6l7txKYLVuAcejGF7dOriLKsV8n0QMiJoSDQi1HJE1z68UdjbY8RfeANB-9CW49xPdJA-gMJkiBBAyibaFsm_TjN_dzQGtJI0Y97iUR/s320/logo+konyol.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5169382995766246722&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/h1&gt; nothing special about me..&lt;br /&gt;i&#39;m just an ordinary man..&lt;br /&gt;i look like in this picture..&lt;br /&gt;wkwkwkw..&lt;br /&gt;i will try to do my best in this blog..&lt;br /&gt;i hope this blog can be useful for others..&lt;br /&gt;so, please check this out everyday!!&lt;br /&gt;Maybe, sometimes I give you a surprise..&lt;br /&gt;Hahaha..&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;Hmm, I think my blog isn&#39;t perfect..&lt;br /&gt;I hope you can give me any suggestion to make my blog better..&lt;br /&gt;i&#39;m very appreciate your comment..&lt;br /&gt;At the end, thank you for visiting my blog..&lt;br /&gt;I hope to seeing you again..&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;&lt;marquee direction=&quot;right&quot; behaviour=&quot;slide&quot;&gt;see ya!!&lt;/marquee&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;span class=&quot;fullpost&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;a href=&quot;http://tutorial-programming.blogspot.com&quot;&gt;Feel free to visit my blog!!&lt;/a&gt;&lt;/div&gt;</description><link>http://tutorial-programming.blogspot.com/2008/02/about-7effrey.html</link><author>noreply@blogger.com (7effrey)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-6nKekTPeOjngbbJFvuIpnLxnvYqLJcuKfkiBK6l7txKYLVuAcejGF7dOriLKsV8n0QMiJoSDQi1HJE1z68UdjbY8RfeANB-9CW49xPdJA-gMJkiBBAyibaFsm_TjN_dzQGtJI0Y97iUR/s72-c/logo+konyol.jpg" height="72" width="72"/><thr:total>0</thr:total></item></channel></rss>