<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='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'><id>tag:blogger.com,1999:blog-7569755796084030595</id><updated>2024-09-04T05:20:38.038-07:00</updated><category term="java program"/><category term="Multiple Choice Questions On Operating System"/><category term="os"/><category term="Exception handling"/><category term="Android"/><category term="Android for beginner"/><category term="C program"/><category term="Abstract class"/><category term="Abstract method"/><category term="Array in java"/><category term="Bundle Patches"/><category term="CPU"/><category term="Critical Patch"/><category term="Need of Exception handling"/><category term="Oracle"/><category term="PSU"/><category term="Patch Set Updates"/><category term="SPU"/><category term="Security Patch Update"/><category term="Swapping"/><category term="android interview questions"/><category term="biggest of 3 numbers"/><category term=".NET"/><category term=".Net for beginners"/><category term="Abstract data type"/><category term="AdSense features"/><category term="Alphabetical Paging in Gridview"/><category term="Arithmetic operation"/><category term="Blog"/><category term="C"/><category term="C++"/><category term="C++ Operator Overloading Guidelines"/><category term="Custom"/><category term="Dynamic polymorphism"/><category term="Earnings/Reports"/><category term="Exceptions"/><category term="FIFO"/><category term="First example"/><category term="Fuction"/><category term="How to Change blogspot.com to co.cc"/><category term="How to Remove the Powered by"/><category term="How to remove navigation"/><category term="Inner classes"/><category term="Installation of Sql Server 2000"/><category term="Interfaces"/><category term="JDK"/><category term="JRE"/><category term="Java Development kit"/><category term="Java Runtime Environment"/><category term="Java for beginner"/><category term="Linking"/><category term="MultiThreading"/><category term="MySQL questions"/><category term="Nested and inner classes"/><category term="New AdSense Interface"/><category term="OSB"/><category term="One adsense account multiple sites"/><category term="Operator Overloading in C++"/><category term="Platform dependent"/><category term="Procedural and object oriented language."/><category term="Program of swapping  using third variable"/><category term="Program of swapping without using third variables"/><category term="Resizing an array"/><category term="Role of India&#39;s youth"/><category term="Setting up a MySQL database"/><category term="Sql server 2000 installation process"/><category term="String"/><category term="TCS"/><category term="TCS placement paper pattern"/><category term="Top down approach and Bottom up approach"/><category term="Topdown approach and Bottomup approach"/><category term="XPath"/><category term="XQuery"/><category term="adapter classes"/><category term="atrenta"/><category term="blogger"/><category term="blogging"/><category term="chine"/><category term="co.cc"/><category term="compile time linking"/><category term="extending interfaces"/><category term="future soft"/><category term="global logicindus logic"/><category term="google adsense disable"/><category term="iPhone"/><category term="java is not recongized"/><category term="java program related to inheritance"/><category term="javac is not recognized"/><category term="mssql"/><category term="multiple choide questions"/><category term="multiple inheritance in Java"/><category term="multiplication table"/><category term="navigation"/><category term="operation system"/><category term="placement papers"/><category term="platform independent"/><category term="r.layout.main cannot be resolved"/><category term="runtime linking"/><category term="security"/><category term="session in java"/><category term="session related interview questions"/><category term="sql"/><category term="ternary operator"/><category term="wordpress"/><title type='text'>Get ~ Exact ~ Solution..............</title><subtitle type='html'>Technical Blog ...!!!.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Mayur Upadhyay</name><uri>http://www.blogger.com/profile/03327601152886094464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>98</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-3976591039868048199</id><published>2016-08-06T22:51:00.012-07:00</published><updated>2016-08-06T23:12:39.442-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Bundle Patches"/><category scheme="http://www.blogger.com/atom/ns#" term="CPU"/><category scheme="http://www.blogger.com/atom/ns#" term="Critical Patch"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="Patch Set Updates"/><category scheme="http://www.blogger.com/atom/ns#" term="PSU"/><category scheme="http://www.blogger.com/atom/ns#" term="Security Patch Update"/><category scheme="http://www.blogger.com/atom/ns#" term="SPU"/><title type='text'>CPU, PSU, SPU - Oracle Patch Update Terminology</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: purple; font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;All these terminologies are used for the Oracle Database, Enterprise Manager, Fusion Middle-ware, and Web Logic&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;font-size: large;&quot;&gt;CPU&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: large; font-weight: normal;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Critical Patch Update refers to the overall release of security fixes each quarter rather than the cumulative database security patch for the quarter. &amp;nbsp;Think of the CPU as the overarching quarterly release and not as a single patch&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h4&gt;
&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/h4&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;font-size: large;&quot;&gt;PSU&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt; - &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Patch Set Updates are the same cumulative patches that include both the security fixes and priority fixes. &amp;nbsp;The key with PSUs is they are minor version upgrades (e.g., 11.2.0.1.1 to 11.2.0.1.2). &amp;nbsp;Once a PSU is applied, only PSUs can be applied in future quarters until the database is upgraded to a new base version&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h4&gt;
&lt;/h4&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;font-size: large;&quot;&gt;SPU&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Security Patch Update terminology is introduced in the October 2012 Critical Patch Update as the term for the quarterly security patch. &amp;nbsp;SPU patches are the same as previous CPU patches, just a new name. &amp;nbsp;For the database, SPUs can not be applied once PSUs have been applied until the database is upgraded to a new base version.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h4&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;font-size: large; font-weight: normal;&quot;&gt;&lt;u&gt;Bundle Patches&lt;/u&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;are the quarterly patches for Windows and Exadata which include both the quarterly security patches as well as recommended fixes&lt;span style=&quot;font-weight: normal;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/3976591039868048199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2016/08/cpu-psu-spu-oracle-patch-update_7.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/3976591039868048199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/3976591039868048199'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2016/08/cpu-psu-spu-oracle-patch-update_7.html' title='CPU, PSU, SPU - Oracle Patch Update Terminology'/><author><name>MAYUR&#39;S BLOG</name><uri>http://www.blogger.com/profile/03374573423562856132</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-2057016179616880538</id><published>2016-08-06T22:51:00.011-07:00</published><updated>2016-08-06T23:12:21.122-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Bundle Patches"/><category scheme="http://www.blogger.com/atom/ns#" term="CPU"/><category scheme="http://www.blogger.com/atom/ns#" term="Critical Patch"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="Patch Set Updates"/><category scheme="http://www.blogger.com/atom/ns#" term="PSU"/><category scheme="http://www.blogger.com/atom/ns#" term="Security Patch Update"/><category scheme="http://www.blogger.com/atom/ns#" term="SPU"/><title type='text'>CPU, PSU, SPU - Oracle Patch Update Terminology</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: purple; font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;All these terminologies are used for the Oracle Database, Enterprise Manager, Fusion Middle-ware, and Web Logic&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;font-size: large;&quot;&gt;CPU&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: large; font-weight: normal;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Critical Patch Update refers to the overall release of security fixes each quarter rather than the cumulative database security patch for the quarter. &amp;nbsp;Think of the CPU as the overarching quarterly release and not as a single patch&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h4&gt;
&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/h4&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;font-size: large;&quot;&gt;PSU&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt; - &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Patch Set Updates are the same cumulative patches that include both the security fixes and priority fixes. &amp;nbsp;The key with PSUs is they are minor version upgrades (e.g., 11.2.0.1.1 to 11.2.0.1.2). &amp;nbsp;Once a PSU is applied, only PSUs can be applied in future quarters until the database is upgraded to a new base version&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h4&gt;
&lt;/h4&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;font-size: large;&quot;&gt;SPU&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Security Patch Update terminology is introduced in the October 2012 Critical Patch Update as the term for the quarterly security patch. &amp;nbsp;SPU patches are the same as previous CPU patches, just a new name. &amp;nbsp;For the database, SPUs can not be applied once PSUs have been applied until the database is upgraded to a new base version.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h4&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;font-size: large; font-weight: normal;&quot;&gt;&lt;u&gt;Bundle Patches&lt;/u&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;are the quarterly patches for Windows and Exadata which include both the quarterly security patches as well as recommended fixes&lt;span style=&quot;font-weight: normal;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/2057016179616880538/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2016/08/cpu-psu-spu-oracle-patch-update_33.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/2057016179616880538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/2057016179616880538'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2016/08/cpu-psu-spu-oracle-patch-update_33.html' title='CPU, PSU, SPU - Oracle Patch Update Terminology'/><author><name>MAYUR&#39;S BLOG</name><uri>http://www.blogger.com/profile/03374573423562856132</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-3837651640817556662</id><published>2013-09-13T02:19:00.000-07:00</published><updated>2013-09-13T11:00:01.753-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Custom"/><category scheme="http://www.blogger.com/atom/ns#" term="Fuction"/><category scheme="http://www.blogger.com/atom/ns#" term="OSB"/><category scheme="http://www.blogger.com/atom/ns#" term="XPath"/><category scheme="http://www.blogger.com/atom/ns#" term="XQuery"/><title type='text'>Custom XPath Functions in OSB</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 class=&quot;entry-title&quot; style=&quot;background-color: white; color: #444444; font-family: &#39;Trebuchet MS&#39;, Verdana, sans-serif; font-weight: normal; letter-spacing: -1px; margin: 0px; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Custom XPath Functions in&amp;nbsp;OSB:&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, sans-serif; font-size: 12px; line-height: 21.59375px; margin-bottom: 13px; margin-top: 13px; padding: 0px; text-align: justify;&quot;&gt;
Wikipedia says “Extensibility is a system design principle where the implementation takes into consideration future growth.Extensions can be through the addition of new functionality or through modification of existing functionality”.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, sans-serif; font-size: 12px; line-height: 21.59375px; margin-bottom: 13px; margin-top: 13px; padding: 0px; text-align: justify;&quot;&gt;
The extensibility is possible even in case of OSB and custom XPath functions is one of the ways to extend the out-of-the-box functionality provided with OSB. In this&amp;nbsp; post, we talk about the procedure to come up with the custom XPath functions. Though the example taken in this post (division of numbers)does not represent the real-world case but sufficient enough to stress the point.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, sans-serif; font-size: 12px; line-height: 21.59375px; margin-bottom: 13px; margin-top: 13px; padding: 0px; text-align: justify;&quot;&gt;
During the IDE and server start up, OSB checks for custom functions in the path&amp;nbsp;&lt;strong style=&quot;margin: 0px; padding: 0px;&quot;&gt;$OSB_HOME/config/xpath-functions.&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, sans-serif; font-size: 12px; line-height: 21.59375px; margin-bottom: 13px; margin-top: 13px; padding: 0px; text-align: justify;&quot;&gt;
Creating the custom XPath functions involves coming up with an xml file and the java code that does the required task. The xml file is going to be similar to the file&amp;nbsp;&lt;strong style=&quot;margin: 0px; padding: 0px;&quot;&gt;osb-built-in.xml&amp;nbsp;&lt;/strong&gt;provided in above path that contains OSB functions. So let us create a xml file&amp;nbsp;&lt;strong style=&quot;margin: 0px; padding: 0px;&quot;&gt;custom-func-demo.xml&lt;/strong&gt;&amp;nbsp;with the below contents and place it the folder mentioned above.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, sans-serif; font-size: 12px; line-height: 21.59375px; margin-bottom: 13px; margin-top: 13px; padding: 0px; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: xx-small; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&amp;nbsp;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&amp;lt;xpf:xpathFunctions xmlns:xpf=&quot;&lt;/span&gt;&lt;a href=&quot;http://www.bea.com/wli/sb/xpath/config%22&quot; style=&quot;color: #bb4411; margin: 0px; padding: 0px; text-decoration: none;&quot;&gt;&lt;span style=&quot;font-size: xx-small; margin: 0px; padding: 0px;&quot;&gt;http://www.bea.com/wli/sb/xpath/config&quot;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-size: xx-small; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&amp;nbsp;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xpf:category id=&quot;Custom Functions&quot;&amp;gt;&amp;nbsp;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xpf:function&amp;gt;&amp;nbsp;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xpf:name&amp;gt;DivideNumbers&amp;lt;/xpf:name&amp;gt;&amp;nbsp;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xpf:comment&amp;gt;Function used for division of numbers&amp;lt;/xpf:comment&amp;gt;&amp;nbsp;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xpf:namespaceURI&amp;gt;&lt;/span&gt;&lt;a href=&quot;http://www.oracle.com/custom/custom-functions&quot; style=&quot;color: #bb4411; margin: 0px; padding: 0px; text-decoration: none;&quot;&gt;&lt;span style=&quot;font-size: xx-small; margin: 0px; padding: 0px;&quot;&gt;http://www.oracle.com/custom/custom-functions&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-size: xx-small; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;/xpf:namespaceURI&amp;gt;&amp;nbsp;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xpf:className&amp;gt;demo.DivideNumbers&amp;lt;/xpf:className&amp;gt;&amp;nbsp;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xpf:method&amp;gt;java.lang.Double divide(java.lang.Double,java.lang.Double)&amp;lt;/xpf:method&amp;gt;&amp;nbsp;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xpf:isDeterministic&amp;gt;true&amp;lt;/xpf:isDeterministic&amp;gt;&amp;nbsp;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xpf:scope&amp;gt;Pipeline&amp;lt;/xpf:scope&amp;gt;&amp;nbsp;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xpf:scope&amp;gt;SplitJoin&amp;lt;/xpf:scope&amp;gt;&amp;nbsp;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xpf:function&amp;gt;&amp;nbsp;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xpf:category&amp;gt;&amp;nbsp;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&amp;lt;/xpf:xpathFunctions&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, sans-serif; font-size: 12px; line-height: 21.59375px; margin-bottom: 13px; margin-top: 13px; padding: 0px; text-align: justify;&quot;&gt;
The above XML fragment shows the custom XPath function name (Divide Numbers), Class Name, Java Method and the namespace that should be used to access the function in the message flow. ‘isDeterministic’ specifies whether the function is deterministic or non-deterministic. Deterministic functions always provide the same results where as Non-Deterministic functions return the unique results.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, sans-serif; font-size: 12px; line-height: 21.59375px; margin-bottom: 13px; margin-top: 13px; padding: 0px; text-align: justify;&quot;&gt;
Create a simple java class with the following code. Make sure that class name (including the package) and method signature matches with the above xml contents. Create a jar of this and place it in the above mentioned location so that IDE and server can detect the custom function.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, sans-serif; font-size: 12px; line-height: 21.59375px; margin-bottom: 13px; margin-top: 13px; padding: 0px; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: xx-small; margin: 0px; padding: 0px;&quot;&gt;package demo;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, sans-serif; font-size: 12px; line-height: 21.59375px; margin-bottom: 13px; margin-top: 13px; padding: 0px; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: xx-small; margin: 0px; padding: 0px;&quot;&gt;import java.lang.Double;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, sans-serif; font-size: 12px; line-height: 21.59375px; margin-bottom: 13px; margin-top: 13px; padding: 0px; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: xx-small; margin: 0px; padding: 0px;&quot;&gt;public class DivideNumbers {&amp;nbsp;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static Double divide(Double a, Double b) {&amp;nbsp;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return a/b;&amp;nbsp;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, sans-serif; font-size: 12px; line-height: 21.59375px; margin-bottom: 13px; margin-top: 13px; padding: 0px; text-align: justify;&quot;&gt;
On restart of Eclipse IDE and OSB server, we should be able to see the custom XPath function that we just defined.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaPGXiiRS_4thE4h9W7tteajBt1ovHTdR0XDXSBfq7ubfib981Sr7ImFEnu-DEqBLo_Y1BhVwJQUqIxoqPde4RmIcJANsXPLUq0HMa0Jq4tsPH7U1tfLQZNJvSvTDi_6SAEhuDzLAwaA4/s1600/xpath1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaPGXiiRS_4thE4h9W7tteajBt1ovHTdR0XDXSBfq7ubfib981Sr7ImFEnu-DEqBLo_Y1BhVwJQUqIxoqPde4RmIcJANsXPLUq0HMa0Jq4tsPH7U1tfLQZNJvSvTDi_6SAEhuDzLAwaA4/s640/xpath1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikxusBqR8Zb6HZ2lEk2ZYRmfkBXg5S809nlQY8cfKulj6ZOJEIoe8hEDPKKVCZNzBbiaxevEvzc8P7jDeAL7u4PnlVX0aJjv1dly_Bl7fa5rs70OJl2DlBTDabH6bSveZUA6Dkz5N1Nws/s1600/xpath2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikxusBqR8Zb6HZ2lEk2ZYRmfkBXg5S809nlQY8cfKulj6ZOJEIoe8hEDPKKVCZNzBbiaxevEvzc8P7jDeAL7u4PnlVX0aJjv1dly_Bl7fa5rs70OJl2DlBTDabH6bSveZUA6Dkz5N1Nws/s640/xpath2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihQVVkHZKd9uZPcU_vGDiFDfw7uB8JC0kaeRAFYjXTUiZo0FFRmwW0G1bb5uzRON254Zih1aa5BPxWEV5wOZmm_09BjcaBelTGM-OgWhxIZ3krIlzH48rAbE3q-hXSz9WfeWFmr-ibzNE/s1600/xpath3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihQVVkHZKd9uZPcU_vGDiFDfw7uB8JC0kaeRAFYjXTUiZo0FFRmwW0G1bb5uzRON254Zih1aa5BPxWEV5wOZmm_09BjcaBelTGM-OgWhxIZ3krIlzH48rAbE3q-hXSz9WfeWFmr-ibzNE/s640/xpath3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMLlVcUwtCmfqChIMik5vKW2-m2Y2VXpAUg3qO63a22iG8zBNTgPX3VQzyAvpioqJPceK9k0hdRdSROyiMar_N7OFZ1PRxbWKh90VupVHZaQap2oHLgDnK7Gzvoj6Srapfyxa7sc_RNzM/s1600/xpath4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMLlVcUwtCmfqChIMik5vKW2-m2Y2VXpAUg3qO63a22iG8zBNTgPX3VQzyAvpioqJPceK9k0hdRdSROyiMar_N7OFZ1PRxbWKh90VupVHZaQap2oHLgDnK7Gzvoj6Srapfyxa7sc_RNzM/s640/xpath4.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, sans-serif; font-size: 12px; line-height: 21.59375px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, sans-serif; font-size: 12px; line-height: 21.59375px; text-align: justify;&quot;&gt;Use the custom XPath function and run the proxy service to see the expected results as shown below.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis1eNoNsPuBn7HGLdkkJDKsjw3n5hU4Gnd7e0FHTlRlWbB0YrcsAEHbneH5z6_kuh-FRjCd8lBZ67hBb19qb01WwZxVlHmHlXQRU-ZyTTIpsVSG9uhJFQ3tcnu8skIhDNAknDrgYqyrqE/s1600/xpath5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis1eNoNsPuBn7HGLdkkJDKsjw3n5hU4Gnd7e0FHTlRlWbB0YrcsAEHbneH5z6_kuh-FRjCd8lBZ67hBb19qb01WwZxVlHmHlXQRU-ZyTTIpsVSG9uhJFQ3tcnu8skIhDNAknDrgYqyrqE/s640/xpath5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, sans-serif; font-size: 12px; line-height: 21.59375px; margin-bottom: 13px; margin-top: 13px; padding: 0px; text-align: justify;&quot;&gt;
--------------------------------------------------------------------------------------------------------------------------------&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #444444; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, sans-serif; font-size: 12px; line-height: 21.59375px; margin-bottom: 13px; margin-top: 13px; padding: 0px; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/3837651640817556662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2013/09/custom-xpath-functions-in-osb.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/3837651640817556662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/3837651640817556662'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2013/09/custom-xpath-functions-in-osb.html' title='Custom XPath Functions in OSB'/><author><name>MAYUR&#39;S BLOG</name><uri>http://www.blogger.com/profile/03374573423562856132</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaPGXiiRS_4thE4h9W7tteajBt1ovHTdR0XDXSBfq7ubfib981Sr7ImFEnu-DEqBLo_Y1BhVwJQUqIxoqPde4RmIcJANsXPLUq0HMa0Jq4tsPH7U1tfLQZNJvSvTDi_6SAEhuDzLAwaA4/s72-c/xpath1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-5756370024401848664</id><published>2012-07-25T19:45:00.003-07:00</published><updated>2012-07-25T19:45:46.053-07:00</updated><title type='text'></title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;b&gt;MultiThreading Best example.....&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;package DemoWork;&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;class Demo implements Runnable{&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int p;&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thread th;&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public Demo(int i,String threadName) {&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; p=i;&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; th=new Thread(this,threadName);&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; th.start();&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; void process(){&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; for(int j=1;j&amp;lt;=10;j++){&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; int temp=p*j;&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.print(&quot; &quot;+temp);&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println();&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void run(){&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.print(th.getName()+&lt;/span&gt;&lt;wbr style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;/wbr&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&quot; is starting&quot;);&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; process();&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;}&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;public class ThreadRelatedAssign {&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp; public static void main(String[] m){&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; new Demo(5,&quot;I-Thread&quot;);&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; new Demo(10,&quot;II-Thread&quot;);&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; new Demo(50,&quot;III-Thread&quot;);&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&amp;nbsp;}&lt;/span&gt;&lt;br style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot; /&gt;&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;}&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/5756370024401848664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2012/07/multithreading-best-example.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/5756370024401848664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/5756370024401848664'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2012/07/multithreading-best-example.html' title=''/><author><name>Mayur Upadhyay</name><uri>http://www.blogger.com/profile/03327601152886094464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-6555240545628293738</id><published>2012-02-18T21:20:00.000-08:00</published><updated>2012-02-18T21:21:33.898-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="chine"/><title type='text'>Android Breathes New Life Into &quot;Made In China&quot; ..</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;media-container media-loading&quot;&gt;&lt;img alt=&quot;mic&quot; class=&quot;attachment-image wp-post-image&quot; height=&quot;400&quot; src=&quot;http://tctechcrunch2011.files.wordpress.com/2012/02/mic.jpeg?w=282&quot; title=&quot;mic&quot; width=&quot;391&quot; /&gt; &lt;/div&gt;&lt;div class=&quot;body-copy&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;strong&gt;Editor’s note&lt;/strong&gt;:&amp;nbsp;&lt;em&gt;Benjamin Dolgin-Gardner is the founder of&amp;nbsp;&lt;a href=&quot;http://szceit.com/&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: #0a9600;&quot;&gt;szceit.com&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&amp;nbsp;in Shenzhen, China.&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;How do you end up with millions of new sales overnight with low development and implementation costs? In the case of Chinese electronics companies Rock Chips and Box Chips the answer has been simple – hitch a ride on Android.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;China’s economy is booming thanks to low cost assembly, the country’s key advantage when competing on the global playing field. Manufacturers deliver low cost laborers who are able to follow processes and procedures to a reasonable degree of accuracy at very reasonable rates, and thus gain an edge over Western manufacturers.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;In my years in China I’ve seen technologies come and go, but none have excited these manufacturers like the prospect of Android. It’s a solid, “open” operating system that lets them do a number of interesting things without many risks.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;The West in turn has provided the “design” element of the process, enabling the overall product to be reliable and aesthetically pleasing. Chinese companies aren’t yet geared to competing in this arena. In order to undertake the gamble of developing an OS that gave them an exclusively Chinese platform (a la Microsoft or Apple for the US), Chinese firms would need an extensive process of re-education.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Then there’s the problem of IP. While Western competitors have strong rules in place (and real penalties) for infringement of their IP – Chinese companies face a business environment where their development costs would be lost overnight as soon as another company could clone their product. Success, then, often led to copying.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;This of course doesn’t mean that Western companies in China get an easy ride. In fact Apple, a strong defender of its IP everywhere, has been unable to prevent clones and copies from flooding the market, all guaranteed to look similar to the original, though never approaching the same quality or usability.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;So it becomes clear why Android is so appealing to the Chinese marketplace: it enables companies to move into the usability “design” space that they’ve previously been unable to access. Here you have a strong, internationally accepted operating system, with an open license to be copied (at no cost) and installed and used on any device you like. In fact the OS developer positively encourages you to do so.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;It’s a stable platform with the weight of Google behind it and the thousands of talented computer science graduates in the country can play with it, adapt it and improve it – without having to design a system from the ground up. The market entry costs are limited to wages, so there’s a huge incentive for Chinese firms to get involved.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;This means that the traditional IC players now face stiff competition from China, with Rock Chips and Box Chips already selling millions and another local firm, Actions, about to enter the fray. These companies can focus on the Android platform and develop newer and faster processors to support the latest hardware and Android updates. As the OS gains further market traction and the Chinese companies find a growing talent pool of skilled engineers to work with it, this competition is going to get stronger.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Niche developers in China will benefit, too. They’ll have local chip sets for reasonable costs, and a versatile workforce to draw on – moving more in the long-term to a quality model, based on customization opportunities and away from a volume pricing model.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Currently there’s still a defined lag from Chinese firms in the commodity technology market, and when Android first launched this lag was a year or more over developed nation equivalents, but today this is down to 3 or 4 months. Soon Chinese companies, playing to their own strengths in the supply chain, will close this gap to make it negligible or even begin to take a leading role.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;For Google this is a big win too. The Chinese consumer market is a huge one and the trade-off for using a free Google service is that the user agrees to share data with Google. Of course Google’s ability to aggregate massive amounts of personal data directly relates to the quality of their products and services, but it matters more how they can exploit the information they gain from their use.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;China has only 40 million credit card users (based on slightly outdated figures released in 2010) and over 500 million computer users. This means that if the Android system were to appear on just 10% of all devices in the country, Google could conceivably, but probably won’t be able to access, more information on Chinese consumers than the country’s credit agencies! The rub is that the Android these firms are running is not “official” and as such rarely communicates with Google’s servers.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;As the price of Android tablets and phones continues to decrease, the percentage of users is likely to grow exponentially.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;This model of quality firmware partnered with lower-cost, mid-quality hardware, enables companies like Rock Chips and Box Chips to make millions of unit sales, and to win over not only the traditional “value” customer, but also the more discerning customers, domestically and overseas. It also encourages other IC manufacturers to come to the party and many will soon be joining them in an Android led technology revolution.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/6555240545628293738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2012/02/android-breathes-new-life-into-made-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/6555240545628293738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/6555240545628293738'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2012/02/android-breathes-new-life-into-made-in.html' title='Android Breathes New Life Into &quot;Made In China&quot; ..'/><author><name>Mayur Upadhyay</name><uri>http://www.blogger.com/profile/03327601152886094464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-6330763356050071532</id><published>2011-12-09T21:50:00.000-08:00</published><updated>2011-12-09T21:51:05.956-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="FIFO"/><title type='text'>Named Pipes (FIFOs - First In First Out)</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; &quot;&gt;&lt;span style=&quot;color: rgb(0, 102, 0); &quot;&gt;&lt;strong&gt;&lt;em&gt;Named Pipes (FIFOs - First In First Out)&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;span style=&quot;color: rgb(204, 0, 0); &quot;&gt;Basic Concepts&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;A named pipe works much like a regular pipe, but does have some noticeable differences.&lt;br /&gt;Named pipes exist as a device special file in the file system.&lt;br /&gt;Processes of different ancestry can share data through a named pipe.&lt;br /&gt;When all I/O is done by sharing processes, the named pipe remains in the file system for later use.&lt;br /&gt;&lt;br /&gt;To create a FIFO in C, we can make use of the mknod() system call:&lt;br /&gt;&lt;br /&gt;  LIBRARY FUNCTION: mknod(); &lt;br /&gt;&lt;br /&gt;  PROTOTYPE: int mknod( char *pathname, mode_t mode, dev_t dev); &lt;br /&gt;  RETURNS: 0 on success, &lt;br /&gt;  -1 on error: errno = EFAULT (pathname invalid) &lt;br /&gt;  EACCES (permission denied) &lt;br /&gt;  ENAMETOOLONG (pathname too long) &lt;br /&gt;  ENOENT (invalid pathname) &lt;br /&gt;  ENOTDIR (invalid pathname) &lt;br /&gt;  (see man page for mknod for others) &lt;br /&gt;&lt;br /&gt;  NOTES: Creates a filesystem node (file, device file, or FIFO)&lt;br /&gt;&lt;br /&gt;I will leave a more detailed discussion of mknod() to the man page, but let&#39;s consider a simple example of FIFO creation from C:&lt;br /&gt;  mknod(&quot;/tmp/MYFIFO&quot;, S_IFIFO|0666, 0);&lt;br /&gt;In this case, the file ``/tmp/MYFIFO&#39;&#39; is created as a FIFO file. The requested permissions are ``0666&#39;&#39;, although they are affected by the umask setting as follows:&lt;br /&gt;  final_umask = requested_permissions &amp;amp; ~original_umask&lt;br /&gt;A common trick is to use the umask() system call to temporarily zap the umask value:&lt;br /&gt;  umask(0);&lt;br /&gt;  mknod(&quot;/tmp/MYFIFO&quot;, S_IFIFO|0666, 0);&lt;br /&gt;In addition, the third argument to mknod() is ignored unless we are creating a device file. In that instance, it should specify the major and minor numbers of the device file.&lt;br /&gt;FIFO Operations&lt;br /&gt;I/O operations on a FIFO are essentially the same as for normal pipes, with once major exception. An ``open&#39;&#39; system call or library function should be used to physically open up a channel to the pipe. With half-duplex pipes, this is unnecessary, since the pipe resides in the kernel and not on a physical filesystem. In our examples, we will treat the pipe as a stream, opening it up with fopen(), and closing it with fclose().&lt;br /&gt;Consider a simple server process:&lt;br /&gt;/*****************************************************************************&lt;br /&gt;&lt;br /&gt; *****************************************************************************&lt;br /&gt; MODULE: fifoserver.c&lt;br /&gt; *****************************************************************************/&lt;br /&gt;&lt;br /&gt;#include // here stdio.h&lt;br /&gt;#include // here stdlib.h&lt;br /&gt;#include // here sys/stat.h&lt;br /&gt;#include // here unistd.h&lt;br /&gt;&lt;br /&gt;#include // here linux/stat.h&lt;br /&gt;&lt;br /&gt;#define FIFO_FILE &quot;MYFIFO&quot;&lt;br /&gt;&lt;br /&gt;int main(void)&lt;br /&gt;{&lt;br /&gt;  FILE *fp;&lt;br /&gt;  char readbuf[80];&lt;br /&gt;&lt;br /&gt;  /* Create the FIFO if it does not exist */&lt;br /&gt;  umask(0);&lt;br /&gt;  mknod(FIFO_FILE, S_IFIFO|0666, 0);&lt;br /&gt;&lt;br /&gt;  while(1)&lt;br /&gt;  {&lt;br /&gt;  fp = fopen(FIFO_FILE, &quot;r&quot;);&lt;br /&gt;  fgets(readbuf, 80, fp);&lt;br /&gt;  printf(&quot;Received string: %s\n&quot;, readbuf);&lt;br /&gt;  fclose(fp);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  return(0);&lt;br /&gt;}&lt;br /&gt;Since a FIFO blocks by default, run the server in the background after you compile it:&lt;br /&gt;  $ fifoserver&amp;amp;&lt;br /&gt;We will discuss a FIFO&#39;s blocking action in a moment. First, consider the following simple client frontend to our server:&lt;br /&gt;&lt;br /&gt;&lt;p&gt;/*   MODULE: fifoclient.c&lt;br /&gt;&lt;/p&gt; *****************************************************************************/&lt;br /&gt;&lt;br /&gt;#include // here stdio.h&lt;br /&gt;#include // here stdlib.h&lt;br /&gt;&lt;br /&gt;#define FIFO_FILE &quot;MYFIFO&quot;&lt;br /&gt;&lt;br /&gt;int main(int argc, char *argv[])&lt;br /&gt;{&lt;br /&gt;  FILE *fp;&lt;br /&gt;&lt;br /&gt;  if ( argc != 2 ) {&lt;br /&gt;  printf(&quot;USAGE: fifoclient [string]\n&quot;);&lt;br /&gt;  exit(1);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  if((fp = fopen(FIFO_FILE, &quot;w&quot;)) == NULL) {&lt;br /&gt;  perror(&quot;fopen&quot;);&lt;br /&gt;  exit(1);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  fputs(argv[1], fp);&lt;br /&gt;&lt;br /&gt;  fclose(fp);&lt;br /&gt;  return(0);&lt;br /&gt;}&lt;br /&gt;Blocking Actions on a FIFO&lt;br /&gt;Normally, blocking occurs on a FIFO. In other words, if the FIFO is opened for reading, the process will &quot;block&quot; until some other process opens it for writing. This action works vice-versa as well. If this behavior is undesirable, the O_NONBLOCK flag can be used in an open() call to disable the default blocking action.&lt;br /&gt;In the case with our simple server, we just shoved it into the background, and let it do its blocking there. The alternative would be to jump to another virtual console and run the client end, switching back and forth to see the resulting action.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Infamous SIGPIPE Signal&lt;br /&gt;On a last note, pipes must have a reader and a writer. If a process tries to write to a pipe that has no reader, it will be sent the SIGPIPE signal from the kernel. This is imperative when more than two processes are involved in a pipeline. &lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/6330763356050071532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2011/12/named-pipes-fifos-first-in-first-out.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/6330763356050071532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/6330763356050071532'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2011/12/named-pipes-fifos-first-in-first-out.html' title='Named Pipes (FIFOs - First In First Out)'/><author><name>Mayur</name><uri>http://www.blogger.com/profile/03319587789865450609</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-1492174090240423552</id><published>2011-12-09T21:39:00.000-08:00</published><updated>2011-12-09T21:40:21.855-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Multiple Choice Questions On Operating System"/><category scheme="http://www.blogger.com/atom/ns#" term="os"/><title type='text'>Frequently Asked Questions In Operating System Concepts</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; &quot;&gt;What is MUTEX ?&lt;br /&gt;What isthe difference between a &#39;thread&#39; and a &#39;process&#39;?&lt;br /&gt;What is INODE?&lt;br /&gt;Explain the working of Virtual Memory.&lt;br /&gt;How does Windows NT supports Multitasking?&lt;br /&gt;Explain the Unix Kernel.&lt;br /&gt;What is Concurrency? Expain with example Deadlock and Starvation.&lt;br /&gt;What are your solution strategies for &quot;Dining Philosophers Problem&quot; ?&lt;br /&gt;Explain Memory Partitioning, Paging, Segmentation.&lt;br /&gt;Explain Scheduling.&lt;br /&gt;Operating System Security.&lt;br /&gt;What is Semaphore?&lt;br /&gt;Explain the following file systems : NTFS, Macintosh(HPFS), FAT .&lt;br /&gt;What are the different process states?&lt;br /&gt;What is Marshalling?&lt;br /&gt;Define and explain COM?&lt;br /&gt;What is Marshalling?&lt;br /&gt;Difference - Loading and Linking ?&lt;br /&gt;What are the basic functions of an operating system?&lt;br /&gt;Explain briefly about, processor, assembler, compiler, loader, linker and the functions executed by them.&lt;br /&gt;What are the difference phases of software development? Explain briefly?&lt;br /&gt;Differentiate between RAM and ROM?&lt;br /&gt;What is DRAM? In which form does it store data?&lt;br /&gt;What is cache memory?&lt;br /&gt;What is hard disk and what is its purpose?&lt;br /&gt;Differentiate between Complier and Interpreter?&lt;br /&gt;What are the different tasks of Lexical analysis?&lt;br /&gt;What are the different functions of Syntax phase, Sheduler?&lt;br /&gt;What are the main difference between Micro-Controller and Micro- Processor?&lt;br /&gt;Describe different job scheduling in operating systems.&lt;br /&gt;What is a Real-Time System ?&lt;br /&gt;What is the difference between Hard and Soft real-time systems ?&lt;br /&gt;What is a mission critical system ?&lt;br /&gt;What is the important aspect of a real-time system ?&lt;br /&gt; If two processes which shares same system memory and system clock in a distributed system, What is it called?&lt;br /&gt;What is the state of the processor, when a process is waiting for some event to occur?&lt;br /&gt;What do you mean by deadlock?&lt;br /&gt;Explain the difference between microkernel and macro kernel.&lt;br /&gt;Give an example of microkernel.&lt;br /&gt;When would you choose bottom up methodology?&lt;br /&gt;When would you choose top down methodology?&lt;br /&gt;Write a small dc shell script to find number of FF in the design.&lt;br /&gt;Why paging is used ?&lt;br /&gt;Which is the best page replacement algorithm and Why? How much time is spent usually in each phases and why?&lt;br /&gt;Difference between Primary storage and secondary storage?&lt;br /&gt;What is multi tasking, multi programming, multi threading?&lt;br /&gt;Difference between multi threading and multi tasking?&lt;br /&gt;What is software life cycle?&lt;br /&gt;Demand paging, page faults, replacement algorithms, thrashing, etc.&lt;br /&gt;Explain about paged segmentation and segment paging&lt;br /&gt;While running DOS on a PC, which command would be used to duplicate the entire diskette? &lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;    style=&quot;font-family:&#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif;font-size:100%;color:#333333;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;font-family:&#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif;color:#333333;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 18px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://exactsolution.co.cc&quot;&gt;---&amp;gt;  OS multiple choice questions ----&amp;gt;&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/1492174090240423552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2011/12/frequently-asked-questions-in-operating.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/1492174090240423552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/1492174090240423552'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2011/12/frequently-asked-questions-in-operating.html' title='Frequently Asked Questions In Operating System Concepts'/><author><name>Mayur</name><uri>http://www.blogger.com/profile/03319587789865450609</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-7142084236113584831</id><published>2011-12-09T21:38:00.001-08:00</published><updated>2011-12-09T21:38:46.115-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Multiple Choice Questions On Operating System"/><category scheme="http://www.blogger.com/atom/ns#" term="os"/><title type='text'>Multiple Choice Questions On Operating System Part-6</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; &quot;&gt;1) The high paging activity is called ________.&lt;br /&gt;1 Inter process communication&lt;br /&gt;2 Thrashing&lt;br /&gt;3 Context Switch&lt;br /&gt;4 None of the above&lt;br /&gt;Right Ans ) 2&lt;br /&gt;&lt;br /&gt;2) The Hardware mechanism that enables a device to notify the CPU is called __________.&lt;br /&gt;1 Polling&lt;br /&gt;2 Interrupt&lt;br /&gt;3 System Call&lt;br /&gt;4 None of the above&lt;br /&gt;Right Ans ) 2&lt;br /&gt;&lt;br /&gt;3) In the running state&lt;br /&gt;1 only the process which has control of the processor is found&lt;br /&gt;2 all the processes waiting for I/O to be completed are found&lt;br /&gt;3 all the processes waiting for the processor are found&lt;br /&gt;4 none of the above&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;4) Which of the following is crucial time while accessing data on the disk?&lt;br /&gt;1 Seek time&lt;br /&gt;2 Rotational time&lt;br /&gt;3 Transmission time&lt;br /&gt;4 Waiting time&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;5) Process State is a part of&lt;br /&gt;1 Process Control block&lt;br /&gt;2 Inode&lt;br /&gt;3 File Allocation Table&lt;br /&gt;4 None of the above&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;6) Who is called a supervisor of computer acitvity ?&lt;br /&gt;1 CPU&lt;br /&gt;2 Operating system&lt;br /&gt;3 Control unit&lt;br /&gt;4 Application Program&lt;br /&gt;Right Ans ) 2&lt;br /&gt;&lt;br /&gt;7) Virtual memory is __________.&lt;br /&gt;1 An extremely large main memory&lt;br /&gt;2 An extremely large secondary memory&lt;br /&gt;3 An illusion of extremely large main memory&lt;br /&gt;4 A type of memory used in super computers.&lt;br /&gt;Right Ans ) 3&lt;br /&gt;&lt;br /&gt;8) The kernel keeps track of the state of each task by using a data structure called __&lt;br /&gt;1 Process control block&lt;br /&gt;2 User control block&lt;br /&gt;3 Memory control block&lt;br /&gt;4 None of the above&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;9) Which of the following disk scheduling techniques has a drawback of starvation ?&lt;br /&gt;1 SCAN&lt;br /&gt;2 SSTF&lt;br /&gt;3 FCFS&lt;br /&gt;4 LIFO&lt;br /&gt;Right Ans ) 2&lt;br /&gt;&lt;br /&gt;10) A binary semaphore&lt;br /&gt;1 has the values one or zero&lt;br /&gt;2 is essential to binary computers&lt;br /&gt;3 is used only for synchronisation&lt;br /&gt;4 is used only for mutual exclusion&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;11) _________ page replacement alogorithm suffers from Belady&#39;s anamoly.&lt;br /&gt;1 LRU&lt;br /&gt;2 MRU&lt;br /&gt;3 FIFO&lt;br /&gt;4 LIFO&lt;br /&gt;Right Ans ) 3&lt;br /&gt;&lt;br /&gt;12) _________ is a high speed cache used to hold recently referenced page table entries a part of paged virtual memory&lt;br /&gt;1 Translation Lookaside buffer&lt;br /&gt;2 Inverse page table&lt;br /&gt;3 Segmented page table&lt;br /&gt;4 All the above&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;13) _________ does the job of allocating a process to the processor.&lt;br /&gt;1 Long term scheduler&lt;br /&gt;2 Short term scheduler&lt;br /&gt;3 Medium term scheduler&lt;br /&gt;4 Dispatcher&lt;br /&gt;Right Ans ) 4&lt;br /&gt;&lt;br /&gt;14) In interactive environments such as time-sharing systems, the primary requirement is to provide reasonably good response time and in general, to share system resources equitably. In such situations, the scheduling algorithm that is most popularly applied is ________.&lt;br /&gt;1 Shortest Remaining Time Next (SRTN) Scheduling&lt;br /&gt;2 Priority Based Preemptive Scheduling&lt;br /&gt;3 Round Robin Scheduling&lt;br /&gt;4 None of the above&lt;br /&gt;Right Ans ) 3&lt;br /&gt;&lt;br /&gt;15) In the multi-programming environment, the main memory consisting of _________ number of process.&lt;br /&gt;1 Greater than 100&lt;br /&gt;2 Only one&lt;br /&gt;3 Greater than 50&lt;br /&gt;4 More than one&lt;br /&gt;Right Ans ) 4&lt;br /&gt;&lt;br /&gt;16) In a multithreaded environment _______.&lt;br /&gt;1 Each thread is allocated with new memory from main memory.&lt;br /&gt;2 Main thread terminates after the termination of child threads.&lt;br /&gt;3 Every process can have only one thread.&lt;br /&gt;4 None of the above&lt;br /&gt;Right Ans ) 2&lt;br /&gt;&lt;br /&gt;17) Which of the following statement is not true?&lt;br /&gt;1 Multiprogramming implies multitasking&lt;br /&gt;2 Multi-user does not imply multiprocessing&lt;br /&gt;3 Multitasking does not imply multiprocessing&lt;br /&gt;4 Multithreading implies multi-user&lt;br /&gt;Right Ans ) 4&lt;br /&gt;&lt;br /&gt;18) In one of the deadlock prevention methods, impose a total ordering of all resource types, and require that each process requests resources in an increasing order of enumeration. This voilates the _______________ condition of deadlock&lt;br /&gt;1 Mutual exclusion&lt;br /&gt;2 Hold and Wait&lt;br /&gt;3 Circular Wait&lt;br /&gt;4 No Preemption&lt;br /&gt;Right Ans ) 3&lt;br /&gt;&lt;br /&gt;19) In the ___________ method of data transfer, the participation of the processor is eliminated during data transfer.&lt;br /&gt;1 Buffering&lt;br /&gt;2 Caching&lt;br /&gt;3 Direct Memory Access&lt;br /&gt;4 Indirect Memory Access&lt;br /&gt;Right Ans ) 3&lt;br /&gt;&lt;br /&gt;20) A thread is a __________ process .&lt;br /&gt;1 Heavy Weight&lt;br /&gt;2 Mutliprocess&lt;br /&gt;3 Inter Thread&lt;br /&gt;4 Light wieght&lt;br /&gt;Right Ans ) 4&lt;br /&gt;&lt;br /&gt;21) Data reside in file on disk under DOS environment, which of the following file name is invalid ?&lt;br /&gt;1 OSCONCEPTS.doc&lt;br /&gt;2 RAW&lt;br /&gt;3 COMPAQ.BOOK&lt;br /&gt;4 JUMPSTART.BOS&lt;br /&gt;Right Ans ) 3&lt;br /&gt;&lt;br /&gt;22) In Priority Scheduling a priority number (integer) is associated with each process. The CPU is allocated to the process with the highest priority (smallest integer = highest priority). The problem of, Starvation ? low priority processes may never execute, is resolved by __________.&lt;br /&gt;1 Terminating the process.&lt;br /&gt;2 Aging&lt;br /&gt;3 Mutual Exclusion&lt;br /&gt;4 Semaphore&lt;br /&gt;Right Ans ) 2&lt;br /&gt;&lt;br /&gt;23) CPU Scheduling is the basis of _________ operating system&lt;br /&gt;1 Batch&lt;br /&gt;2 Real time&lt;br /&gt;3 Multiprogramming&lt;br /&gt;4 Monoprogramming&lt;br /&gt;Right Ans ) 3&lt;br /&gt;&lt;br /&gt;24) A major problem with priority scheduling is _________.&lt;br /&gt;1 Definite blocking&lt;br /&gt;2 Starvation&lt;br /&gt;3 Low priority&lt;br /&gt;4 None of the above&lt;br /&gt;Right Ans ) 2&lt;br /&gt;&lt;br /&gt;25) ________ scheduler selects the jobs from the pool of jobs and loads into the ready queue.&lt;br /&gt;1 Long term&lt;br /&gt;2 Short term&lt;br /&gt;3 Medium term&lt;br /&gt;4 None of the above&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;26) Which directory implementation is used in most Operating System?&lt;br /&gt;1 Single level directory structure&lt;br /&gt;2 Two level directory structure&lt;br /&gt;3 Tree directory structure&lt;br /&gt;4 Acyclic directory structure&lt;br /&gt;Right Ans ) 3&lt;br /&gt;&lt;br /&gt;27) Saving the state of the old process and loading the saved state of the new process is called ________.&lt;br /&gt;1 Context Switch&lt;br /&gt;2 State&lt;br /&gt;3 Multi programming&lt;br /&gt;4 None of the above&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;28) The term &quot; Operating System &quot; means ________.&lt;br /&gt;1 A set of programs which controls computer working&lt;br /&gt;2 The way a computer operator works&lt;br /&gt;3 Conversion of high-level language in to machine level language&lt;br /&gt;4 The way a floppy disk drive operates&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;29) Resource locking ________.&lt;br /&gt;1 Allows multiple tasks to simultaneously use resource&lt;br /&gt;2 Forces only one task to use any resource at any time&lt;br /&gt;3 Can easily cause a dead lock condition&lt;br /&gt;4 Is not used for disk drives&lt;br /&gt;Right Ans ) 2&lt;br /&gt;&lt;br /&gt;30) A thread&lt;br /&gt;1 is a lightweight process where the context switching is low&lt;br /&gt;2 is a lightweight process where the context swithching is high&lt;br /&gt;3 is used to speed up paging&lt;br /&gt;4 none of the above&lt;br /&gt;Right Ans ) 1&lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; &quot;&gt;----&amp;gt; NEXT PART ----&amp;gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/7142084236113584831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2011/12/multiple-choice-questions-on-operating_9090.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/7142084236113584831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/7142084236113584831'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2011/12/multiple-choice-questions-on-operating_9090.html' title='Multiple Choice Questions On Operating System Part-6'/><author><name>Mayur</name><uri>http://www.blogger.com/profile/03319587789865450609</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-5644496385108812665</id><published>2011-12-09T21:35:00.000-08:00</published><updated>2011-12-10T03:57:07.074-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Multiple Choice Questions On Operating System"/><category scheme="http://www.blogger.com/atom/ns#" term="os"/><title type='text'>Multiple Choice Questions On Operating System Part-5</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(51, 51, 51); line-height: 18px; font-family:&#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif;font-size:13px;&quot;&gt;1) Using Priority Scheduling algorithm, find the average waiting time for the following set of processes given with their priorities in the order: Process : Burst Time : Priority respectively . P1 : 10 : 3 , P2 : 1 : 1 , P3 : 2 : 4 , P4 : 1 : 5 , P5 : 5 : 2.&lt;br /&gt;1 8 milliseconds&lt;br /&gt;2 8.2 milliseconds&lt;br /&gt;3 7.75 milliseconds&lt;br /&gt;4 3 milliseconds&lt;br /&gt;Right Ans ) 2&lt;br /&gt;&lt;br /&gt;2) Routine is not loaded until it is called. All routines are kept on disk in a relocatable load format. The main program is loaded into memory &amp;amp; is executed. This type of loading is called _________&lt;br /&gt;1 Static loading&lt;br /&gt;2 Dynamic loading&lt;br /&gt;3 Dynamic linking&lt;br /&gt;4 Overlays&lt;br /&gt;Right Ans ) 3&lt;br /&gt;&lt;br /&gt;3) In the running state&lt;br /&gt;1 only the process which has control of the processor is found&lt;br /&gt;2 all the processes waiting for I/O to be completed are found&lt;br /&gt;3 all the processes waiting for the processor are found&lt;br /&gt;4 none of the above&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;4) The Purpose of Co-operating Process is __________.&lt;br /&gt;1 Information Sharing&lt;br /&gt;2 Convenience&lt;br /&gt;3 Computation Speed-Up&lt;br /&gt;4 All of the above&lt;br /&gt;Right Ans ) 4&lt;br /&gt;&lt;br /&gt;5) The kernel of the operating system remains in the primary memory because ________.&lt;br /&gt;1 It is mostly called (used)&lt;br /&gt;2 It manages all interrupt calls&lt;br /&gt;3 It controls all operations in process&lt;br /&gt;4 It is low level&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;6) The process related to process control, file management, device management, information about system and communication that is requested by any higher level language can be performed by __________.&lt;br /&gt;1 Editors&lt;br /&gt;2 Compilers&lt;br /&gt;3 System Call&lt;br /&gt;4 Caching&lt;br /&gt;Right Ans ) 3&lt;br /&gt;&lt;br /&gt;7) Which of the following disk scheduling techniques has a drawback of starvation ?&lt;br /&gt;1 SCAN&lt;br /&gt;2 SSTF&lt;br /&gt;3 FCFS&lt;br /&gt;4 LIFO&lt;br /&gt;Right Ans ) 2&lt;br /&gt;&lt;br /&gt;8) Multiprogramming systems ________.&lt;br /&gt;1 Are easier to develop than single programming systems&lt;br /&gt;2 Execute each job faster&lt;br /&gt;3 Execute more jobs in the same time&lt;br /&gt;4 Are used only on large main frame computers&lt;br /&gt;Right Ans ) 3&lt;br /&gt;&lt;br /&gt;9) Under multiprogramming, turnaround time for short jobs is usually ________ and that for long jobs is slightly ___________.&lt;br /&gt;1 Lengthened; Shortened&lt;br /&gt;2 Shortened; Lengthened&lt;br /&gt;3 Shortened; Shortened&lt;br /&gt;4 Shortened; Unchanged&lt;br /&gt;Right Ans ) 2&lt;br /&gt;&lt;br /&gt;10) Multiprocessing ________.&lt;br /&gt;1 Make the operating system simpler&lt;br /&gt;2 Allows multiple processes to run simultaneously&lt;br /&gt;3 Is completely understood by all major computer vendors&lt;br /&gt;4 Allows the same computer to have the multiple processors&lt;br /&gt;Right Ans ) 4&lt;br /&gt;&lt;br /&gt;11) Which is not the state of the process ?&lt;br /&gt;1 Blocked&lt;br /&gt;2 Running&lt;br /&gt;3 Ready&lt;br /&gt;4 Privileged&lt;br /&gt;Right Ans ) 4&lt;br /&gt;&lt;br /&gt;12) A set of resources&#39; allocations such that the system can allocate resources to each process in some order, and still avoid a deadlock is called ________.&lt;br /&gt;1 Unsafe state&lt;br /&gt;2 Safe state&lt;br /&gt;3 Starvation&lt;br /&gt;4 Greeedy allocation&lt;br /&gt;Right Ans ) 2&lt;br /&gt;&lt;br /&gt;13) The principle of locality of reference justifies the use of ________.&lt;br /&gt;1 Virtual Memory&lt;br /&gt;2 Interrupts&lt;br /&gt;3 Main memory&lt;br /&gt;4 Cache memory&lt;br /&gt;Right Ans ) 4&lt;br /&gt;&lt;br /&gt;14) What is the first step in performing an operating system upgrade ?&lt;br /&gt;1 Partition the drive&lt;br /&gt;2 Format the drive&lt;br /&gt;3 Backup critical data&lt;br /&gt;4 Backup old operating system&lt;br /&gt;Right Ans ) 3&lt;br /&gt;&lt;br /&gt;15) The technique, for sharing the time of a computer among several jobs, which switches jobs so rapidly such that each job appears to have the computer to itself, is called ________.&lt;br /&gt;1 Time Sharing&lt;br /&gt;2 Time out&lt;br /&gt;3 Time domain&lt;br /&gt;4 Multitasking&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;16) In a virtural memory environment&lt;br /&gt;1 segmentation and page tables are stored in the cache and do not add any substantial overhead&lt;br /&gt;2 slow down the computer system considerable&lt;br /&gt;3 segmentation and page tables are stored in the RAM&lt;br /&gt;4 none of the above&lt;br /&gt;Right Ans ) 3&lt;br /&gt;&lt;br /&gt;17) If all page frames are initially empty, and a process is allocated 3 page frames in real memory and references its pages in the order 1 2 3 2 4 5 2 3 2 4 1 and the page replacement is FIFO, the total number of page faults caused by the process will be __________.&lt;br /&gt;1 10&lt;br /&gt;2 7&lt;br /&gt;3 8&lt;br /&gt;4 9&lt;br /&gt;Right Ans ) 4&lt;br /&gt;&lt;br /&gt;18) Situations where two or more processes are reading or writing some shared data and the final results depends on the order of usage of the shared data, are called ________.&lt;br /&gt;1 Race conditions&lt;br /&gt;2 Critical section&lt;br /&gt;3 Mutual exclusion&lt;br /&gt;4 Dead locks&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;19) When two or more processes attempt to access the same resource a _________ occurs.&lt;br /&gt;1 Critical section&lt;br /&gt;2 Fight&lt;br /&gt;3 Communication problem&lt;br /&gt;4 Race condition&lt;br /&gt;Right Ans ) 4&lt;br /&gt;&lt;br /&gt;20) Which technique was introduced because a single job could not keep both the CPU and the I/O devices busy?&lt;br /&gt;1 Time-sharing&lt;br /&gt;2 SPOOLing&lt;br /&gt;3 Preemptive scheduling&lt;br /&gt;4 Multiprogramming&lt;br /&gt;Right Ans ) 4&lt;br /&gt;&lt;br /&gt;21) _________ allocates the largest hole (free fragmant) available in the memory.&lt;br /&gt;1 Best Fit&lt;br /&gt;2 Worst Fit&lt;br /&gt;3 First Fit&lt;br /&gt;4 None of the above&lt;br /&gt;Right Ans ) 2&lt;br /&gt;&lt;br /&gt;22) A process is starved&lt;br /&gt;1 if it is permanently waiting for a resource&lt;br /&gt;2 if semaphores are not used&lt;br /&gt;3 if a queue is not used for scheduling&lt;br /&gt;4 if demand paging is not properly implemented&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;23) The degree of Multiprogramming is controlled by&lt;br /&gt;1 CPU Scheduler&lt;br /&gt;2 Context Switching&lt;br /&gt;3 Long-term Scheduler&lt;br /&gt;4 Medium term Scheduler&lt;br /&gt;Right Ans ) 3&lt;br /&gt;&lt;br /&gt;24) The time taken to bring the desired track/cylinder under the head is _________.&lt;br /&gt;1 Seek time&lt;br /&gt;2 Latency time&lt;br /&gt;3 Transfer time&lt;br /&gt;4 Read time&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;25) Replace the page that will not be used for the longest period of time. This principle is adopted by ____________.&lt;br /&gt;1 FIFO Page replacement algorithm&lt;br /&gt;2 Optimal Page replacement algorithm&lt;br /&gt;3 Round robin scheduling algorithm&lt;br /&gt;4 SCAN scheduling algorithm&lt;br /&gt;Right Ans ) 3&lt;br /&gt;&lt;br /&gt;26) Which of the following is a criterion to evaluate a scheduling algorithm?&lt;br /&gt;1 CPU Utilization: Keep CPU utilization as high as possible.&lt;br /&gt;2 Throughput: number of processes completed per unit time.&lt;br /&gt;3 Waiting Time: Amount of time spent ready to run but not running.&lt;br /&gt;4 All of the above&lt;br /&gt;Right Ans ) 4&lt;br /&gt;&lt;br /&gt;27) The operating system of a computer serves as a software interface between the user and the ________.&lt;br /&gt;1 Hardware&lt;br /&gt;2 Peripheral&lt;br /&gt;3 Memory&lt;br /&gt;4 Screen&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;28) Super computers typically employ _______.&lt;br /&gt;1 Real time Operating system&lt;br /&gt;2 Multiprocessors OS&lt;br /&gt;3 desktop OS&lt;br /&gt;4 None of the above&lt;br /&gt;Right Ans ) 2&lt;br /&gt;&lt;br /&gt;29) A process that is based on IPC mechanism which executes on different systems and can communicate with other processes using message based communication, is called ________.&lt;br /&gt;1 Local Procedure Call&lt;br /&gt;2 Inter Process Communication&lt;br /&gt;3 Remote Procedure Call&lt;br /&gt;4 Remote Machine Invocation&lt;br /&gt;Right Ans ) 3&lt;br /&gt;&lt;br /&gt;30) A process is&lt;br /&gt;1 program in execution&lt;br /&gt;2 a concurrent program&lt;br /&gt;3 any sequential program&lt;br /&gt;4 something which prevents deadlock&lt;br /&gt;Right Ans ) 1&lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(51, 51, 51); line-height: 18px; font-family:&#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif;font-size:13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(51, 51, 51); line-height: 18px; font-family:&#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif;font-size:13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(51, 51, 51); line-height: 18px; font-family:&#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif;font-size:13px;&quot;&gt;&lt;a href=&quot;http://www.exactsolution.co.cc/2011/12/multiple-choice-questions-on-operating_9090.html&quot;&gt;---&amp;gt; NEXT PART ---&amp;gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/5644496385108812665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2011/12/multiple-choice-questions-on-operating_8101.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/5644496385108812665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/5644496385108812665'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2011/12/multiple-choice-questions-on-operating_8101.html' title='Multiple Choice Questions On Operating System Part-5'/><author><name>Mayur</name><uri>http://www.blogger.com/profile/03319587789865450609</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-4578696512934486288</id><published>2011-12-09T21:34:00.000-08:00</published><updated>2011-12-10T03:56:31.594-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Multiple Choice Questions On Operating System"/><category scheme="http://www.blogger.com/atom/ns#" term="os"/><title type='text'>Multiple Choice Questions On Operating System Part-4</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(51, 51, 51); line-height: 18px; font-family:&#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif;font-size:13px;&quot;&gt;1) Round robin scheduling is essentially the preemptive version of ________.&lt;br /&gt;1 FIFO&lt;br /&gt;2 Shortest job first&lt;br /&gt;3 Shortes remaining&lt;br /&gt;4 Longest time first&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;2) A page fault occurs&lt;br /&gt;1 when the page is not in the memory&lt;br /&gt;2 when the page is in the memory&lt;br /&gt;3 when the process enters the blocked state&lt;br /&gt;4 when the process is in the ready state&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;3) Which of the following will determine your choice of systems software for your computer ?&lt;br /&gt;1 Is the applications software you want to use compatible with it ?&lt;br /&gt;2 Is it expensive ?&lt;br /&gt;3 Is it compatible with your hardware ?&lt;br /&gt;4 Both 1 and 3&lt;br /&gt;Right Ans ) 4&lt;br /&gt;&lt;br /&gt;4) Let S and Q be two semaphores initialized to 1, where P0 and P1 processes the following statements wait(S);wait(Q); ---; signal(S);signal(Q) and wait(Q); wait(S);---;signal(Q);signal(S); respectively. The above situation depicts a _________ .&lt;br /&gt;1 Semaphore&lt;br /&gt;2 Deadlock&lt;br /&gt;3 Signal&lt;br /&gt;4 Interrupt&lt;br /&gt;Right Ans ) 2&lt;br /&gt;&lt;br /&gt;5) What is a shell ?&lt;br /&gt;1 It is a hardware component&lt;br /&gt;2 It is a command interpreter&lt;br /&gt;3 It is a part in compiler&lt;br /&gt;4 It is a tool in CPU scheduling&lt;br /&gt;Right Ans ) 2&lt;br /&gt;&lt;br /&gt;6) Routine is not loaded until it is called. All routines are kept on disk in a relocatable load format. The main program is loaded into memory &amp;amp; is executed. This type of loading is called _________&lt;br /&gt;1 Static loading&lt;br /&gt;2 Dynamic loading&lt;br /&gt;3 Dynamic linking&lt;br /&gt;4 Overlays&lt;br /&gt;Right Ans ) 3&lt;br /&gt;&lt;br /&gt;7) In the blocked state&lt;br /&gt;1 the processes waiting for I/O are found&lt;br /&gt;2 the process which is running is found&lt;br /&gt;3 the processes waiting for the processor are found&lt;br /&gt;4 none of the above&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;8) What is the memory from 1K - 640K called ?&lt;br /&gt;1 Extended Memory&lt;br /&gt;2 Normal Memory&lt;br /&gt;3 Low Memory&lt;br /&gt;4 Conventional Memory&lt;br /&gt;Right Ans ) 4&lt;br /&gt;&lt;br /&gt;9) Virtual memory is __________.&lt;br /&gt;1 An extremely large main memory&lt;br /&gt;2 An extremely large secondary memory&lt;br /&gt;3 An illusion of extremely large main memory&lt;br /&gt;4 A type of memory used in super computers.&lt;br /&gt;Right Ans ) 3&lt;br /&gt;&lt;br /&gt;10) The process related to process control, file management, device management, information about system and communication that is requested by any higher level language can be performed by __________.&lt;br /&gt;1 Editors&lt;br /&gt;2 Compilers&lt;br /&gt;3 System Call&lt;br /&gt;4 Caching&lt;br /&gt;Right Ans ) 3&lt;br /&gt;&lt;br /&gt;11) If the Disk head is located initially at 32, find the number of disk moves required with FCFS if the disk queue of I/O blocks requests are 98,37,14,124,65,67.&lt;br /&gt;1 310&lt;br /&gt;2 324&lt;br /&gt;3 315&lt;br /&gt;4 321&lt;br /&gt;Right Ans ) 4&lt;br /&gt;&lt;br /&gt;12) Multiprogramming systems ________.&lt;br /&gt;1 Are easier to develop than single programming systems&lt;br /&gt;2 Execute each job faster&lt;br /&gt;3 Execute more jobs in the same time&lt;br /&gt;4 Are used only on large main frame computers&lt;br /&gt;Right Ans ) 3&lt;br /&gt;&lt;br /&gt;13) Which is not the state of the process ?&lt;br /&gt;1 Blocked&lt;br /&gt;2 Running&lt;br /&gt;3 Ready&lt;br /&gt;4 Privileged&lt;br /&gt;Right Ans ) 4&lt;br /&gt;&lt;br /&gt;14) The solution to Critical Section Problem is : Mutual Exclusion, Progress and Bounded Waiting.&lt;br /&gt;1 The statement is false&lt;br /&gt;2 The statement is true.&lt;br /&gt;3 The statement is contradictory.&lt;br /&gt;4 None of the above&lt;br /&gt;Right Ans ) 2&lt;br /&gt;&lt;br /&gt;15) The problem of thrashing is effected scientifically by ________.&lt;br /&gt;1 Program structure&lt;br /&gt;2 Program size&lt;br /&gt;3 Primary storage size&lt;br /&gt;4 None of the above&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;16) The state of a process after it encounters an I/O instruction is __________.&lt;br /&gt;1 Ready&lt;br /&gt;2 Blocked/Waiting&lt;br /&gt;3 Idle&lt;br /&gt;4 Running&lt;br /&gt;Right Ans ) 2&lt;br /&gt;&lt;br /&gt;17) The number of processes completed per unit time is known as __________.&lt;br /&gt;1 Output&lt;br /&gt;2 Throughput&lt;br /&gt;3 Efficiency&lt;br /&gt;4 Capacity&lt;br /&gt;Right Ans ) 2&lt;br /&gt;&lt;br /&gt;18) _________ is the situation in which a process is waiting on another process,which is also waiting on another process ... which is waiting on the first process. None of the processes involved in this circular wait are making progress.&lt;br /&gt;1 Deadlock&lt;br /&gt;2 Starvation&lt;br /&gt;3 Dormant&lt;br /&gt;4 None of the above&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;19) Which of the following file name extension suggests that the file is Backup copy of another file ?&lt;br /&gt;1 TXT&lt;br /&gt;2 COM&lt;br /&gt;3 BAS&lt;br /&gt;4 BAK&lt;br /&gt;Right Ans ) 4&lt;br /&gt;&lt;br /&gt;20) Which technique was introduced because a single job could not keep both the CPU and the I/O devices busy?&lt;br /&gt;1 Time-sharing&lt;br /&gt;2 SPOOLing&lt;br /&gt;3 Preemptive scheduling&lt;br /&gt;4 Multiprogramming&lt;br /&gt;Right Ans ) 4&lt;br /&gt;&lt;br /&gt;21) A critical region&lt;br /&gt;1 is a piece of code which only one process executes at a time&lt;br /&gt;2 is a region prone to deadlock&lt;br /&gt;3 is a piece of code which only a finite number of processes execute&lt;br /&gt;4 is found only in Windows NT operation system&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;22) The mechanism that bring a page into memory only when it is needed is called _____________&lt;br /&gt;1 Segmentation&lt;br /&gt;2 Fragmentation&lt;br /&gt;3 Demand Paging&lt;br /&gt;4 Page Replacement&lt;br /&gt;Right Ans ) 3&lt;br /&gt;&lt;br /&gt;23) PCB =&lt;br /&gt;1 Program Control Block&lt;br /&gt;2 Process Control Block&lt;br /&gt;3 Process Communication Block&lt;br /&gt;4 None of the above&lt;br /&gt;Right Ans ) 2&lt;br /&gt;&lt;br /&gt;24) FIFO scheduling is ________.&lt;br /&gt;1 Preemptive Scheduling&lt;br /&gt;2 Non Preemptive Scheduling&lt;br /&gt;3 Deadline Scheduling&lt;br /&gt;4 Fair share scheduling&lt;br /&gt;Right Ans ) 2&lt;br /&gt;&lt;br /&gt;25) Switching the CPU to another Process requires to save state of the old process and loading new process state is called as __________.&lt;br /&gt;1 Process Blocking&lt;br /&gt;2 Context Switch&lt;br /&gt;3 Time Sharing&lt;br /&gt;4 None of the above&lt;br /&gt;Right Ans ) 2&lt;br /&gt;&lt;br /&gt;26) Which directory implementation is used in most Operating System?&lt;br /&gt;1 Single level directory structure&lt;br /&gt;2 Two level directory structure&lt;br /&gt;3 Tree directory structure&lt;br /&gt;4 Acyclic directory structure&lt;br /&gt;Right Ans ) 3&lt;br /&gt;&lt;br /&gt;27) The Banker¿s algorithm is used&lt;br /&gt;1 to prevent deadlock in operating systems&lt;br /&gt;2 to detect deadlock in operating systems&lt;br /&gt;3 to rectify a deadlocked state&lt;br /&gt;4 none of the above&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;28) A thread&lt;br /&gt;1 is a lightweight process where the context switching is low&lt;br /&gt;2 is a lightweight process where the context swithching is high&lt;br /&gt;3 is used to speed up paging&lt;br /&gt;4 none of the above&lt;br /&gt;Right Ans ) 1&lt;br /&gt;&lt;br /&gt;29) ______ is a high level abstraction over Semaphore.&lt;br /&gt;1 Shared memory&lt;br /&gt;2 Message passing&lt;br /&gt;3 Monitor&lt;br /&gt;4 Mutual exclusion&lt;br /&gt;Right Ans ) 3&lt;br /&gt;&lt;br /&gt;30) A tree sturctured file directory system&lt;br /&gt;1 allows easy storage and retrieval of file names&lt;br /&gt;2 is a much debated unecessary feature&lt;br /&gt;3 is not essential when we have millions of files&lt;br /&gt;4 none of the above&lt;br /&gt;Right Ans ) 1&lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(51, 51, 51); line-height: 18px; font-family:&#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif;font-size:13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(51, 51, 51); line-height: 18px; font-family:&#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif;font-size:13px;&quot;&gt;&lt;a href=&quot;http://www.exactsolution.co.cc/2011/12/multiple-choice-questions-on-operating_8101.html&quot;&gt;---&amp;gt; NEXT PART ---&amp;gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/4578696512934486288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2011/12/multiple-choice-questions-on-operating_5199.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/4578696512934486288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/4578696512934486288'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2011/12/multiple-choice-questions-on-operating_5199.html' title='Multiple Choice Questions On Operating System Part-4'/><author><name>Mayur</name><uri>http://www.blogger.com/profile/03319587789865450609</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-8475928542980129360</id><published>2011-12-09T21:32:00.000-08:00</published><updated>2011-12-10T03:55:52.076-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Multiple Choice Questions On Operating System"/><category scheme="http://www.blogger.com/atom/ns#" term="os"/><title type='text'>Multiple Choice Questions On Operating System Part-3</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(51, 51, 51); line-height: 18px; font-family:&#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif;font-size:13px;&quot;&gt;1) Routine is not loaded until it is called. All routines are kept on disk in a relocatable load format. The main program is loaded into memory &amp;amp; is executed. This type of loading is called _________&lt;br /&gt;1 Static loading&lt;br /&gt;2 Dynamic loading&lt;br /&gt;3 Dynamic linking&lt;br /&gt;4 Overlays&lt;br /&gt;Ans ) 3&lt;br /&gt;&lt;br /&gt;2) Which of the following is crucial time while accessing data on the disk?&lt;br /&gt;1 Seek time&lt;br /&gt;2 Rotational time&lt;br /&gt;3 Transmission time&lt;br /&gt;4 Waiting time&lt;br /&gt;Ans ) 1&lt;br /&gt;&lt;br /&gt;3) The host repeatedly checks if the controller is busy until it is not. It is in a loop that status register&#39;s busy bit becomes clear. This is called _____________ and a mechanism for the hardware controller to notify the CPU that it is ready is called ___________.&lt;br /&gt;1 Interrupt and Polling&lt;br /&gt;2 Polling and Spooling&lt;br /&gt;3 Polling and Interrupt&lt;br /&gt;4 Deadlock and Starvation&lt;br /&gt;Ans ) 3&lt;br /&gt;&lt;br /&gt;4) Unix Operating System is an __________.&lt;br /&gt;1 Time Sharing Operating System&lt;br /&gt;2 Multi-User Operating System&lt;br /&gt;3 Multi-tasking Operating System&lt;br /&gt;4 All the Above&lt;br /&gt;Ans ) 4&lt;br /&gt;&lt;br /&gt;5) Which of the following memory allocation scheme suffers from External fragmentation?&lt;br /&gt;1 Segmentation&lt;br /&gt;2 Pure demand paging&lt;br /&gt;3 Swapping&lt;br /&gt;4 Paging&lt;br /&gt;Ans ) 1&lt;br /&gt;&lt;br /&gt;6) Information about a process is maintained in a _________.&lt;br /&gt;1 Stack&lt;br /&gt;2 Translation Lookaside Buffer&lt;br /&gt;3 Process Control Block&lt;br /&gt;4 Program Control Block&lt;br /&gt;Ans ) 3&lt;br /&gt;&lt;br /&gt;7) Distributed OS works on the ________ principle.&lt;br /&gt;1 File Foundation&lt;br /&gt;2 Single system image&lt;br /&gt;3 Multi system image&lt;br /&gt;4 Networking image&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;8) The problem of fragmentation arises in ________.&lt;br /&gt;1 Static storage allocation&lt;br /&gt;2 Stack allocation storage&lt;br /&gt;3 Stack allocation with dynamic binding&lt;br /&gt;4 Heap allocation&lt;br /&gt;Ans ) 4&lt;br /&gt;&lt;br /&gt;9) Which file system does DOS typically use ?&lt;br /&gt;1 FAT16&lt;br /&gt;2 FAT32&lt;br /&gt;3 NTFS&lt;br /&gt;4 WNFS&lt;br /&gt;Ans ) 1&lt;br /&gt;&lt;br /&gt;10) The program is known as _________ which interacts with the inner part of called kernel.&lt;br /&gt;1 Compiler&lt;br /&gt;2 Device Driver&lt;br /&gt;3 Protocol&lt;br /&gt;4 Shell&lt;br /&gt;Ans ) 4&lt;br /&gt;&lt;br /&gt;11) The time taken by the disk arm to locate the specific address of a sector for getting information is called __________.&lt;br /&gt;1 Rotational Latency&lt;br /&gt;2 Seek Time&lt;br /&gt;3 Search Time&lt;br /&gt;4 Response Time&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;12) Which file system does Windows 95 typically use ?&lt;br /&gt;1 FAT16&lt;br /&gt;2 FAT32&lt;br /&gt;3 NTFS&lt;br /&gt;4 LMFS&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;13) Identify the odd thing in the services of operating system.&lt;br /&gt;1 Accounting&lt;br /&gt;2 Protection&lt;br /&gt;3 Error detection and correction&lt;br /&gt;4 Dead lock handling&lt;br /&gt;Ans ) 3&lt;br /&gt;&lt;br /&gt;14) Cryptography technique is used in ________.&lt;br /&gt;1 Polling&lt;br /&gt;2 Job Scheduling&lt;br /&gt;3 Protection&lt;br /&gt;4 File Management&lt;br /&gt;Ans ) 3&lt;br /&gt;&lt;br /&gt;15) Which of the following is not advantage of multiprogramming?&lt;br /&gt;1 Increased throughput&lt;br /&gt;2 Shorter response time&lt;br /&gt;3 Decreased operating system overhead&lt;br /&gt;4 Ability to assign priorities to jobs&lt;br /&gt;Ans ) 3&lt;br /&gt;&lt;br /&gt;16) In ______ OS, the response time is very critical.&lt;br /&gt;1 Multitasking&lt;br /&gt;2 Batch&lt;br /&gt;3 Online&lt;br /&gt;4 Real-time&lt;br /&gt;Ans ) 4&lt;br /&gt;&lt;br /&gt;17) An optimal scheduling algorithm in terms of minimizing the average waiting time of a given set of processes is ________.&lt;br /&gt;1 FCFS scheduling algorithm&lt;br /&gt;2 Round robin scheduling algorithm&lt;br /&gt;3 Shorest job - first scheduling algorithm&lt;br /&gt;4 None of the above&lt;br /&gt;Ans ) 3&lt;br /&gt;&lt;br /&gt;18) Real time systems are ________.&lt;br /&gt;1 Primarily used on mainframe computers&lt;br /&gt;2 Used for monitoring events as they occur&lt;br /&gt;3 Used for program development&lt;br /&gt;4 Used for real time interactive users&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;19) Which technique was introduced because a single job could not keep both the CPU and the I/O devices busy?&lt;br /&gt;1 Time-sharing&lt;br /&gt;2 SPOOLing&lt;br /&gt;3 Preemptive scheduling&lt;br /&gt;4 Multiprogramming&lt;br /&gt;Ans ) 4&lt;br /&gt;&lt;br /&gt;20) Inter process communication can be done through __________.&lt;br /&gt;1 Mails&lt;br /&gt;2 Messages&lt;br /&gt;3 System calls&lt;br /&gt;4 Traps&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;21) In Priority Scheduling a priority number (integer) is associated with each process. The CPU is allocated to the process with the highest priority (smallest integer = highest priority). The problem of, Starvation ? low priority processes may never execute, is resolved by __________.&lt;br /&gt;1 Terminating the process.&lt;br /&gt;2 Aging&lt;br /&gt;3 Mutual Exclusion&lt;br /&gt;4 Semaphore&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;22) CPU performance is measured through ________.&lt;br /&gt;1 Throughput&lt;br /&gt;2 MHz&lt;br /&gt;3 Flaps&lt;br /&gt;4 None of the above&lt;br /&gt;Ans ) 1&lt;br /&gt;&lt;br /&gt;23) PCB =&lt;br /&gt;1 Program Control Block&lt;br /&gt;2 Process Control Block&lt;br /&gt;3 Process Communication Block&lt;br /&gt;4 None of the above&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;24) Software is a program that directs the overall operation of the computer, facilitates its use and interacts with the user. What are the different types of this software ?&lt;br /&gt;1 Operating system&lt;br /&gt;2 Language Compiler&lt;br /&gt;3 Utilities&lt;br /&gt;4 All of the above&lt;br /&gt;Ans ) 4&lt;br /&gt;&lt;br /&gt;25) A __________ is a software that manages the time of a microprocessor to ensure that all time critical events are processed as efficiently as possible. This software allows the system activities to be divided into multiple independent elements called tasks.&lt;br /&gt;1 Kernel&lt;br /&gt;2 Shell&lt;br /&gt;3 Processor&lt;br /&gt;4 Device Driver&lt;br /&gt;Ans ) 1&lt;br /&gt;&lt;br /&gt;26) The primary job of the operating system of a computer is to ________.&lt;br /&gt;1 Command Resources&lt;br /&gt;2 Manage Resources&lt;br /&gt;3 Provide Utilities&lt;br /&gt;4 Be user friendly&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;27) With the round robin CPU scheduling in a time-shared system ________.&lt;br /&gt;1 Using very large time slice degenerates in to first come first served algorithm&lt;br /&gt;2 Using extremely small time slices improve performance&lt;br /&gt;3 Using extremely small time slices degenerate in to last in first out algorithm&lt;br /&gt;4 Using medium sized time slices leads to shortest request time first algorithm&lt;br /&gt;Ans ) 1&lt;br /&gt;&lt;br /&gt;28) Which of the following is a criterion to evaluate a scheduling algorithm?&lt;br /&gt;1 CPU Utilization: Keep CPU utilization as high as possible.&lt;br /&gt;2 Throughput: number of processes completed per unit time.&lt;br /&gt;3 Waiting Time: Amount of time spent ready to run but not running.&lt;br /&gt;4 All of the above&lt;br /&gt;Ans ) 4&lt;br /&gt;&lt;br /&gt;29) Which of the following is contained in Process Control Block (PCB)?&lt;br /&gt;1 Process Number&lt;br /&gt;2 List of Open files&lt;br /&gt;3 Memory Limits&lt;br /&gt;4 All of the Above&lt;br /&gt;Ans ) 4&lt;br /&gt;&lt;br /&gt;30) Super computers typically employ _______.&lt;br /&gt;1 Real time Operating system&lt;br /&gt;2 Multiprocessors OS&lt;br /&gt;3 desktop OS&lt;br /&gt;4 None of the above&lt;br /&gt;Ans ) 2&lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(51, 51, 51); line-height: 18px; font-family:&#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif;font-size:13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(51, 51, 51); line-height: 18px; font-family:&#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif;font-size:13px;&quot;&gt;&lt;a href=&quot;http://www.exactsolution.co.cc/2011/12/multiple-choice-questions-on-operating_5199.html&quot;&gt;---&amp;gt; NEXT PART ---&amp;gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/8475928542980129360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2011/12/multiple-choice-questions-on-operating_6374.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/8475928542980129360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/8475928542980129360'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2011/12/multiple-choice-questions-on-operating_6374.html' title='Multiple Choice Questions On Operating System Part-3'/><author><name>Mayur</name><uri>http://www.blogger.com/profile/03319587789865450609</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-1368313834610823545</id><published>2011-12-09T21:31:00.000-08:00</published><updated>2011-12-10T03:54:55.354-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Multiple Choice Questions On Operating System"/><category scheme="http://www.blogger.com/atom/ns#" term="os"/><title type='text'>Multiple Choice Questions On Operating System Part-2</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(51, 51, 51); line-height: 18px; font-family:&#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif;font-size:13px;&quot;&gt;1) Consider the two statements.&lt;br /&gt;(A) A network operating system, the users access remote resources in the same manner as local resource.&lt;br /&gt;(B) In a distributed operating system, the user can access remote resources either by logging into the appropriate remote machine or transferring data from the remote machine to their own machine. Which of the statement is true?&lt;br /&gt;1 A true, B false&lt;br /&gt;2 B true, A false&lt;br /&gt;3 Both A and B false&lt;br /&gt;4 Both A and B true&lt;br /&gt;Ans ) 3&lt;br /&gt;&lt;br /&gt;2) Using Priority Scheduling algorithm, find the average waiting time for the following set of processes given with their priorities in the order: Process : Burst Time : Priority respectively .&lt;br /&gt;P1 : 10 : 3 ,&lt;br /&gt;P2 : 1 : 1 ,&lt;br /&gt;P3 : 2 : 4 ,&lt;br /&gt;P4 : 1 : 5 ,&lt;br /&gt;P5 : 5 : 2.&lt;br /&gt;1 8 milliseconds&lt;br /&gt;2 8.2 milliseconds&lt;br /&gt;3 7.75 milliseconds&lt;br /&gt;4 3 milliseconds&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;3) Which of the following will determine your choice of systems software for your computer ?&lt;br /&gt;1 Is the applications software you want to use compatible with it ?&lt;br /&gt;2 Is it expensive ?&lt;br /&gt;3 Is it compatible with your hardware ?&lt;br /&gt;4 Both 1 and 3&lt;br /&gt;Right Ans ) 4&lt;br /&gt;Associate Ans) 4&lt;br /&gt;&lt;br /&gt;4) What is a shell ?&lt;br /&gt;1 It is a hardware component&lt;br /&gt;2 It is a command interpreter&lt;br /&gt;3 It is a part in compiler&lt;br /&gt;4 It is a tool in CPU scheduling&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;5) The operating system manages ________.&lt;br /&gt;1 Memory&lt;br /&gt;2 Processor&lt;br /&gt;3 Disk and I/O devices&lt;br /&gt;4 All of the above&lt;br /&gt;Ans ) 4&lt;br /&gt;&lt;br /&gt;6) The Hardware mechanism that enables a device to notify the CPU is called __________.&lt;br /&gt;1 Polling&lt;br /&gt;2 Interrupt&lt;br /&gt;3 System Call&lt;br /&gt;4 None of the above&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;7) ___________ begins at the root and follows a path down to the specified file&lt;br /&gt;1 Relative path name&lt;br /&gt;2 Absolute path name&lt;br /&gt;3 Standalone name&lt;br /&gt;4 All of the above&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;8) Process State is a part of&lt;br /&gt;1 Process Control block&lt;br /&gt;2 Inode&lt;br /&gt;3 File Allocation Table&lt;br /&gt;4 None of the above&lt;br /&gt;Ans ) 1&lt;br /&gt;&lt;br /&gt;9) Virtual Memory is commonly implemented by __________.&lt;br /&gt;1 Segmentation&lt;br /&gt;2 Swapping&lt;br /&gt;3 Demand Paging&lt;br /&gt;4 None of the above&lt;br /&gt;Ans ) 3&lt;br /&gt;&lt;br /&gt;10) Virtual memory is __________.&lt;br /&gt;1 An extremely large main memory&lt;br /&gt;2 An extremely large secondary memory&lt;br /&gt;3 An illusion of extremely large main memory&lt;br /&gt;4 A type of memory used in super computers.&lt;br /&gt;Ans ) 3&lt;br /&gt;&lt;br /&gt;11) The kernel keeps track of the state of each task by using a data structure called __&lt;br /&gt;1 Process control block&lt;br /&gt;2 User control block&lt;br /&gt;3 Memory control block&lt;br /&gt;4 None of the above&lt;br /&gt;Ans ) 1&lt;br /&gt;&lt;br /&gt;12) A binary semaphore&lt;br /&gt;1 has the values one or zero&lt;br /&gt;2 is essential to binary computers&lt;br /&gt;3 is used only for synchronisation&lt;br /&gt;4 is used only for mutual exclusion&lt;br /&gt;Ans ) 1&lt;br /&gt;&lt;br /&gt;13) _________ page replacement alogorithm suffers from Belady&#39;s anamoly.&lt;br /&gt;1 LRU&lt;br /&gt;2 MRU&lt;br /&gt;3 FIFO&lt;br /&gt;4 LIFO&lt;br /&gt;Ans ) 3&lt;br /&gt;&lt;br /&gt;14) A program at the time of executing is called ________.&lt;br /&gt;1 Dynamic program&lt;br /&gt;2 Static program&lt;br /&gt;3 Binded Program p&lt;br /&gt;4 A Process&lt;br /&gt;Ans ) 4&lt;br /&gt;&lt;br /&gt;15) _________ is a high speed cache used to hold recently referenced page table entries a part of paged virtual memory&lt;br /&gt;1 Translation Lookaside buffer&lt;br /&gt;2 Inverse page table&lt;br /&gt;3 Segmented page table&lt;br /&gt;4 All the above&lt;br /&gt;Ans ) 1&lt;br /&gt;&lt;br /&gt;16) If you don¿t know which version of MS-DOS you are working with, which command will you use after booting your operating system ?&lt;br /&gt;1 Format command&lt;br /&gt;2 FAT command&lt;br /&gt;3 VER command&lt;br /&gt;4 DISK command&lt;br /&gt;Ans ) 3&lt;br /&gt;&lt;br /&gt;17) _______ OS pays more attention on the meeting of the time limits.&lt;br /&gt;1 Distributed&lt;br /&gt;2 Network&lt;br /&gt;3 Real time&lt;br /&gt;4 Online&lt;br /&gt;Ans ) 3&lt;br /&gt;&lt;br /&gt;18) A process said to be in ___________ state if it was waiting for an event that will never occur.&lt;br /&gt;1 Safe&lt;br /&gt;2 Unsafe&lt;br /&gt;3 Starvation&lt;br /&gt;4 Dead lock&lt;br /&gt;Ans ) 4&lt;br /&gt;&lt;br /&gt;19) The removal of process from active contention of CPU and reintroduce them into memory later is known as ____________.&lt;br /&gt;1 Interrupt&lt;br /&gt;2 Swapping&lt;br /&gt;3 Signal&lt;br /&gt;4 Thread&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;20) The problem of thrashing is effected scientifically by ________.&lt;br /&gt;1 Program structure&lt;br /&gt;2 Program size&lt;br /&gt;3 Primary storage size&lt;br /&gt;4 None of the above&lt;br /&gt;Ans ) 1&lt;br /&gt;&lt;br /&gt;21) Paging _________.&lt;br /&gt;1 solves the memory fragmentation problem&lt;br /&gt;2 allows modular programming&lt;br /&gt;3 allows structured programming&lt;br /&gt;4 avoids deadlock&lt;br /&gt;Ans ) 1&lt;br /&gt;&lt;br /&gt;22) Real time systems are ________.&lt;br /&gt;1 Primarily used on mainframe computers&lt;br /&gt;2 Used for monitoring events as they occur&lt;br /&gt;3 Used for program development&lt;br /&gt;4 Used for real time interactive users&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;23) A thread is a __________ process .&lt;br /&gt;1 Heavy Weight&lt;br /&gt;2 Mutliprocess&lt;br /&gt;3 Inter Thread&lt;br /&gt;4 Light wieght&lt;br /&gt;Ans ) 4&lt;br /&gt;&lt;br /&gt;24) _________ allocates the largest hole (free fragmant) available in the memory.&lt;br /&gt;1 Best Fit&lt;br /&gt;2 Worst Fit&lt;br /&gt;3 First Fit&lt;br /&gt;4 None of the above&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;25) Number of CPU registers in a system depends on ____________.&lt;br /&gt;1 Operating system&lt;br /&gt;2 Computer Architecture&lt;br /&gt;3 Computer Organization&lt;br /&gt;4 None of the above&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;26) A major problem with priority scheduling is _________.&lt;br /&gt;1 Definite blocking&lt;br /&gt;2 Starvation&lt;br /&gt;3 Low priority&lt;br /&gt;4 None of the above&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;27) A ___________ contains information about the file, including ownership, permissions, and location of the file contents.&lt;br /&gt;1 File Control Block (FCB)&lt;br /&gt;2 File&lt;br /&gt;3 Device drivers&lt;br /&gt;4 File system&lt;br /&gt;Ans ) 1&lt;br /&gt;&lt;br /&gt;28) Which directory implementation is used in most Operating System?&lt;br /&gt;1 Single level directory structure&lt;br /&gt;2 Two level directory structure&lt;br /&gt;3 Tree directory structure&lt;br /&gt;4 Acyclic directory structure&lt;br /&gt;Ans ) 3&lt;br /&gt;&lt;br /&gt;29) The term &quot; Operating System &quot; means ________.&lt;br /&gt;1 A set of programs which controls computer working&lt;br /&gt;2 The way a computer operator works&lt;br /&gt;3 Conversion of high-level language in to machine level language&lt;br /&gt;4 The way a floppy disk drive operates&lt;br /&gt;Ans ) 1&lt;br /&gt;&lt;br /&gt;30) The operating system of a computer serves as a software interface between the user and the ________.&lt;br /&gt;1 Hardware&lt;br /&gt;2 Peripheral&lt;br /&gt;3 Memory&lt;br /&gt;4 Screen&lt;br /&gt;Ans ) 1&lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(51, 51, 51); line-height: 18px; font-family:&#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif;font-size:13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot; color: rgb(51, 51, 51); line-height: 18px; font-family:&#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:x-large;&quot;&gt;&lt;a href=&quot;http://www.exactsolution.co.cc/2011/12/multiple-choice-questions-on-operating_6374.html&quot;&gt;--&amp;gt; NEXT PART --&amp;gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/1368313834610823545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2011/12/multiple-choice-questions-on-operating_09.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/1368313834610823545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/1368313834610823545'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2011/12/multiple-choice-questions-on-operating_09.html' title='Multiple Choice Questions On Operating System Part-2'/><author><name>Mayur</name><uri>http://www.blogger.com/profile/03319587789865450609</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-2356504644807067700</id><published>2011-12-09T21:26:00.001-08:00</published><updated>2011-12-10T03:53:33.870-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Multiple Choice Questions On Operating System"/><category scheme="http://www.blogger.com/atom/ns#" term="multiple choide questions"/><category scheme="http://www.blogger.com/atom/ns#" term="operation system"/><category scheme="http://www.blogger.com/atom/ns#" term="os"/><title type='text'>Multiple Choice Questions On Operating System Part-1</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(51, 51, 51); line-height: 18px; font-family:&#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif;font-size:13px;&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot; line-height: 18px; font-family:&#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#CC0000;&quot;&gt;30 Objective questions based on OS:-&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(51, 51, 51); line-height: 18px; font-family:&#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif;font-size:13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;1) Routine is not loaded until it is called. All routines are kept on disk in a relocatable load format. The main program is loaded into memory &amp;amp; is executed. This type of loading is called _________&lt;br /&gt;1 Static loading&lt;br /&gt;2 Dynamic loading&lt;br /&gt;3 Dynamic linking&lt;br /&gt;4 Overlays&lt;br /&gt;Ans ) 3&lt;br /&gt;&lt;br /&gt;2) Which of the following is crucial time while accessing data on the disk?&lt;br /&gt;1 Seek time&lt;br /&gt;2 Rotational time&lt;br /&gt;3 Transmission time&lt;br /&gt;4 Waiting time&lt;br /&gt;Ans ) 1&lt;br /&gt;&lt;br /&gt;3) The host repeatedly checks if the controller is busy until it is not. It is in a loop that status register&#39;s busy bit becomes clear. This is called _____________ and a mechanism for the hardware controller to notify the CPU that it is ready is called ___________.&lt;br /&gt;1 Interrupt and Polling&lt;br /&gt;2 Polling and Spooling&lt;br /&gt;3 Polling and Interrupt&lt;br /&gt;4 Deadlock and Starvation&lt;br /&gt;Ans ) 3&lt;br /&gt;&lt;br /&gt;4) Unix Operating System is an __________.&lt;br /&gt;1 Time Sharing Operating System&lt;br /&gt;2 Multi-User Operating System&lt;br /&gt;3 Multi-tasking Operating System&lt;br /&gt;4 All the Above&lt;br /&gt;Ans ) 4&lt;br /&gt;&lt;br /&gt;5) Which of the following memory allocation scheme suffers from External fragmentation?&lt;br /&gt;1 Segmentation&lt;br /&gt;2 Pure demand paging&lt;br /&gt;3 Swapping&lt;br /&gt;4 Paging&lt;br /&gt;Ans ) 1&lt;br /&gt;&lt;br /&gt;6) Information about a process is maintained in a _________.&lt;br /&gt;1 Stack&lt;br /&gt;2 Translation Lookaside Buffer&lt;br /&gt;3 Process Control Block&lt;br /&gt;4 Program Control Block&lt;br /&gt;Ans ) 3&lt;br /&gt;&lt;br /&gt;7) Distributed OS works on the ________ principle.&lt;br /&gt;1 File Foundation&lt;br /&gt;2 Single system image&lt;br /&gt;3 Multi system image&lt;br /&gt;4 Networking image&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;8) The problem of fragmentation arises in ________.&lt;br /&gt;1 Static storage allocation&lt;br /&gt;2 Stack allocation storage&lt;br /&gt;3 Stack allocation with dynamic binding&lt;br /&gt;4 Heap allocation&lt;br /&gt;Ans ) 4&lt;br /&gt;&lt;br /&gt;9) Which file system does DOS typically use ?&lt;br /&gt;1 FAT16&lt;br /&gt;2 FAT32&lt;br /&gt;3 NTFS&lt;br /&gt;4 WNFS&lt;br /&gt;Ans ) 1&lt;br /&gt;&lt;br /&gt;10) The program is known as _________ which interacts with the inner part of called kernel.&lt;br /&gt;1 Compiler&lt;br /&gt;2 Device Driver&lt;br /&gt;3 Protocol&lt;br /&gt;4 Shell&lt;br /&gt;Ans ) 4&lt;br /&gt;&lt;br /&gt;11) The time taken by the disk arm to locate the specific address of a sector for getting information is called __________.&lt;br /&gt;1 Rotational Latency&lt;br /&gt;2 Seek Time&lt;br /&gt;3 Search Time&lt;br /&gt;4 Response Time&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;12) Which file system does Windows 95 typically use ?&lt;br /&gt;1 FAT16&lt;br /&gt;2 FAT32&lt;br /&gt;3 NTFS&lt;br /&gt;4 LMFS&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;13) Identify the odd thing in the services of operating system.&lt;br /&gt;1 Accounting&lt;br /&gt;2 Protection&lt;br /&gt;3 Error detection and correction&lt;br /&gt;4 Dead lock handling&lt;br /&gt;Ans ) 3&lt;br /&gt;&lt;br /&gt;14) Cryptography technique is used in ________.&lt;br /&gt;1 Polling&lt;br /&gt;2 Job Scheduling&lt;br /&gt;3 Protection&lt;br /&gt;4 File Management&lt;br /&gt;Ans ) 3&lt;br /&gt;&lt;br /&gt;15) Which of the following is not advantage of multiprogramming?&lt;br /&gt;1 Increased throughput&lt;br /&gt;2 Shorter response time&lt;br /&gt;3 Decreased operating system overhead&lt;br /&gt;4 Ability to assign priorities to jobs&lt;br /&gt;Ans ) 3&lt;br /&gt;&lt;br /&gt;16) In ______ OS, the response time is very critical.&lt;br /&gt;1 Multitasking&lt;br /&gt;2 Batch&lt;br /&gt;3 Online&lt;br /&gt;4 Real-time&lt;br /&gt;Ans ) 4&lt;br /&gt;&lt;br /&gt;17) An optimal scheduling algorithm in terms of minimizing the average waiting time of a given set of processes is ________.&lt;br /&gt;1 FCFS scheduling algorithm&lt;br /&gt;2 Round robin scheduling algorithm&lt;br /&gt;3 Shorest job - first scheduling algorithm&lt;br /&gt;4 None of the above&lt;br /&gt;Ans ) 3&lt;br /&gt;&lt;br /&gt;18) Real time systems are ________.&lt;br /&gt;1 Primarily used on mainframe computers&lt;br /&gt;2 Used for monitoring events as they occur&lt;br /&gt;3 Used for program development&lt;br /&gt;4 Used for real time interactive users&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;19) Which technique was introduced because a single job could not keep both the CPU and the I/O devices busy?&lt;br /&gt;1 Time-sharing&lt;br /&gt;2 SPOOLing&lt;br /&gt;3 Preemptive scheduling&lt;br /&gt;4 Multiprogramming&lt;br /&gt;Ans ) 4&lt;br /&gt;&lt;br /&gt;20) Inter process communication can be done through __________.&lt;br /&gt;1 Mails&lt;br /&gt;2 Messages&lt;br /&gt;3 System calls&lt;br /&gt;4 Traps&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;21) In Priority Scheduling a priority number (integer) is associated with each process. The CPU is allocated to the process with the highest priority (smallest integer = highest priority). The problem of, Starvation ? low priority processes may never execute, is resolved by __________.&lt;br /&gt;1 Terminating the process.&lt;br /&gt;2 Aging&lt;br /&gt;3 Mutual Exclusion&lt;br /&gt;4 Semaphore&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;22) CPU performance is measured through ________.&lt;br /&gt;1 Throughput&lt;br /&gt;2 MHz&lt;br /&gt;3 Flaps&lt;br /&gt;4 None of the above&lt;br /&gt;Ans ) 1&lt;br /&gt;&lt;br /&gt;23) PCB =&lt;br /&gt;1 Program Control Block&lt;br /&gt;2 Process Control Block&lt;br /&gt;3 Process Communication Block&lt;br /&gt;4 None of the above&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;24) Software is a program that directs the overall operation of the computer, facilitates its use and interacts with the user. What are the different types of this software ?&lt;br /&gt;1 Operating system&lt;br /&gt;2 Language Compiler&lt;br /&gt;3 Utilities&lt;br /&gt;4 All of the above&lt;br /&gt;Ans ) 4&lt;br /&gt;&lt;br /&gt;25) A __________ is a software that manages the time of a microprocessor to ensure that all time critical events are processed as efficiently as possible. This software allows the system activities to be divided into multiple independent elements called tasks.&lt;br /&gt;1 Kernel&lt;br /&gt;2 Shell&lt;br /&gt;3 Processor&lt;br /&gt;4 Device Driver&lt;br /&gt;Ans ) 1&lt;br /&gt;&lt;br /&gt;26) The primary job of the operating system of a computer is to ________.&lt;br /&gt;1 Command Resources&lt;br /&gt;2 Manage Resources&lt;br /&gt;3 Provide Utilities&lt;br /&gt;4 Be user friendly&lt;br /&gt;Ans ) 2&lt;br /&gt;&lt;br /&gt;27) With the round robin CPU scheduling in a time-shared system ________.&lt;br /&gt;1 Using very large time slice degenerates in to first come first served algorithm&lt;br /&gt;2 Using extremely small time slices improve performance&lt;br /&gt;3 Using extremely small time slices degenerate in to last in first out algorithm&lt;br /&gt;4 Using medium sized time slices leads to shortest request time first algorithm&lt;br /&gt;Ans ) 1&lt;br /&gt;&lt;br /&gt;28) Which of the following is a criterion to evaluate a scheduling algorithm?&lt;br /&gt;1 CPU Utilization: Keep CPU utilization as high as possible.&lt;br /&gt;2 Throughput: number of processes completed per unit time.&lt;br /&gt;3 Waiting Time: Amount of time spent ready to run but not running.&lt;br /&gt;4 All of the above&lt;br /&gt;Ans ) 4&lt;br /&gt;&lt;br /&gt;29) Which of the following is contained in Process Control Block (PCB)?&lt;br /&gt;1 Process Number&lt;br /&gt;2 List of Open files&lt;br /&gt;3 Memory Limits&lt;br /&gt;4 All of the Above&lt;br /&gt;Ans ) 4&lt;br /&gt;&lt;br /&gt;30) Super computers typically employ _______.&lt;br /&gt;1 Real time Operating system&lt;br /&gt;2 Multiprocessors OS&lt;br /&gt;3 desktop OS&lt;br /&gt;4 None of the above&lt;br /&gt;Ans ) 2&lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(51, 51, 51); line-height: 18px; font-family:&#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif;font-size:13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;font-family:&#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif;color:#333333;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;line-height: 18px; font-size:-webkit-xxx-large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;font-family:&#39;Trebuchet MS&#39;, Verdana, Arial, sans-serif;color:#333333;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;line-height: 18px; font-size:-webkit-xxx-large;&quot;&gt;&lt;a href=&quot;http://www.exactsolution.co.cc/2011/12/multiple-choice-questions-on-operating_09.html&quot;&gt;--&amp;gt; NEXT Part --&amp;gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/2356504644807067700/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2011/12/multiple-choice-questions-on-operating.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/2356504644807067700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/2356504644807067700'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2011/12/multiple-choice-questions-on-operating.html' title='Multiple Choice Questions On Operating System Part-1'/><author><name>Mayur</name><uri>http://www.blogger.com/profile/03319587789865450609</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-6941238775083454924</id><published>2011-11-25T05:56:00.001-08:00</published><updated>2011-11-25T05:56:43.213-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Role of India&#39;s youth"/><title type='text'>Role of India&#39;s youth</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Trebuchet MS&#39;, Tahoma, Arial; font-size: 12px; line-height: 18px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;• Introduction&lt;br /&gt;
• Power of youth&lt;br /&gt;
• Role of youth&lt;br /&gt;
• Problem&lt;br /&gt;
• Conclusion&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: #009900;&quot;&gt;Introduction&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
In words of James” Youth is the joy, the little bird that has broken out of the eggs and is eagerly waiting to spread out its wings in the open sky of freedom and hope.”&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: #009900;&quot;&gt;Power of Youth&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Trebuchet MS&#39;, Tahoma, Arial; font-size: 12px; line-height: 18px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: georgia; font-size: 16px;&quot;&gt;Youth is the spring of Life. It is the age of discovery and dreams. India is of largest youth population in the world today. The entire world is eyeing India as a source of technical manpower. They are looking at our youth as a source of talents at low costs for their future super profits. If Indian youth make up their mind and work in close unity with working class people, they can hold the political power in their hands. Indian youth has the power to make our country from developing nation to a developed nation. Is it a dream? No, their dreams take them to stars and galaxies to the far corners of the unknown and some of them like our own Kalpana Chawla pursue their dream, till they realize it and die for it in process.&lt;br /&gt;
hopes of youth&lt;br /&gt;
The youth hopes for a world free of poverty, unemployment, inequality and exploitation of man by man. A world free of discrimination on the grounds of race, colour, language and gender. A world full of creative challenges and opportunities to conquer them. But let us convert these hopes in reality.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: #009900;&quot;&gt;Role of Youth:&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Trebuchet MS&#39;, Tahoma, Arial; font-size: 12px; line-height: 18px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;The role of youth is of most importance in today’s time. It has underplayed itself in field of politics. It should become aspiring entrepreneur rather than mere workers. It can play a vital role in elimination of terrorism. Young participation is important because youth are the country’s power. Youth recognize problems and can solve them. Youth are strong forces in social movements. They educate children about their rights. They help other young people attain a higher level of Intellectual ability and to become qualified adults.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: #009900;&quot;&gt;Problems&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;strong style=&quot;background-color: white; color: #333333; font-family: &#39;Trebuchet MS&#39;, Tahoma, Arial; font-size: 12px; line-height: 18px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;/span&gt;&lt;/strong&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Trebuchet MS&#39;, Tahoma, Arial; font-size: 12px; line-height: 18px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;Unfortunately no one is bothered to dream any s vision. Martin Luther has said, &quot;I have a Dream&quot; and the dream come largely true. If he had not thought of that dream he would have accomplished nothing in his life. Another problem is its indifferent attitude towards things, situation and politics .The new cool formula of “let the things be “is proving fatal to India’s development .Lack of unity and spirit is the major set back . Its time The youth, the students have to realize their power , their role, their duties and their responsibility and stand up for their rights. Now its time that instead of brain drain we should act like magnets and attract world to India.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: #009900;&quot;&gt;Conclusion&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Trebuchet MS&#39;, Tahoma, Arial; font-size: 12px; line-height: 18px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: georgia; font-size: 16px;&quot;&gt;India can become a developed nation only if everyone contributes to the best of his or her capacity and ability. Youth is wholly experimental and with the full utilization of the talents of the Youth, India will become a complete Nation. Let us hope for the same.&lt;/span&gt;&lt;strong&gt;&lt;span style=&quot;font-family: georgia; font-size: 16px;&quot;&gt;‘Youth is like a fire&lt;br /&gt;
It crept forward.&lt;br /&gt;
A Spark at first&lt;br /&gt;
Growing into a flame&lt;br /&gt;
The brightening into a Blaze’.&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/6941238775083454924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2011/11/role-of-indias-youth.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/6941238775083454924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/6941238775083454924'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2011/11/role-of-indias-youth.html' title='Role of India&#39;s youth'/><author><name>Mayur Upadhyay</name><uri>http://www.blogger.com/profile/03327601152886094464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-4488451555981418055</id><published>2011-11-04T22:00:00.000-07:00</published><updated>2011-11-04T22:00:14.054-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Alphabetical Paging in Gridview"/><title type='text'>Alphabetical Paging in Gridview</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;post&quot; style=&quot;background-color: #f7ffd5; color: #555555; font-family: Georgia, Arial, georgia, sans-serif; font-size: 13px; font: normal normal normal 13px/normal Georgia, Arial, georgia, sans-serif; height: 65px; margin-bottom: 0px; margin-left: 5px; margin-right: 10px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;title&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: url(http://i43.tinypic.com/2ke9mf.jpg); background-origin: initial; height: 65px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 5px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;h2 style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; font-weight: normal; font: normal normal normal 24px/normal Georgia, verdana, Arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 5px; padding-right: 0px; padding-top: 5px;&quot;&gt;&lt;a href=&quot;http://funnydotnet.blogspot.com/2008/11/alphabetical-paging-in-gridview.html&quot; style=&quot;background-color: transparent; color: #cecece; text-decoration: none;&quot;&gt;Alphabetical Paging in Gridview&lt;/a&gt;&lt;/h2&gt;&lt;div class=&quot;date&quot; style=&quot;color: white; float: left; font-family: Georgia, Verdana, Helvitica, sans-serif; height: 14px; margin-left: 5px; margin-top: 5px; padding-left: 2px;&quot;&gt;Mayur&lt;span class=&quot;clock&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://i40.tinypic.com/106ivf5.jpg); background-origin: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; padding-bottom: 0px; padding-left: 20px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;cover&quot; style=&quot;background-color: #f7ffd5; color: #555555; font-family: Georgia, Arial, georgia, sans-serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div class=&quot;entry&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 15px; padding-right: 15px; padding-top: 5px;&quot;&gt;&lt;span id=&quot;ctl00_cphCell1_datalistArticles_ctl01_lblArticleDescription&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 11px;&quot;&gt;GridView paging feature allow us to display fixed number of records on the page and browse to the next page of records. Although paging is a great feature but sometimes we need to view all the items alphabetically. The idea behind this article is to provide a user with a list of all the alphabets and when the user clicks on a certain alphabet then all the records starting with that alphabet will be populated in the GridView control.&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;using&amp;nbsp;System;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;using&amp;nbsp;System.Data;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;using&amp;nbsp;System.Data.SqlClient;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;using&amp;nbsp;System.Configuration;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;using&amp;nbsp;System.Web;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;using&amp;nbsp;System.Web.Security;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;using&amp;nbsp;System.Web.UI;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;using&amp;nbsp;System.Web.UI.WebControls;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;using&amp;nbsp;System.Web.UI.WebControls.WebParts;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;using&amp;nbsp;System.Web.UI.HtmlControls;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;public&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;partial&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;_Default&lt;/span&gt;&amp;nbsp;: System.Web.UI.&lt;span style=&quot;color: teal;&quot;&gt;Page&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;&amp;nbsp;constr;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;protected&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt;&amp;nbsp;Page_Load(&lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt;&amp;nbsp;sender,&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;EventArgs&lt;/span&gt;&amp;nbsp;e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(IsPostBack ==&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;false&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;constr =&amp;nbsp;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;SELECT * from emp&quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;binddata(constr);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt;&amp;nbsp;binddata(&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;&amp;nbsp;s)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;&amp;nbsp;connectionString =&amp;nbsp;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;server=TECH-DA98E1DFBA\\SQLEXPRESS;user id=raji;password=chekuri;database=raji&quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: teal;&quot;&gt;SqlConnection&lt;/span&gt;&amp;nbsp;con =&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;SqlConnection&lt;/span&gt;(connectionString);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: teal;&quot;&gt;SqlDataAdapter&lt;/span&gt;&amp;nbsp;da =&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;SqlDataAdapter&lt;/span&gt;(constr , con);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: teal;&quot;&gt;DataSet&lt;/span&gt;&amp;nbsp;ds =&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;DataSet&lt;/span&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;da.Fill(ds);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;GridView1.DataSource = ds;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;GridView1.DataBind();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;//The RowCreated event is used to create the list.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;// In the event first I check for the footer row.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;//&amp;nbsp;Once, the footer row is found I run a loop from 65 to 92 and convert each number into the character representation.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;// The number 65 stands for “A”, 66 for “B” and so on till 92 for “Z”. Inside the loop I created LinkButton and set the Text property to the alphabet. Finally, the control is added to the cell collection.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;//Creating the Alphabetical List:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;//The next task is to create an alphabetical list and display it in the GridView control.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;//The best place to display the list is the GridView footer. Let’s check out the code which is used to create the list.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;protected&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt;&amp;nbsp;GridView1_RowCreated(&lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt;&amp;nbsp;sender,&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;GridViewRowEventArgs&lt;/span&gt;&amp;nbsp;e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(e.Row.RowType ==&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;DataControlRowType&lt;/span&gt;.Footer)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: teal;&quot;&gt;TableCell&lt;/span&gt;&amp;nbsp;cell = e.Row.Cells[0];&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;cell.ColumnSpan = 3;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;for&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt;&amp;nbsp;i = 65; i &amp;lt;= (65 + 25); i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: teal;&quot;&gt;LinkButton&lt;/span&gt;&amp;nbsp;lb =&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;LinkButton&lt;/span&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;lb.Text =&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;Char&lt;/span&gt;.ConvertFromUtf32(i) +&amp;nbsp;&lt;span style=&quot;color: maroon;&quot;&gt;&quot; &quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;lb.CommandArgument =&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;Char&lt;/span&gt;.ConvertFromUtf32(i);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;lb.CommandName =&amp;nbsp;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;AlphaPaging&quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;cell.Controls.Add(lb);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;//Fetching the Records Based on the Alphabet:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;//In the last section we created the alphabets and displayed them in the footer of the GridView control.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;//The next task is to capture the event generated by the alphabets when we click on them and fetch the results based on the alphabet. The RowCommand event is fired whenever you click on any alphabet.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;// Take a look at the RowCommand event below:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;protected&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt;&amp;nbsp;GridView1_RowCommand(&lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt;&amp;nbsp;sender,&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;GridViewCommandEventArgs&lt;/span&gt;&amp;nbsp;e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(e.CommandName.Equals(&lt;span style=&quot;color: maroon;&quot;&gt;&quot;AlphaPaging&quot;&lt;/span&gt;))&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;constr&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;select * from emp&amp;nbsp;WHERE ename LIKE &#39;&quot;&lt;/span&gt;&amp;nbsp;+ e.CommandArgument +&amp;nbsp;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;%&#39;&quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;binddata(constr);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 12pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxh8JXKBowm-OQIleBTH-B75hVHUbG6SQynGIr3XpJu0vzkzrkYOvn2n6z1Sc8sgx1n0UoAsS6Wzu86LCQd0rUVQmnzmxEm3K41GrZur6vIStexYd_iCHiuaOhwSFgNj2gbdx7jC8SvEw/s1600-h/alphapaging.JPG&quot; style=&quot;background-color: transparent; color: #e30f0f; text-decoration: none;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5267299004201092850&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxh8JXKBowm-OQIleBTH-B75hVHUbG6SQynGIr3XpJu0vzkzrkYOvn2n6z1Sc8sgx1n0UoAsS6Wzu86LCQd0rUVQmnzmxEm3K41GrZur6vIStexYd_iCHiuaOhwSFgNj2gbdx7jC8SvEw/s400/alphapaging.JPG&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; cursor: pointer; height: 375px; width: 400px;&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/4488451555981418055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2011/11/alphabetical-paging-in-gridview.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/4488451555981418055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/4488451555981418055'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2011/11/alphabetical-paging-in-gridview.html' title='Alphabetical Paging in Gridview'/><author><name>Mayur Upadhyay</name><uri>http://www.blogger.com/profile/03327601152886094464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxh8JXKBowm-OQIleBTH-B75hVHUbG6SQynGIr3XpJu0vzkzrkYOvn2n6z1Sc8sgx1n0UoAsS6Wzu86LCQd0rUVQmnzmxEm3K41GrZur6vIStexYd_iCHiuaOhwSFgNj2gbdx7jC8SvEw/s72-c/alphapaging.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-8398523676301578367</id><published>2011-09-23T22:29:00.001-07:00</published><updated>2011-09-23T22:29:17.192-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Android Interview Question and answers</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Bitstream Charter&#39;, serif; font-size: 14px; line-height: 23px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Introduction Android:&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Android is an operating system for mobile devices that includes middleware and key applications, and uses a modified version of the Linux kernel. It was initially developed by Android Inc..It allows developers to write managed code in the Java language, controlling the device via Google-developed Java libraries…..&lt;br /&gt;
The Android SDK includes a comprehensive set of development tools . These include a debugger, libraries, a handset emulator (based on QEMU), documentation, sample code, and tutorials. Currently supported development platforms include x86-architecture computers running Linux (any modern desktop Linux distribution), Mac OS X 10.4.8 or later, Windows XP or Vista.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Android does not use established Java standards, i.e. Java SE and ME. This prevents compatibility among Java applications written for those platforms and those for the Android platform. Android only reuses the Java language syntax, but does not provide the full-class libraries and APIs bundled with Java SE or ME&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is android?&lt;/strong&gt;&lt;br /&gt;
Android is a stack of software for mobile devices which has Operating System, middleware and some key applications. The application executes within its own process and its own instance of Dalvik Virtual Machine. Many Virtual Machines run efficiently by a DVM device. DVM executes Java language?s byte code which later transforms into .dex format files.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What are the advantages of Android?&lt;/strong&gt;&lt;br /&gt;
The following are the advantages of Android:&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;* The customer will be benefited from wide range of mobile applications to choose, since the monopoly of wireless carriers like AT&amp;amp;T and Orange will be broken by Google Android.&lt;br /&gt;
* Features like weather details, live RSS feeds, opening screen, icon on the opening screen can be customized&lt;br /&gt;
* Innovative products like the location-aware services, location of a nearby convenience store etc., are some of the additive facilities in Android.&lt;br /&gt;
Components can be reused and replaced by the application framework.&lt;br /&gt;
*Optimized DVM for mobile devices&lt;br /&gt;
*SQLite enables to store the data in a structured manner.&lt;br /&gt;
*Supports GSM telephone and Bluetooth, WiFi, 3G and EDGE technologies&lt;br /&gt;
*The development is a combination of a device emulator, debugging tools, memory profiling and plug-in for Eclipse IDE.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Features of Android&lt;/strong&gt;&lt;br /&gt;
 Application framework enabling reuse and replacement of components&lt;br /&gt;
 Dalvik virtual machine optimized for mobile devices&lt;br /&gt;
 Integrated browser based on the open source WebKit engine&lt;br /&gt;
 Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional)&lt;br /&gt;
 SQLite for structured data storage&lt;br /&gt;
 Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)&lt;br /&gt;
 GSM Telephony (hardware dependent)&lt;br /&gt;
 Bluetooth, EDGE, 3G, and WiFi (hardware dependent)&lt;br /&gt;
 Camera, GPS, compass, and accelerometer (hardware dependent)&lt;br /&gt;
 Rich development environment including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Explain about the exceptions of Android?&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;The following are the exceptions that are supported by Android&lt;br /&gt;
* InflateException : When an error conditions are occurred, this exception is thrown&lt;br /&gt;
* Surface.OutOfResourceException: When a surface is not created or resized, this exception is thrown&lt;br /&gt;
* SurfaceHolder.BadSurfaceTypeException: This exception is thrown from the lockCanvas() method, when invoked on a Surface whose is SURFACE_TYPE_PUSH_BUFFERS&lt;br /&gt;
* WindowManager.BadTokenException: This exception is thrown at the time of trying to add view an invalid WindowManager.LayoutParamstoken.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Describe the APK format.&lt;/strong&gt;&lt;br /&gt;
The APK file is compressed the AndroidManifest.xml file, application code (.dex files), resource files, and other files. A project is compiled into a single .apk file.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is .apk extension?&amp;nbsp;&lt;/strong&gt;&lt;br /&gt;
The extension for an Android package file, which typically contains all of the files related to a single Android application. The file itself is a compressed collection of an AndroidManifest.xml file, application code (.dex files), resource files, and other files. A project is compiled into a single .apk file.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is .dex extension&amp;nbsp;&lt;/strong&gt;&lt;br /&gt;
Android programs are compiled into .dex (Dalvik Executable) files, which are in turn zipped into a single .apk file on the device. .dex files can be created by automatically translating compiled applications written in the Java programming language&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is an adb ?&lt;/strong&gt;&lt;br /&gt;
Android Debug Bridge, a command-line debugging application shipped with the SDK. It provides tools to browse the device, copy tools on the device, and forward ports for debugging.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is an Application ?&lt;/strong&gt;&lt;br /&gt;
A collection of one or more activities, services, listeners, and intent receivers. An application has a single manifest, and is compiled into a single .apk file on the device.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is a Content Provider ?&lt;/strong&gt;&lt;br /&gt;
A class built on ContentProvider that handles content query strings of a specific format to return data in a specific format. See Reading and writing data to a content provider for information on using content providers.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is a Dalvik ?&lt;/strong&gt;&lt;br /&gt;
The name of Android’s virtual machine. The Dalvik VM is an interpreter-only virtual machine that executes files in the Dalvik Executable (.dex) format, a format that is optimized for efficient storage and memory-mappable execution. The virtual machine is register-based, and it can run classes compiled by a Java language compiler that have been transformed into its native format using the included “dx” tool. The VM runs on top of Posix-compliant operating systems, which it relies on for underlying functionality (such as threading and low level memory management). The Dalvik core class library is intended to provide a familiar development base for those used to programming with Java Standard Edition, but it is geared specifically to the needs of a small mobile device.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is an DDMS&amp;nbsp;&lt;/strong&gt;&lt;br /&gt;
Dalvik Debug Monitor Service, a GUI debugging application shipped with the SDK. It provides screen capture, log dump, and process examination capabilities.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is Drawable?&amp;nbsp;&lt;/strong&gt;&lt;br /&gt;
A compiled visual resource that can be used as a background, title, or other part of the screen. It is compiled into an android.graphics.drawable subclass.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is an Intent?&lt;/strong&gt;&lt;br /&gt;
A class (Intent) that contains several fields describing what a caller would like to do. The caller sends this intent to Android’s intent resolver, which looks through the intent filters of all applications to find the activity most suited to handle this intent. Intent fields include the desired action, a category, a data string, the MIME type of the data, a handling class, and other restrictions.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is an Intent Filter ?&lt;/strong&gt;&lt;br /&gt;
Activities and intent receivers include one or more filters in their manifest to describe what kinds of intents or messages they can handle or want to receive. An intent filter lists a set of requirements, such as data type, action requested, and URI format, that the Intent or message must fulfill. For Activities, Android searches for the Activity with the most closely matching valid match between the Intent and the activity filter. For messages, Android will forward a message to all receivers with matching intent filters.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is an Intent Receiver?&amp;nbsp;&lt;/strong&gt;&lt;br /&gt;
An application class that listens for messages broadcast by calling Context.broadcastIntent&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is a Layout resource?&lt;/strong&gt;&lt;br /&gt;
An XML file that describes the layout of an Activity screen.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is a Manifest ?&lt;/strong&gt;&lt;br /&gt;
An XML file associated with each Application that describes the various activies, intent filters, services, and other items that it exposes.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is a Resource&amp;nbsp;&lt;/strong&gt;&lt;br /&gt;
A user-supplied XML, bitmap, or other file, entered into an application build process, which can later be loaded from code. Android can accept resources of many types; see Resources for a full description. Application-defined resources should be stored in the res/ subfolders.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is a Service ?&lt;/strong&gt;&lt;br /&gt;
A class that runs in the background to perform various persistent actions, such as playing music or monitoring network activity.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is a Theme ?&lt;/strong&gt;&lt;br /&gt;
A set of properties (text size, background color, and so on) bundled together to define various default display settings. Android provides a few standard themes, listed in R.style (starting with “Theme_”).&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is an URIs?&amp;nbsp;&lt;/strong&gt;&lt;br /&gt;
Android uses URI strings both for requesting data (e.g., a list of contacts) and for requesting actions (e.g., opening a Web page in a browser). Both are valid URI strings, but have different values. All requests for data must start with the string “content://”. Action strings are valid URIs that can be handled appropriately by applications on the device; for example, a URI starting with “http://” will be handled by the browser.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Can I write code for Android using C/C++?&lt;/strong&gt;&lt;br /&gt;
Yes, but need to use NDK&lt;br /&gt;
Android applications are written using the Java programming language. Android includes a set of core libraries that provides most of the functionality available in the core libraries of the Java programming language.&lt;br /&gt;
Every Android application runs in its own process, with its own instance of the Dalvik virtual machine. Dalvik has been written so that a device can run multiple VMs efficiently. The Dalvik VM executes files in the Dalvik Executable (.dex) format which is optimized for minimal memory footprint. The VM is register-based, and runs classes compiled by a Java language compiler that have been transformed into the .dex format by the included “dx” tool.&lt;br /&gt;
Android only supports applications written using the Java programming language at this time.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is an action?&lt;/strong&gt;&lt;br /&gt;
A description of something that an Intent sender desires.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is activity?&lt;/strong&gt;&lt;br /&gt;
A single screen in an application, with supporting Java code.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is intent?&lt;/strong&gt;&lt;br /&gt;
A class (Intent) describes what a caller desires to do. The caller sends this intent to Android’s intent resolver, which finds the most suitable activity for the intent. E.g. opening a PDF file is an intent, and the Adobe Reader is the suitable activity for this intent.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;How is nine-patch image different from a regular bitmap?&lt;/strong&gt;&lt;br /&gt;
It is a resizable bitmap resource that can be used for backgrounds or other images on the device. The NinePatch class permits drawing a bitmap in nine sections. The four corners are unscaled; the four edges are scaled in one axis, and the middle is scaled in both axes.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What languages does Android support for application development?&lt;/strong&gt;&lt;br /&gt;
Android applications are written using the Java programming language.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is a resource?&lt;/strong&gt;&lt;br /&gt;
A user-supplied XML, bitmap, or other file, injected into the application build process, which can later be loaded from code.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;How will you record a phone call in Android? How to get a handle on Audio Stream for a call in Android?&lt;/strong&gt;&lt;br /&gt;
Permissions.PROCESS_OUTGOING_CALLS: Allows an application to monitor, modify, or abort outgoing calls.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What’s the difference between file, class and activity in android?&amp;nbsp;&lt;/strong&gt;&lt;br /&gt;
File – It is a block of arbitrary information, or resource for storing information. It can be of any type.&lt;br /&gt;
Class – Its a compiled form of .Java file . Android finally used this .class files to produce an executable apk&lt;br /&gt;
Activity – An activity is the equivalent of a Frame/Window in GUI toolkits. It is not a file or a file type it is just a class that can be extended in Android for loading UI elements on view.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is a Sticky Intent?&lt;/strong&gt;&lt;br /&gt;
sendStickyBroadcast() performs a sendBroadcast (Intent) that is “sticky,” i.e. the Intent you are sending stays around after the broadcast is complete, so that others can quickly retrieve that data through the return value of registerReceiver (BroadcastReceiver, IntentFilter). In all other ways, this behaves the same as sendBroadcast(Intent).&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;One example of a sticky broadcast sent via the operating system is ACTION_BATTERY_CHANGED. When you call registerReceiver() for that action — even with a null BroadcastReceiver — you get the Intent that was last broadcast for that action. Hence, you can use this to find the state of the battery without necessarily registering for all future state changes in the battery.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Does Android support the Bluetooth serial port profile?&lt;/strong&gt;&lt;br /&gt;
Yes.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Can an application be started on powerup?&lt;/strong&gt;&lt;br /&gt;
Yes.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;How to Remove Desktop icons and Widgets&lt;/strong&gt;&lt;br /&gt;
A. Press and Hold the icon or widget. The phone will vibrate and on the bottom of the phone you will see anoption to remove. While still holding the icon or widget drag it to the remove button. Once remove turns red drop the item and it is gone&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Describe a real time scenario where android can be used?&lt;/strong&gt;&lt;br /&gt;
Imagine a situation that you are in a country where no one understands the language you speak and you can not read or write. However, you have mobile phone with you.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;With a mobile phone with android, the Google translator translates the data of one language into another language by using XMPP to transmit data. You can type the message in English and select the language which is understood by the citizens of the country in order to reach the message to the citizens.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;How to select more than one option from list in android xml file?&amp;nbsp;&lt;/strong&gt;&lt;br /&gt;
Give an example.&lt;br /&gt;
Specify android id, layout height and width as depicted in the following example.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What languages does Android support for application development?&lt;/strong&gt;&lt;br /&gt;
Android applications are written using the Java programming language.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Describe Android Application Architecture.&lt;/strong&gt;&lt;br /&gt;
Android Application Architecture has the following components:&lt;br /&gt;
• Services – like Network Operation&lt;br /&gt;
• Intent – To perform inter-communication between activities or services&lt;br /&gt;
• Resource Externalization – such as strings and graphics&lt;br /&gt;
• Notification signaling users – light, sound, icon, notification, dialog etc.&lt;br /&gt;
• Content Providers – They share data between applications&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.7em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Common Tricky questions&lt;/strong&gt;&lt;br /&gt;
 Remember that the GUI layer doesn’t request data directly from the web; data is always loaded from a local database.&lt;br /&gt;
 The service layer periodically updates the local database.&lt;br /&gt;
 What is the risk in blocking the Main thread when performing a lengthy operation such as web access or heavy computation? Application_Not_Responding exception will be thrown which will crash and restart the application.&lt;br /&gt;
 Why is List View not recommended to have active components? Clicking on the active text box will pop up the software keyboard but this will resize the list, removing focus from the clicked element.&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/8398523676301578367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2011/09/android-interview-question-and-answers_23.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/8398523676301578367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/8398523676301578367'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2011/09/android-interview-question-and-answers_23.html' title='Android Interview Question and answers'/><author><name>Mayur Upadhyay</name><uri>http://www.blogger.com/profile/03327601152886094464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-1112997285443224035</id><published>2011-09-13T02:46:00.000-07:00</published><updated>2011-09-13T02:47:42.100-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iPhone"/><title type='text'>iPhones Are For Old People, says HTC Chief</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgst_zDlJt0dVGhBun1-CXNQncfu6DIOLMyH-9FXju6jpmjbsucqhPonnmYa1AQ1Bs4RD5Ma0P8lRBik3cE4qBzrWriSGYom4K70wOuS-U12CDZo36pC0krfJC-syDyGTzvePM-ZqLakzw/s1600/Fichter.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgst_zDlJt0dVGhBun1-CXNQncfu6DIOLMyH-9FXju6jpmjbsucqhPonnmYa1AQ1Bs4RD5Ma0P8lRBik3cE4qBzrWriSGYom4K70wOuS-U12CDZo36pC0krfJC-syDyGTzvePM-ZqLakzw/s400/Fichter.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;The iPhone 4 and the iPhone 3GS are the two top-selling phones in America. But don’t let that fool you into thinking they’re cool, says Martin Fichter, acting president of HTC America. &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Speaking at the Mobile Future Forward conference in Seattle, Fichter — pictured above with bicycle — related a story about taking his daughter to Reed College in Portland, where he took an informal survey of her dormitory buddies. “None of them has an iPhone,” Fichter said, “because they told me: ‘My dad has an iPhone.’ There’s an interesting thing that’s going on in the market. The iPhone becomes a little less cool than it was. They were carrying HTCs. They were carrying Samsungs. They were even carrying some Chinese manufacturer’s devices.”&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Added Fichter: “Macbook Airs are cool. iPhones are not that cool anymore. We here are using iPhones, but our kids don’t find them that cool anymore.”&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;HTC has been making some aggressive moves in the market of late. Currently, the manufacturer uses Android and Windows Phone 7 for its operating systems; earlier Monday, its CEO suggested in an interview that he was looking around for other mobile OS options, so that the company isn’t so reliant on software from Google or Microsoft; this despite the pro-Android stance that HTC took in the wake of the Google-Motorola deal. HTC has a smartphone market share of 9% and growing fast. At some Verizon stores, according to one poll, the HTC Thunderbolt has been outselling the iPhone 4.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Now comes Fichter, launching a broadside against one of the iPhone’s strongest defenses: the elusive sense of “cool.” It’s a risky strategy, especially given the anticipation swirling around the impending iPhone 5 launch. Presenting your daughter’s college dorm as representative of a wider trend, especially when the whole world is waiting for Apple’s next phone, seems a sure-fire route to ridicule.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;On the other hand, Fichter has a point: iPhone owners tend to be older and more affluent, largely because their device is more expensive than the average Android equivalent. According to a recent infographic from recommendation engine Hunch, Android owners tend to have only a high school diploma and to be aged between 18 and 34 — the cool years, as far as most marketers are concerned.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Can HTC outmaneuver Apple by attempting to marginalize the iPhone? Or will the iPhone 5 launch blow that idea out of the water? Let us know what you think in the comments.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/1112997285443224035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2011/09/iphones-are-for-old-people-says-htc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/1112997285443224035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/1112997285443224035'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2011/09/iphones-are-for-old-people-says-htc.html' title='iPhones Are For Old People, says HTC Chief'/><author><name>Mayur Upadhyay</name><uri>http://www.blogger.com/profile/03327601152886094464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgst_zDlJt0dVGhBun1-CXNQncfu6DIOLMyH-9FXju6jpmjbsucqhPonnmYa1AQ1Bs4RD5Ma0P8lRBik3cE4qBzrWriSGYom4K70wOuS-U12CDZo36pC0krfJC-syDyGTzvePM-ZqLakzw/s72-c/Fichter.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-103177124653881246</id><published>2011-09-13T02:44:00.000-07:00</published><updated>2011-09-13T02:44:01.423-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Google announces next Android OS, Jelly Bean</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3 style=&quot;line-height: 24px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-large;&quot;&gt;Google announces next Android OS, Jelly Bean&lt;/span&gt;&lt;/h3&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGtViaZH1Ex5LUVXtYhCsSpHxZAg75-abFB-8HE9Cfrx4ErZSssdzc10ovccQgfDzUv_Qjtfyxsp9ZIkkjDQ6eWwwfRx1EqCIIPeDMNTNCxyr6xo6rS86rZxHKtwCXlnn7N3kn1Apf9cp5/s1600/photo_1315893300_temp.JPG.pagespeed.ce.dKo7EJvqDz.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;261&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGtViaZH1Ex5LUVXtYhCsSpHxZAg75-abFB-8HE9Cfrx4ErZSssdzc10ovccQgfDzUv_Qjtfyxsp9ZIkkjDQ6eWwwfRx1EqCIIPeDMNTNCxyr6xo6rS86rZxHKtwCXlnn7N3kn1Apf9cp5/s400/photo_1315893300_temp.JPG.pagespeed.ce.dKo7EJvqDz.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial; font-size: large;&quot;&gt;Close on the heels of&amp;nbsp;GoogleExecutive Chairman&amp;nbsp;Eric Schmidt&amp;nbsp;announcing the arrival of the upcoming version of&amp;nbsp;AndroidOS termed&amp;nbsp;Ice Cream Sandwich&amp;nbsp;in October or November, speculations have started on the next version of Android.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br style=&quot;font-family: Arial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;According to a report citing trusted sources in &#39;This is My Next&#39;,&amp;nbsp;Jelly Bean&amp;nbsp;is the working name for next incarnation of Android.&amp;nbsp;&lt;br style=&quot;font-family: Arial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;font-family: Arial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;The name follows Google&#39;s tradition of calling its Android operating systems after sweets in alphabetical order. Earlier versions of Android follow a typical order -- Cupcake 1.5, Donut 1.6, Eclair 2.1, Froyo 2.2,&amp;nbsp;Gingerbread&amp;nbsp;2.3,Honeycomb&amp;nbsp;3.0 and the upcoming Ice Cream Sandwich.&amp;nbsp;&lt;br style=&quot;font-family: Arial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;font-family: Arial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;The report quotes industry source saying, that the &quot;game-changing stuff&quot; that had originally been scheduled for Ice Cream Sandwich will be being pushed to Jelly Bean. Jelly Bean could be dubbed Android 4.5 or Android 5.0, depending on the amount of features packed, says the report.&lt;br style=&quot;font-family: Arial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;font-family: Arial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;Ice Cream Sandwich is expected to be a universal operating system that will work on phones, tablets, TVs, and even phones that transform into laptops. Among other things, the OS is likely to bring an updated app launcher, holographic user interface, interactive and new homescreen widgets and a multi-tasking panel.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/103177124653881246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2011/09/google-announces-next-android-os-jelly.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/103177124653881246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/103177124653881246'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2011/09/google-announces-next-android-os-jelly.html' title='Google announces next Android OS, Jelly Bean'/><author><name>Mayur Upadhyay</name><uri>http://www.blogger.com/profile/03327601152886094464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGtViaZH1Ex5LUVXtYhCsSpHxZAg75-abFB-8HE9Cfrx4ErZSssdzc10ovccQgfDzUv_Qjtfyxsp9ZIkkjDQ6eWwwfRx1EqCIIPeDMNTNCxyr6xo6rS86rZxHKtwCXlnn7N3kn1Apf9cp5/s72-c/photo_1315893300_temp.JPG.pagespeed.ce.dKo7EJvqDz.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-8299633802302758909</id><published>2011-09-11T00:30:00.000-07:00</published><updated>2011-09-11T00:30:02.441-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C++ Operator Overloading Guidelines"/><title type='text'>C++ Operator Overloading Guidelines</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;h2 align=&quot;center&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000;&quot;&gt;C++ Operator Overloading Guidelines&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;One of the nice features of C++ is that you can give special meanings to operators, when they are used with user-defined classes. This is called&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;operator overloading&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;. You can implement C++ operator overloads by providing special member-functions on your classes that follow a particular naming convention. For example, to overload the&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;+&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;operator for your class, you would provide a member-function named&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;operator+&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;on your class.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;The following set of operators is commonly overloaded for user-defined classes:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;=&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;(assignment operator)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;+ - *&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;(binary arithmetic operators)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;+= -= *=&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;(compound assignment operators)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;== !=&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;(comparison operators)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Here are some guidelines for implementing these operators. These guidelines are very important to follow, so definitely get in the habit early.&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Assignment Operator&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;=&lt;/span&gt;&lt;/tt&gt;&lt;/h3&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;The assignment operator has a signature like this:&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;  class MyClass {
  public:
    ...
    MyClass &amp;amp; operator=(const MyClass &amp;amp;rhs);
    ...
  }

  MyClass a, b;
  ...
  b = a;   // Same as b.operator=(a);&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Notice that the&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;=&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;operator takes a const-reference to the right hand side of the assignment. The reason for this should be obvious, since we don&#39;t want to change that value; we only want to change what&#39;s on the left hand side.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Also, you will notice that a reference is returned by the assignment operator. This is to allow&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;operator chaining&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;. You typically see it with primitive types, like this:&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;  int a, b, c, d, e;

  a = b = c = d = e = 42;&lt;/span&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;This is interpreted by the compiler as:&lt;/span&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;  a = (b = (c = (d = (e = 42))));&lt;/span&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;In other words, assignment is&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;right-associative&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;. The last assignment operation is evaluated first, and is propagated leftward through the series of assignments. Specifically:&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;e = 42&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;assigns 42 to&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;e&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;, then returns&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;e&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;as the result&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;The value of&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;e&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;is then assigned to&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;d&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;, and then&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;d&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;is returned as the result&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;The value of&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;d&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;is then assigned to&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;c&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;, and then&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;c&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;is returned as the result&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;etc.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Now, in order to support operator chaining, the assignment operator must return some value. The value that should be returned is a reference to the&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;left-hand side&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;of the assignment.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Notice that the returned reference is&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;not&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;declared&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;const&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;. This can be a bit confusing, because it allows you to write crazy stuff like this:&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;  MyClass a, b, c;
  ...
  (a = b) = c;  // What??&lt;/span&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;At first glance, you might want to prevent situations like this, by having&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;operator=&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;return a&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;const&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;reference. However,&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;statements like this&amp;nbsp;&lt;/span&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;will&lt;/span&gt;&lt;/u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;work with primitive types.&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;And, even worse, some tools actually rely on this behavior. Therefore, it is important to return a&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;non-&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;const&lt;/span&gt;&lt;/tt&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;reference from your&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;operator=&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;. The rule of thumb is, &quot;If it&#39;s good enough for&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;int&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;s, it&#39;s good enough for user-defined data-types.&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;So, for the hypothetical&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;MyClass&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;assignment operator, you would do something like this:&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;  // Take a const-reference to the right-hand side of the assignment.
  // Return a non-const reference to the left-hand side.
  MyClass&amp;amp; MyClass::operator=(const MyClass &amp;amp;rhs) {
    ...  // Do the assignment operation!

    return *this;  // Return a reference to myself.
  }&lt;/span&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Remember,&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;this&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;is a pointer to the object that the member function is being called on. Since&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;a = b&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;is treated as&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;a.operator=(b)&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;, you can see why it makes sense to return the object that the function is called on; object&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;a&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;is&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;the left-hand side.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;But, the member function needs to return a reference to the object, not a pointer to the object. So, it returns&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;*this&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;, which returns what&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;this&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;points at (i.e. the object), not the pointer itself. (In C++, instances are turned into references, and vice versa, pretty much automatically, so even though&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;*this&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;is an instance, C++ implicitly converts it into a reference to the instance.)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Now, one more&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;very important&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;point about the assignment operator:&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;YOU MUST CHECK FOR SELF-ASSIGNMENT!&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;This is especially important when your class does its own memory allocation. Here is why: The typical sequence of operations within an assignment operator is usually something like this:&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;  MyClass&amp;amp; MyClass::operator=(const MyClass &amp;amp;rhs) {
    // 1.  Deallocate any memory that MyClass is using internally
    // 2.  Allocate some memory to hold the contents of rhs
    // 3.  Copy the values from rhs into this instance
    // 4.  Return *this
  }&lt;/span&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Now, what happens when you do something like this:&lt;/span&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;  MyClass mc;
  ...
  mc = mc;     // BLAMMO.&lt;/span&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;You can hopefully see that this would wreak havoc on your program. Because&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;mc&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;is on the left-hand side&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;and&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;on the right-hand side, the first thing that happens is that&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;mc&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;releases any memory it holds internally. But, this is where the values were going to be copied from, since&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;mc&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;is also on the right-hand side! So, you can see that this completely messes up the rest of the assignment operator&#39;s internals.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;The easy way to avoid this is to&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;CHECK FOR SELF-ASSIGNMENT.&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;There are many ways to answer the question, &quot;Are these two instances the same?&quot; But, for our purposes, just compare the two objects&#39; addresses. If they are the same, then don&#39;t do assignment. If they are different, then do the assignment.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;So, the correct and safe version of the&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;MyClass&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;assignment operator would be this:&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;  MyClass&amp;amp; MyClass::operator=(const MyClass &amp;amp;rhs) {
    // Check for self-assignment!
    if (this == &amp;amp;rhs)      // Same object?
      return *this;        // Yes, so skip assignment, and just return *this.

    ... // Deallocate, allocate new space, copy values...

    return *this;
  }&lt;/span&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Or, you can simplify this a bit by doing:&lt;/span&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;  MyClass&amp;amp; MyClass::operator=(const MyClass &amp;amp;rhs) {

    // Only do assignment if RHS is a different object from this.
    if (this != &amp;amp;rhs) {
      ... // Deallocate, allocate new space, copy values...
    }

    return *this;
  }&lt;/span&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Remember that in the comparison,&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;this&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;is a pointer to the object being called, and&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;amp;rhs&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;is a pointer to the object being passed in as the argument. So, you can see that we avoid the dangers of self-assignment with this check.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;In summary, the guidelines for the assignment operator are:&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Take a const-reference for the argument (the right-hand side of the assignment).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Return a reference to the left-hand side, to support safe and reasonable operator chaining. (Do this by returning&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;*this&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;.)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Check for self-assignment, by comparing the pointers (&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;this&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;to&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;amp;rhs&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;).&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Compound Assignment Operators&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;+= -= *=&lt;/span&gt;&lt;/tt&gt;&lt;/h3&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;I discuss these before the arithmetic operators for a very specific reason, but we will get to that in a moment. The important point is that these are&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;destructive&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;operators, because they update or replace the values on the left-hand side of the assignment. So, you write:&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;  MyClass a, b;
  ...
  a += b;    // Same as a.operator+=(b)&lt;/span&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;In this case, the values within&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;a&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;are&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;modified&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;by the&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;+=&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;operator.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;How those values are modified isn&#39;t very important - obviously, what&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;MyClass&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;represents will dictate what these operators mean.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;The member function signature for such an operator should be like this:&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;  MyClass &amp;amp; MyClass::operator+=(const MyClass &amp;amp;rhs) {
    ...
  }&lt;/span&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;We have already covered the reason why&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;rhs&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;is a const-reference. And, the implementation of such an operation should also be straightforward.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;But, you will notice that the operator returns a&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;MyClass&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;-reference, and a non-const one at that. This is so you can do things like this:&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;  MyClass mc;
  ...
  (mc += 5) += 3;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Don&#39;t ask me why somebody would want to do this, but just like the normal assignment operator, this is allowed by the primitive data types. Our user-defined datatypes should match the same general characteristics of the primitive data types when it comes to operators, to make sure that everything works as expected.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;This is very straightforward to do. Just write your compound assignment operator implementation, and return&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;*this&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;at the end, just like for the regular assignment operator. So, you would end up with something like this:&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;  MyClass &amp;amp; MyClass::operator+=(const MyClass &amp;amp;rhs) {
    ...   // Do the compound assignment work.

    return *this;
  }&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;As one last note,&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;in general&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;you should beware of self-assignment with compound assignment operators as well. Fortunately, none of the C++ track&#39;s labs require you to worry about this, but you should always give it some thought when you are working on your own classes.&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Binary Arithmetic Operators&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;+ - *&lt;/span&gt;&lt;/tt&gt;&lt;/h3&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;The binary arithmetic operators are interesting because they don&#39;t modify either operand - they actually return a new value from the two arguments. You might think this is going to be an annoying bit of extra work, but here is the secret:&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Define your binary arithmetic operators using your compound assignment operators.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;There, I just saved you a bunch of time on your homeworks.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;So, you have implemented your&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;+=&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;operator, and now you want to implement the&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;+&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;operator. The function signature should be like this:&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;  // Add this instance&#39;s value to other, and return a new instance
  // with the result.
  const MyClass MyClass::operator+(const MyClass &amp;amp;other) const {
    MyClass result = *this;     // Make a copy of myself.  Same as MyClass result(*this);
    result += other;            // Use += to add other to the copy.
    return result;              // All done!
  }&lt;/span&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Simple!&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Actually, this explicitly spells out all of the steps, and if you want, you&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;can&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;combine them all into a single statement, like so:&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;  // Add this instance&#39;s value to other, and return a new instance
  // with the result.
  const MyClass MyClass::operator+(const MyClass &amp;amp;other) const {
    return MyClass(*this) += other;
  }&lt;/span&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;This creates an unnamed instance of&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;MyClass&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;, which is a&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;copy&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;of&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;*this&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;. Then, the&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;+=&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;operator is called on the temporary value, and then returns it.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;If that last statement doesn&#39;t make sense to you yet, then stick with the other way, which spells out all of the steps. But, if you understand exactly what is going on, then you can use that approach.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;You will notice that the&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;+&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;operator returns a&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;const&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;instance,&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;not&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;a&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;const&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;reference. This is so that people can&#39;t write strange statements like this:&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;  MyClass a, b, c;
  ...
  (a + b) = c;   // Wuh...?&lt;/span&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;This statement would basically do nothing, but if the&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;+&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;operator returns a non-&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;const&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;value, it&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;will&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;compile! So, we want to return a&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;const&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;instance, so that such madness will not even be allowed to compile.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;To summarize, the guidelines for the binary arithmetic operators are:&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Implement the compound assignment operators from scratch, and then define the binary arithmetic operators in terms of the corresponding compound assignment operators.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Return a&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;const&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;instance, to prevent worthless and confusing assignment operations that shouldn&#39;t be allowed.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;h3&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Comparison Operators&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;==&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;!=&lt;/span&gt;&lt;/tt&gt;&lt;/h3&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;The comparison operators are very simple. Define&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;==&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;first, using a function signature like this:&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;  bool MyClass::operator==(const MyClass &amp;amp;other) const {
    ...  // Compare the values, and return a bool result.
  }&lt;/span&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;The internals are very obvious and straightforward, and the&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;bool&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;return-value is also very obvious.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;The important point here is that the&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;!=&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;operator can also be defined in terms of the&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;==&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;operator, and you should do this to save effort. You can do something like this:&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;  bool MyClass::operator!=(const MyClass &amp;amp;other) const {
    return !(*this == other);
  }&lt;/span&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;That way you get to reuse the hard work you did on implementing your&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;==&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;operator. Also, your code is far less likely to exhibit inconsistencies between&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;==&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;!=&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;, since one is implemented in terms of the other.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;-0--0-0-0-0-0-0-0-0-0-0-0--0-0-0--0-0--0--0-0-0-0--&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/8299633802302758909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2011/09/c-operator-overloading-guidelines.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/8299633802302758909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/8299633802302758909'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2011/09/c-operator-overloading-guidelines.html' title='C++ Operator Overloading Guidelines'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-2567724881302084120</id><published>2011-09-11T00:25:00.000-07:00</published><updated>2011-09-11T00:25:32.582-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Operator Overloading in C++"/><title type='text'>Operator Overloading in C++</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: verdana, sans-serif; font-size: 12px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h1&gt;Operator Overloading in C++&lt;/h1&gt;by Andrei Milea&lt;br /&gt;
&lt;br /&gt;
In C++ the overloading principle applies not only to functions, but to operators too. That is, of operators can be extended to work not just with built-in types but also&amp;nbsp;&lt;a href=&quot;http://www.cprogramming.com/tutorial/lesson12.html&quot; style=&quot;color: #c30000; text-decoration: none;&quot;&gt;classes&lt;/a&gt;. A programmer can provide his or her own operator to a class by overloading the built-in operator to perform some specific computation when the operator is used on objects of that class. Is operator overloading really useful in real world implementations? It certainlly can be, making it very easy to write code that feels natural (we&#39;ll see some examples soon). On the other hand, operator overloading, like any advanced C++ feature, makes the language more complicated. In addition, operators tend to have very specific meaning, and most programmers don&#39;t expect operators to do a lot of work, so overloading operators can be abused to make code unreadable. But we won&#39;t do that.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 18px; font-weight: bold;&quot;&gt;An Example of Operator Overloading&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;example&quot; style=&quot;background-color: #ffffcc; border-bottom-color: rgb(0, 0, 0); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(0, 0, 0); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(0, 0, 0); border-top-style: dashed; border-top-width: 1px; border-width: initial; color: black; font-family: &#39;Courier New&#39;, Courier, mono; font-size: 12px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; width: auto;&quot;&gt;Complex a(1.2,1.3);     //this class is used to represent complex numbers
Complex b(2.1,3);       //notice the construction taking 2 parameters for the real and imaginary part
Complex c = a+b;        //for this to work the addition operator must be overloaded
&lt;/pre&gt;The addition without having overloaded operator + could look like this:&lt;pre class=&quot;example&quot; style=&quot;background-color: #ffffcc; border-bottom-color: rgb(0, 0, 0); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(0, 0, 0); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(0, 0, 0); border-top-style: dashed; border-top-width: 1px; border-width: initial; color: black; font-family: &#39;Courier New&#39;, Courier, mono; font-size: 12px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; width: auto;&quot;&gt;Complex c = a.Add(b);
&lt;/pre&gt;This piece of code is not as readable as the first example though--we&#39;re dealing with numbers, so doing addition should be natural. (In contrast to cases when programmers abuse this technique, when the concept represented by the class is not related to the operator--ike using + and - to add and remove elements from a data structure. In this cases operator overloading is a bad idea, creating confusion.)&lt;br /&gt;
&lt;br /&gt;
In order to allow operations like Complex c = a+b, in above code we overload the &quot;+&quot; operator. The overloading syntax is quite simple, similar to function overloading, the keyword operator must be followed by the operator we want to overload:&lt;pre class=&quot;example&quot; style=&quot;background-color: #ffffcc; border-bottom-color: rgb(0, 0, 0); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(0, 0, 0); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(0, 0, 0); border-top-style: dashed; border-top-width: 1px; border-width: initial; color: black; font-family: &#39;Courier New&#39;, Courier, mono; font-size: 12px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; width: auto;&quot;&gt;class Complex
{
public:
        Complex(double re,double im)
                :real(re),imag(im)
                {};
        Complex operator+(const Complex&amp;amp; other);
        Complex operator=(const Complex&amp;amp; other);
private:
        double real;
        double imag;
};
Complex Complex::operator+(const Complex&amp;amp;  other)
{
    double result_real = real + other.real;
    double result_imaginary = imag + other.imag;
    return Complex( result_real, result_imaginary );
}
&lt;/pre&gt;The assignment operator can be overloaded similarly. Notice that we did not have to call any accessor functions in order to get the real and imaginary parts from the parameter other since the overloaded operator is a member of the class and has full access to all private data. Alternatively, we could have defined the addition operator globally and called a member to do the actual work. In that case, we&#39;d also have to make the method a friend of the class, or use an accessor method to get at the private data:&lt;pre class=&quot;example&quot; style=&quot;background-color: #ffffcc; border-bottom-color: rgb(0, 0, 0); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(0, 0, 0); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(0, 0, 0); border-top-style: dashed; border-top-width: 1px; border-width: initial; color: black; font-family: &#39;Courier New&#39;, Courier, mono; font-size: 12px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; width: auto;&quot;&gt;friend Complex operator+(Complex); 

Complex operator+(const Complex  &amp;amp;num1, const Complex &amp;amp;num2)
{
    double result_real = num1.real + num2.real;
    double result_imaginary = num1.imag + num2.imag;
    return Complex( result_real, result_imaginary );
}
&lt;/pre&gt;Why would you do this? when the operator is a class member, the first object in the expression must be of that particular type. It&#39;s as if you were writing:&lt;pre class=&quot;example&quot; style=&quot;background-color: #ffffcc; border-bottom-color: rgb(0, 0, 0); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(0, 0, 0); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(0, 0, 0); border-top-style: dashed; border-top-width: 1px; border-width: initial; color: black; font-family: &#39;Courier New&#39;, Courier, mono; font-size: 12px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; width: auto;&quot;&gt;Complex a( 1, 2 );
Complex a( 2, 2 );
Complex c = a.operator=( b );
&lt;/pre&gt;when it&#39;s a global function, the implicit or user-defined conversion can allow the operator to act even if the first operand is not exactly of the same type:&lt;pre class=&quot;example&quot; style=&quot;background-color: #ffffcc; border-bottom-color: rgb(0, 0, 0); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(0, 0, 0); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(0, 0, 0); border-top-style: dashed; border-top-width: 1px; border-width: initial; color: black; font-family: &#39;Courier New&#39;, Courier, mono; font-size: 12px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; width: auto;&quot;&gt;Complex c = 2+b;        //if the integer 2  can be converted by the Complex class, this expression is valid
&lt;/pre&gt;By the way, the number of operands to a function is fixed; that is, a binary operator takes two operands, a unary only one, and you can&#39;t change it. The same is true for the precedence of operators too; for example the multiplication operator is called before addition. There are some operators that need the first operand to be assignable, such as : operator=, operator(), operator[] and operator-&amp;gt;, so their use is restricted just as member functions(non-static), they can&#39;t be overloaded globally. The operator=, operator&amp;amp; and operator, (sequencing) have already defined meanings by default for all objects, but their meanings can be changed by overloading or erased by making them private.&lt;br /&gt;
&lt;br /&gt;
Another intuitive meaning of the &quot;+&quot; operator from the STL string class which is overloaded to do concatenation:&lt;pre class=&quot;example&quot; style=&quot;background-color: #ffffcc; border-bottom-color: rgb(0, 0, 0); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(0, 0, 0); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(0, 0, 0); border-top-style: dashed; border-top-width: 1px; border-width: initial; color: black; font-family: &#39;Courier New&#39;, Courier, mono; font-size: 12px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; width: auto;&quot;&gt;string prefix(&quot;de&quot;);
string word(&quot;composed&quot;);
string composed = prefix+word;
&lt;/pre&gt;Using &quot;+&quot; to concatenate is also allowed in Java, but note that this is not extensible to other classes, and it&#39;s not a user defined behavior. Almost all operators can be overloaded in C++:&lt;pre class=&quot;example&quot; style=&quot;background-color: #ffffcc; border-bottom-color: rgb(0, 0, 0); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(0, 0, 0); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(0, 0, 0); border-top-style: dashed; border-top-width: 1px; border-width: initial; color: black; font-family: &#39;Courier New&#39;, Courier, mono; font-size: 12px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; width: auto;&quot;&gt;+       -       *       /       %       ^       &amp;amp;       |
        ~       !       ,       =       &amp;lt;       &amp;gt;       &amp;lt;=      &amp;gt;=
        ++      --      &amp;lt;&amp;lt;      &amp;gt;&amp;gt;      ==      !=      &amp;amp;&amp;amp;      ||
        +=      -=      /=      %=      ^=      &amp;amp; =     |=      *=
        &amp;lt;&amp;lt;=     &amp;gt;&amp;gt;=     [ ]     ( )     -&amp;gt;      -&amp;gt;*     new     delete
&lt;/pre&gt;The only operators that can&#39;t be overloaded are the operators for scope resolution (::), member selection (.), and member selection through a pointer to a function(.*). Overloading assumes you specify a behavior for an operator that acts on a user defined type and it can&#39;t be used just with general pointers. The standard behavior of operators for built-in (primitive) types cannot be changed by overloading, that is, you can&#39;t overload operator+(int,int).&lt;br /&gt;
&lt;br /&gt;
The logic(boolean) operators have by the default a short-circuiting way of acting in expressions with multiple boolean operations. This means that the expression:&lt;pre class=&quot;example&quot; style=&quot;background-color: #ffffcc; border-bottom-color: rgb(0, 0, 0); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(0, 0, 0); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(0, 0, 0); border-top-style: dashed; border-top-width: 1px; border-width: initial; color: black; font-family: &#39;Courier New&#39;, Courier, mono; font-size: 12px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; width: auto;&quot;&gt;if(a &amp;amp;&amp;amp; b &amp;amp;&amp;amp; c) 
&lt;/pre&gt;will not evaluate all three operations and will stop after a false one is found. This behavior does not apply to operators that are overloaded by the programmer.&lt;br /&gt;
&lt;br /&gt;
Even the simplest C++ application, like a &quot;hello world&quot; program, is using overloaded operators. This is due to the use of this technique almost everywhere in the standard library (STL). Actually the most basic operations in C++ are done with overloaded operators, the IO(input/output) operators are overloaded versions of shift operators(&amp;lt;&amp;lt;, &amp;gt;&amp;gt;). Their use comes naturally to many beginning programmers, but their implementation is not straightforward. However a general format for overloading the input/output operators must be known by any C++ developer. We will apply this general form to manage the input/output for our Complex class:&lt;pre class=&quot;example&quot; style=&quot;background-color: #ffffcc; border-bottom-color: rgb(0, 0, 0); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(0, 0, 0); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(0, 0, 0); border-top-style: dashed; border-top-width: 1px; border-width: initial; color: black; font-family: &#39;Courier New&#39;, Courier, mono; font-size: 12px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; width: auto;&quot;&gt;friend ostream &amp;amp;operator&amp;lt;&amp;lt;(ostream &amp;amp;out, Complex c)     //output
{
        out&amp;lt;&amp;lt;&quot;real part: &quot;&amp;lt;&amp;lt;real&amp;lt;&amp;lt;&quot;\n&quot;;
        out&amp;lt;&amp;lt;&quot;imag part: &quot;&amp;lt;&amp;lt;imag&amp;lt;&amp;lt;&quot;\n&quot;;
        return out;
}
friend istream &amp;amp;operator&amp;gt;&amp;gt;(istream &amp;amp;in, Complex &amp;amp;c)     //input
{
        cout&amp;lt;&amp;lt;&quot;enter real part:\n&quot;;
        in&amp;gt;&amp;gt;c.real;
        cout&amp;lt;&amp;lt;&quot;enter imag part: \n&quot;;
        in&amp;gt;&amp;gt;c.imag;
        return in;
}
&lt;/pre&gt;Notice the use of the friend keyword in order to access the private members in the above implementations. The main distinction between them is that the operator&amp;gt;&amp;gt; may encounter unexpected errors for incorrect input, which will make it fail sometimes because we haven&#39;t handled the errors correctly. A important trick that can be seen in this general way of overloading IO is the returning reference for istream/ostream which is needed in order to use them in a recursive manner:&lt;pre class=&quot;example&quot; style=&quot;background-color: #ffffcc; border-bottom-color: rgb(0, 0, 0); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(0, 0, 0); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(0, 0, 0); border-top-style: dashed; border-top-width: 1px; border-width: initial; color: black; font-family: &#39;Courier New&#39;, Courier, mono; font-size: 12px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; width: auto;&quot;&gt;Complex a(2,3);
Complex b(5.3,6);
cout&amp;lt;&amp;lt;a&amp;lt;&amp;lt;b;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/2567724881302084120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2011/09/operator-overloading-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/2567724881302084120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/2567724881302084120'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2011/09/operator-overloading-in-c.html' title='Operator Overloading in C++'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-6556513884944987296</id><published>2011-09-10T23:57:00.000-07:00</published><updated>2011-09-10T23:57:27.421-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mssql"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL questions"/><category scheme="http://www.blogger.com/atom/ns#" term="sql"/><title type='text'>MySQL questions</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h1 class=&quot;entry-title&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-weight: bold; line-height: 26px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 2px; padding-left: 0px; padding-right: 0px; padding-top: 8px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;MySQL questions&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;div class=&quot;entry-meta&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #787878; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;entry-content&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 18px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;ol style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 18px; margin-left: 3em; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;What is DDL, DML and DCL?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- If you look at the large variety of SQL commands, they can be divided into three large subgroups. Data Definition Language deals with database schemas and descriptions of how the data should reside in the database, therefore language statements like CREATE TABLE or ALTER TABLE belong to DDL. DML deals with data manipulation, and therefore includes most common SQL statements such SELECT, INSERT, etc. Data Control Language includes commands such as GRANT, and mostly concerns with rights, permissions and other controls of the database system.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;How do you get the number of rows affected by query?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- SELECT COUNT (user_id) FROM users would only return the number of user_id’s.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 18px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span id=&quot;more-308&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;If the value in the column is repeatable, how do you find out the unique values?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- Use DISTINCT in the query, such as SELECT DISTINCT user_firstname FROM users; You can also ask for a number of distinct values by saying SELECT COUNT (DISTINCT user_firstname) FROM users;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;How do you return the a hundred books starting from 25th?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- SELECT book_title FROM books LIMIT 25, 100. The first number in LIMIT is the offset, the second is the number.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;You wrote a search engine that should retrieve 10 results at a time, but at the same time you’d like to know how many rows there’re total. How do you display that to the user?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- SELECT SQL_CALC_FOUND_ROWS page_title FROM web_pages LIMIT 1,10; SELECT FOUND_ROWS(); The second query (not that COUNT() is never used) will tell you how many results there’re total, so you can display a phrase &quot;Found 13,450,600 results, displaying 1-10&quot;. Note that FOUND_ROWS does not pay attention to the LIMITs you specified and always returns the total number of rows affected by query.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;How would you write a query to select all teams that won either 2, 4, 6 or 8 games?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- SELECT team_name FROM teams WHERE team_won IN (2, 4, 6, 8)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;How would you select all the users, whose phone number is null?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- SELECT user_name FROM users WHERE ISNULL(user_phonenumber);&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;What does this query mean: SELECT user_name, user_isp FROM users LEFT JOIN isps USING (user_id)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- It’s equivalent to saying SELECT user_name, user_isp FROM users LEFT JOIN isps WHERE users.user_id=isps.user_id&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;How do you find out which auto increment was assigned on the last insert?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- SELECT LAST_INSERT_ID() will return the last value assigned by the auto_increment function. Note that you don’t have to specify the table name.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;What does –i-am-a-dummy flag to do when starting MySQL?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- Makes the MySQL&amp;nbsp; engine refuse UPDATE and DELETE commands where the WHERE clause is not present.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;On executing the DELETE statement I keep getting the error about foreign key constraint failing. What do I do?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- What it means is that so of the data that you’re trying to delete is still alive in another table. Like if you have a table for universities and a table for students, which contains the ID of the university they go to, running a delete on a university table will fail if the students table still contains people enrolled at that university.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Proper&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;way to do it would be to delete the offending data first, and then delete the university in question.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Quick&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;way would involve running SET foreign_key_checks=0 before the DELETE command, and setting the parameter back to 1 after the DELETE is done. If your foreign key was formulated with ON DELETE CASCADE, the data in dependent tables will be removed automatically.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;When would you use ORDER BY in DELETE statement?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- When you’re not deleting by row ID. Such as in DELETE FROM techinterviews_com_questions ORDER BY timestamp LIMIT 1. This will delete the most recently posted question in the table techinterviews_com_questions.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;How can you see all indexes defined for a table?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- SHOW INDEX FROM techinterviews_questions;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;How would you change a column from VARCHAR(10) to VARCHAR(50)?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- ALTER TABLE techinterviews_questions CHANGE techinterviews_content techinterviews_CONTENT VARCHAR(50).&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;How would you delete a column?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- ALTER TABLE techinterviews_answers DROP answer_user_id.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;How would you change a table to InnoDB?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- ALTER TABLE techinterviews_questions ENGINE innodb;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;When you create a table, and then run SHOW CREATE TABLE on it, you occasionally get different results than what you typed in. What does MySQL modify in your newly created tables?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;-&lt;/span&gt;&lt;/span&gt;&lt;ol style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; list-style-image: initial; list-style-position: initial; list-style-type: upper-alpha; margin-bottom: 0px; margin-left: 3em; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;VARCHARs with length less than 4 become CHARs&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;CHARs with length more than 3 become VARCHARs.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;NOT NULL gets added to the columns declared as PRIMARY KEYs&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Default values such as NULL are specified for each column&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;How do I find out all databases starting with ‘tech’ to which I have access to?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- SHOW DATABASES LIKE ‘tech%’;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;How do you concatenate strings in MySQL?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- CONCAT (string1, string2, string3)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;How do you get a portion of a string?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- SELECT SUBSTR(title, 1, 10) from techinterviews_questions;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;What’s the difference between CHAR_LENGTH and LENGTH?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- The first is, naturally, the character count. The second is byte count. For the Latin characters the numbers are the same, but they’re not the same for Unicode and other encodings.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;How do you convert a string to UTF-8?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- SELECT (techinterviews_question USING utf8);&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;What do % and _ mean inside LIKE statement?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- % corresponds to 0 or more characters, _ is exactly one character.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;What does + mean in REGEXP?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- At least one character.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/regexp.html&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #2772b3; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Appendix G. Regular Expressions&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;from MySQL manual is worth perusing before the interview.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;How do you get the month from a timestamp?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- SELECT MONTH(techinterviews_timestamp) from techinterviews_questions;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;How do you offload the time/date handling to MySQL?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- SELECT DATE_FORMAT(techinterviews_timestamp, ‘%Y-%m-%d’) from techinterviews_questions; A similar TIME_FORMAT function deals with time.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;How do you add three minutes to a date?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- ADDDATE(techinterviews_publication_date, INTERVAL 3 MINUTE)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;What’s the difference between Unix timestamps and MySQL timestamps?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- Internally Unix timestamps are stored as 32-bit integers, while MySQL timestamps are stored in a similar manner, but represented in readable YYYY-MM-DD HH:MM:SS format.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;How do you convert between Unix timestamps and MySQL timestamps?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- UNIX_TIMESTAMP converts from MySQL timestamp to Unix timestamp, FROM_UNIXTIME converts from Unix timestamp to MySQL timestamp.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;What are ENUMs used for in MySQL?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- You can limit the possible values that go into the table. CREATE TABLE months (month ENUM ‘January’, ‘February’, ‘March’,…); INSERT months VALUES (’April’);&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;b style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;How are ENUMs and SETs represented internally?&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;- As unique integers representing the powers of two, due to storage optimizations.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;--------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/6556513884944987296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2011/09/mysql-questions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/6556513884944987296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/6556513884944987296'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2011/09/mysql-questions.html' title='MySQL questions'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-5340637957461640055</id><published>2011-09-09T09:51:00.000-07:00</published><updated>2011-09-09T09:53:58.367-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="r.layout.main cannot be resolved"/><title type='text'>R.layout.main cannot be resolved  Problem</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000;&quot;&gt;Problem :-&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, geneva, lucida, &#39;lucida grande&#39;, arial, helvetica, sans-serif; font-weight: normal;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 0px; text-decoration: none;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;R.layout.main cannot be resolved&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO-3gpKbfkyUwjN9TJXhEOeMfsRMZPLY7NLN71gx2c7clmq5AUXl_Yr6eP7u2dzIqkg-VBiovUcMWpQvQs-zLVHnHWQd4EH4SqPfrv46gr-xcNL7kMtx9tqWhnt4SBZJZD5SHnJDNaXBe1/s1600/rlayout.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;297&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO-3gpKbfkyUwjN9TJXhEOeMfsRMZPLY7NLN71gx2c7clmq5AUXl_Yr6eP7u2dzIqkg-VBiovUcMWpQvQs-zLVHnHWQd4EH4SqPfrv46gr-xcNL7kMtx9tqWhnt4SBZJZD5SHnJDNaXBe1/s400/rlayout.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Solution:-&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizXMbVj0fY12742xFYttmplD26YbHnMJy36BjKL1anE1s2EkegWpUqv-XiSQxT00JnEs3l_1Gf9r1v72Dyko1P-Z-RLte4-k_ISw3bPFJ6YrMulE_iM-j2Jta9ZhY7V1qopLXtUsqiNuKh/s1600/rlayout+-+Copy.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;298&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizXMbVj0fY12742xFYttmplD26YbHnMJy36BjKL1anE1s2EkegWpUqv-XiSQxT00JnEs3l_1Gf9r1v72Dyko1P-Z-RLte4-k_ISw3bPFJ6YrMulE_iM-j2Jta9ZhY7V1qopLXtUsqiNuKh/s400/rlayout+-+Copy.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;-------------------------------------------------------------------------------------------------------------&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/5340637957461640055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2011/09/rlayoutmain-cannot-be-resolved-problem.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/5340637957461640055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/5340637957461640055'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2011/09/rlayoutmain-cannot-be-resolved-problem.html' title='R.layout.main cannot be resolved  Problem'/><author><name>Mayur Upadhyay</name><uri>http://www.blogger.com/profile/03327601152886094464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO-3gpKbfkyUwjN9TJXhEOeMfsRMZPLY7NLN71gx2c7clmq5AUXl_Yr6eP7u2dzIqkg-VBiovUcMWpQvQs-zLVHnHWQd4EH4SqPfrv46gr-xcNL7kMtx9tqWhnt4SBZJZD5SHnJDNaXBe1/s72-c/rlayout.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-4977700565629668036</id><published>2011-09-05T06:49:00.001-07:00</published><updated>2011-09-08T10:09:27.079-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android for beginner"/><category scheme="http://www.blogger.com/atom/ns#" term="android interview questions"/><title type='text'>Android Interview Questions and Answer</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;h2 style=&quot;color: #7b7dd0; font: normal normal bold 14px/23px Arial, Helvetica, sans-serif; height: auto; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 640px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-weight: normal; line-height: normal;&quot;&gt;Describe the APK format.&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;The APK file is compressed the AndroidManifest.xml file, application code (.dex files), resource files, and other files. A project is compiled into a single .apk file.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What is an action?&lt;/b&gt;&lt;br /&gt;
The Intent Sender desires something or doing some task&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What is activity?&lt;/b&gt;&lt;br /&gt;
A single screen in an application, with supporting Java code.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What is intent in Android?&lt;/b&gt;&lt;br /&gt;
A class (Intent) will describes what a caller desires to do. The caller will send this intent to Android&#39;s intent resolver, which finds the most suitable activity for the intent. E.g. opening a PDF document is an intent, and the Adobe Reader apps will be the perfect activity for that intent(class).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What is a Sticky Intent?&lt;/b&gt;&lt;br /&gt;
sendStickyBroadcast() performs a sendBroadcast (Intent) known as sticky, i.e. the Intent you are sending stays around after the broadcast is complete, so that others can quickly retrieve that data through the return value of registerReceiver (BroadcastReceiver, IntentFilter). In all other ways, this behaves the same as sendBroadcast(Intent).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Example for sticky broadcast&lt;/b&gt;&lt;br /&gt;
When you call registerReceiver() for that action -- even with a null BroadcastReceiver -- you get the Intent that was last broadcast for that action. Hence, you can use this to find the state of the battery without necessarily registering for all future state changes in the battery.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;How the nine-patch Image different from a regular bitmap? or Different between nine-patch Image vs regular Bitmap Image&lt;/b&gt;&lt;br /&gt;
It is one of a resizable bitmap resource which is being used as backgrounds or other images on the device. The NinePatch class allows drawing a bitmap in nine sections. The four corners are unscaled; the middle of the image is scaled in both axes, the four edges are scaled into one axis.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What Programming languages does Android support for application development?&lt;/b&gt;&lt;br /&gt;
Android applications supports using Java Programming Language. which is coded in Java and complied using Android SDK.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What is a resource?&lt;/b&gt;&lt;br /&gt;
A user defined JSON, XML, bitmap, or other file, injected into the application build process, which can later be loaded from code.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;How will you record a phone call in Android? or How to handle on Audio Stream for a call in Android?&lt;/b&gt;&lt;br /&gt;
Permissions.PROCESS_OUTGOING_CALLS: Will Allows an application to monitor, modify, or abort outgoing calls. So through that we can monitor the Phone calls.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What&#39;s the difference between class, file and activity in android?&lt;/b&gt;&lt;br /&gt;
Class - The Class file is complied from .java file. Android will use this .class file to produce the executable apk.&lt;br /&gt;
File - It is a block of resources, srbitrary information. It can be any file type.&lt;br /&gt;
Activity - An activity is the equivalent of a Frame/Window in GUI toolkits. It is not a file or a file type it is just a class that can be extended in Android for loading UI elements on view.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Does Android support the Bluetooth serial port profile?&lt;/b&gt;&lt;br /&gt;
A. Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Can an application be started on powerup?&lt;/b&gt;&lt;br /&gt;
A. Yes.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What is APK format.&lt;/b&gt;&lt;br /&gt;
The APK file is compressed AndroidManifest.xml file with extension .apk, Which have application code (.dex files), resource files, and other files which is compressed into single .apk file.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;How to Translate in android&lt;/b&gt;&lt;br /&gt;
The Google translator translates the data of one language into another language by using XMPP to transmit data. You can type the message in English and select the language which is understood by the citizens of the country in order to reach the message to the citizens.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What is an action?&lt;/b&gt;&lt;br /&gt;
A description of something that an Intent sender desires.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What are the advantages of Android?&lt;/b&gt;&lt;br /&gt;
The following are the advantages of Android:&lt;br /&gt;
&lt;br /&gt;
* The customer will be benefited from wide range of mobile applications to choose, since the monopoly of wireless carriers like Orange and AT&amp;amp;T will be broken by Google Android.&lt;br /&gt;
* Features like weather details, live RSS feeds, opening screen, icon on the opening screen can be customized&lt;br /&gt;
* Innovative products like the location-aware services, location of a nearby convenience store etc., are some of the additive facilities in Android.&lt;br /&gt;
-------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.bux2get.com/aft/00b6d894/11110069.html&quot;&gt;&lt;img align=&quot;left&quot; alt=&quot;Work at home&quot; border=&quot;0&quot; hspace=&quot;8&quot; src=&quot;http://banners.bigextracash.com/banner300x250_franchise1.jpg&quot; title=&quot;Job at home&quot; vspace=&quot;8&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h1&gt;Work at home&lt;/h1&gt;If you are looking for a profitable work at home or whether you dream about getting revenue online; yes, after all, you located it!&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;Gain financial freedom&lt;/h1&gt;No computer experiences needed. You can be completely new to handle our application - you don&#39;t need ANY experience. &lt;a href=&quot;http://www.bux2get.com/aft/00b6d894/11110069.html&quot;&gt;This is really simple&lt;/a&gt;.&lt;br /&gt;
You may stay at room and work at your free time. Even if you don&#39;t have computer you may do this task in Online cafe or on Internet mobile phone.&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;How it works?&lt;/h1&gt;We build a &lt;a href=&quot;http://www.bux2get.com/aft/00b6d894/11110069.html&quot;&gt;online-shop&lt;/a&gt; for you with ready to operate e-commerce solution. Your work is extremely easy; you have to submit information regarding your online-store to the Online directories. &lt;br /&gt;
We will provide you with pretty easy step-by-step instruction how to do this. The typical instruction requests you to open a internet website and fill in a form with material regarding your internet-shop and software.&lt;br /&gt;
You will be paid from US $20.00 to US 180.00 for each purchase which is comes through your web-store.&lt;br /&gt;
There is no restriction for your income. No matter where you live your commissions are 100% guaranteed.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.bux2get.com/aft/00b6d894/11110069.html&quot;&gt;Apply Now...&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.bux2get.com/aft/00b6d894/11110069.html&quot;&gt;Register now&lt;/a&gt; to have financial independence. All you need is the simple: apply now and makepersonal web business!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/4977700565629668036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2011/09/android-interview-questions-and-answer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/4977700565629668036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/4977700565629668036'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2011/09/android-interview-questions-and-answer.html' title='Android Interview Questions and Answer'/><author><name>Mayur Upadhyay</name><uri>http://www.blogger.com/profile/03327601152886094464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-5816567272779966148</id><published>2011-09-05T06:48:00.000-07:00</published><updated>2011-09-05T06:51:00.319-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android for beginner"/><category scheme="http://www.blogger.com/atom/ns#" term="android interview questions"/><title type='text'>Android Interview Question and answers</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-4324732656869940918&quot; style=&quot;line-height: 1.4; width: 530px;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Android Interview&amp;nbsp;&lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD1&quot; style=&quot;background-attachment: scroll !important; background-clip: initial !important; background-color: transparent !important; background-image: none !important; background-origin: initial !important; background-position: 0% 50%; background-repeat: repeat repeat !important; border-bottom-color: rgb(0, 153, 0) !important; border-bottom-style: solid !important; border-bottom-width: 1px !important; color: #009900; cursor: pointer !important; display: inline !important; float: none !important; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px !important; font-style: normal !important; font-weight: bold !important; padding-bottom: 1px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static; text-decoration: underline !important;&quot;&gt;Question and answers&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;1)Describe the APK format.&lt;/span&gt;&lt;br /&gt;
The APK file is compressed the AndroidManifest.xml file,&amp;nbsp;&lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD7&quot; style=&quot;background-attachment: scroll !important; background-clip: initial !important; background-color: transparent !important; background-image: none !important; background-origin: initial !important; background-position: 0% 50%; background-repeat: repeat repeat !important; border-bottom-color: rgb(0, 153, 0) !important; border-bottom-style: solid !important; border-bottom-width: 1px !important; color: #009900; cursor: pointer !important; display: inline !important; float: none !important; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px !important; font-style: normal !important; font-weight: normal !important; padding-bottom: 1px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static; text-decoration: underline !important;&quot;&gt;application code&lt;/span&gt;&amp;nbsp;(.dex files),&lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD5&quot; style=&quot;background-attachment: scroll !important; background-clip: initial !important; background-color: transparent !important; background-image: none !important; background-origin: initial !important; background-position: 0% 50%; background-repeat: repeat repeat !important; border-bottom-color: rgb(0, 153, 0) !important; border-bottom-style: solid !important; border-bottom-width: 1px !important; color: #009900; cursor: pointer !important; display: inline !important; float: none !important; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px !important; font-style: normal !important; font-weight: normal !important; padding-bottom: 1px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static; text-decoration: underline !important;&quot;&gt;resource&lt;/span&gt;&amp;nbsp;files, and other files. A project is compiled into a single .apk file.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;2)What is an action?&lt;/span&gt;&lt;br /&gt;
A description of something that an Intent sender desires.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;3)What is activity?&lt;/span&gt;&lt;br /&gt;
A single screen in an application, with supporting Java code.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;4)What is intent?&lt;/span&gt;&lt;br /&gt;
A class (Intent) describes what a caller desires to do. The caller sends this intent to Android&#39;s intent resolver, which finds the most suitable activity for the intent. E.g. opening a&lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD4&quot; style=&quot;background-attachment: scroll !important; background-clip: initial !important; background-color: transparent !important; background-image: none !important; background-origin: initial !important; background-position: 0% 50%; background-repeat: repeat repeat !important; border-bottom-color: rgb(0, 153, 0) !important; border-bottom-style: solid !important; border-bottom-width: 1px !important; color: #009900; cursor: pointer !important; display: inline !important; float: none !important; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px !important; font-style: normal !important; font-weight: normal !important; padding-bottom: 1px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static; text-decoration: underline !important;&quot;&gt;PDF file&lt;/span&gt;&amp;nbsp;is an intent, and the Adobe Reader is the suitable activity for this intent.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;5)How is nine-patch image different from a regular bitmap?&lt;/span&gt;&lt;br /&gt;
It is a resizable bitmap&amp;nbsp;resource&amp;nbsp;that can be used for backgrounds or other images on the device. The NinePatch class permits drawing a bitmap in nine sections. The four corners are unscaled; the four edges are scaled in one axis, and the middle is scaled in both axes.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;6)What&amp;nbsp;&lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD3&quot; style=&quot;background-attachment: scroll !important; background-clip: initial !important; background-color: transparent !important; background-image: none !important; background-origin: initial !important; background-position: 0% 50%; background-repeat: repeat repeat !important; border-bottom-color: rgb(0, 153, 0) !important; border-bottom-style: solid !important; border-bottom-width: 1px !important; color: #009900; cursor: pointer !important; display: inline !important; float: none !important; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px !important; font-style: normal !important; font-weight: bold !important; padding-bottom: 1px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static; text-decoration: underline !important;&quot;&gt;languages&lt;/span&gt;&amp;nbsp;does Android support for application development?&lt;/span&gt;&lt;br /&gt;
Android applications are written using the&amp;nbsp;&lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD2&quot; style=&quot;background-attachment: scroll !important; background-clip: initial !important; background-color: transparent !important; background-image: none !important; background-origin: initial !important; background-position: 0% 50%; background-repeat: repeat repeat !important; border-bottom-color: rgb(0, 153, 0) !important; border-bottom-style: solid !important; border-bottom-width: 1px !important; color: #009900; cursor: pointer !important; display: inline !important; float: none !important; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px !important; font-style: normal !important; font-weight: normal !important; padding-bottom: 1px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static; text-decoration: underline !important;&quot;&gt;Java programming&lt;/span&gt;&amp;nbsp;language.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;7)What is a&amp;nbsp;resource?&lt;/span&gt;&lt;br /&gt;
A user-supplied XML, bitmap, or other file, injected into the application build process,&amp;nbsp;&lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD6&quot; style=&quot;background-attachment: scroll !important; background-clip: initial !important; background-color: transparent !important; background-image: none !important; background-origin: initial !important; background-position: 0% 50%; background-repeat: repeat repeat !important; border-bottom-color: rgb(0, 153, 0) !important; border-bottom-style: solid !important; border-bottom-width: 1px !important; color: #009900; cursor: pointer !important; display: inline !important; float: none !important; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px !important; font-style: normal !important; font-weight: normal !important; padding-bottom: 1px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static; text-decoration: underline !important;&quot;&gt;which can&lt;/span&gt;&amp;nbsp;later be loaded from code.&lt;/div&gt;&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-4324732656869940918&quot; style=&quot;line-height: 1.4; width: 530px;&quot;&gt;-------------------------------------------------------------------------------------------------------------&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;http://exactsolution4u.blogspot.com/2011/09/android-interview-questions-and-answer.html&quot;&gt;More Questions--&lt;/a&gt;&lt;/span&gt;----&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/5816567272779966148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2011/09/android-interview-question-and-answers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/5816567272779966148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/5816567272779966148'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2011/09/android-interview-question-and-answers.html' title='Android Interview Question and answers'/><author><name>Mayur Upadhyay</name><uri>http://www.blogger.com/profile/03327601152886094464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7569755796084030595.post-6050518820669841224</id><published>2011-08-27T07:25:00.000-07:00</published><updated>2011-08-27T07:25:28.365-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android for beginner"/><category scheme="http://www.blogger.com/atom/ns#" term="First example"/><title type='text'>Android for beginner - First example</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;Start the eclipse :-&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVkXAQ96033NyOkFmvWE8XOjziurDnFnEs6Wj2JI21PB1x3N1ItqEmuQN9kAM22lCOTkAMhvvB6gvhFUMVTKxZqg7J1Azlk__DhyphenhyphenMMtWq5BIXy0qn7LVBKvtXPgGUcaJorwn-7O3a30LV_/s1600/a1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVkXAQ96033NyOkFmvWE8XOjziurDnFnEs6Wj2JI21PB1x3N1ItqEmuQN9kAM22lCOTkAMhvvB6gvhFUMVTKxZqg7J1Azlk__DhyphenhyphenMMtWq5BIXy0qn7LVBKvtXPgGUcaJorwn-7O3a30LV_/s320/a1.JPG&quot; width=&quot;256&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhTNO_5jeLHhaTcvdBoYetCP6UMAPE6vdMLpY-9av2j26yguVxv_3te0THMYt2wMhXFNNGOptwhz5OPBXyejfVevs82oA8-PCGuOar1GQ4j0u06Qi6KyEmeoxWyJ941d3-feZFyKF8to_O/s1600/a2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;187&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhTNO_5jeLHhaTcvdBoYetCP6UMAPE6vdMLpY-9av2j26yguVxv_3te0THMYt2wMhXFNNGOptwhz5OPBXyejfVevs82oA8-PCGuOar1GQ4j0u06Qi6KyEmeoxWyJ941d3-feZFyKF8to_O/s320/a2.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGdSWrERnQPfw2CsUoJXNsndmg1d1YrJMstLczkct8JrRAITpTN0jV-2sNmKF1V4BJ8WoG7hLefn7UizG2XhXe1h_TaPZxXLqQK1w8KT66YFF_ofkTfGjrv4sKjsocwRJNOByM44ngzt5F/s1600/a3.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGdSWrERnQPfw2CsUoJXNsndmg1d1YrJMstLczkct8JrRAITpTN0jV-2sNmKF1V4BJ8WoG7hLefn7UizG2XhXe1h_TaPZxXLqQK1w8KT66YFF_ofkTfGjrv4sKjsocwRJNOByM44ngzt5F/s320/a3.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8gSq_tjQnGF9MB6iLoeSfzKYF4ALWLd1KrBhZX-BAKww53YRHvGr1laVPk-cBbukj5yUhB05qOcPrPPxIR58XfGH6u6NOW5jzMx0Sa3_5tYxtddMhInwVoQT3EKZBAj0vu6RlE6oPzfHL/s1600/a4.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8gSq_tjQnGF9MB6iLoeSfzKYF4ALWLd1KrBhZX-BAKww53YRHvGr1laVPk-cBbukj5yUhB05qOcPrPPxIR58XfGH6u6NOW5jzMx0Sa3_5tYxtddMhInwVoQT3EKZBAj0vu6RlE6oPzfHL/s320/a4.JPG&quot; width=&quot;209&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUinj7Fz97C9HnVJTOa7CKTEIKK0dfkT5LmKohA5Wg3VufLSLTDamJwN5lpA29VJsAYN47ydmM8DUj3BYpwriZmnAWXI3rfhCB8t0kmFpSKG0E3Hm5PsibW1P-iaYD6s0c_Z80QwXF-Dsh/s1600/a5.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;227&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUinj7Fz97C9HnVJTOa7CKTEIKK0dfkT5LmKohA5Wg3VufLSLTDamJwN5lpA29VJsAYN47ydmM8DUj3BYpwriZmnAWXI3rfhCB8t0kmFpSKG0E3Hm5PsibW1P-iaYD6s0c_Z80QwXF-Dsh/s320/a5.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRDLHF2WQSdtCjxLxi40-80d-W4aqGLmC8GqB4VtgTn1rK0bWgziSxBjIphaj3OlGI0Csuj3Jk0No16g-rX1IwPSsP5NEXEUzHrRykHxieqJ7LKddx17gvshYCct64i8yjp2NfYWK5VzWM/s1600/a6.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRDLHF2WQSdtCjxLxi40-80d-W4aqGLmC8GqB4VtgTn1rK0bWgziSxBjIphaj3OlGI0Csuj3Jk0No16g-rX1IwPSsP5NEXEUzHrRykHxieqJ7LKddx17gvshYCct64i8yjp2NfYWK5VzWM/s1600/a6.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt5aZaxgh7h1JC4KPjg8mwOUe5UuxxwUr0V1e9HK5pTaH3Bu9_4BVtTSyK40_aARLGJIlIm-m9neybRC4IouHdUvwtb4lqqYRJCC9xsvfj4k37h_1D3fMTz8mVz4ick5RfmWZYyske1niG/s1600/a7.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt5aZaxgh7h1JC4KPjg8mwOUe5UuxxwUr0V1e9HK5pTaH3Bu9_4BVtTSyK40_aARLGJIlIm-m9neybRC4IouHdUvwtb4lqqYRJCC9xsvfj4k37h_1D3fMTz8mVz4ick5RfmWZYyske1niG/s320/a7.JPG&quot; width=&quot;227&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDtYyD11ryXvMHaFHaI8rcac7Cp-ElyMeIaEQFUKeBNzbSoZZgHhsdnxNIVF8owD7JD-22hsO6N9SUUAniaLDw2hLfDX72hErOPornKbPwEi25agHna5DYK568ajPyUK0DTC2xvGBdZKAf/s1600/a8.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;223&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDtYyD11ryXvMHaFHaI8rcac7Cp-ElyMeIaEQFUKeBNzbSoZZgHhsdnxNIVF8owD7JD-22hsO6N9SUUAniaLDw2hLfDX72hErOPornKbPwEi25agHna5DYK568ajPyUK0DTC2xvGBdZKAf/s320/a8.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;End!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exactsolution4u.blogspot.com/feeds/6050518820669841224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://exactsolution4u.blogspot.com/2011/08/android-for-beginner-first-example.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/6050518820669841224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7569755796084030595/posts/default/6050518820669841224'/><link rel='alternate' type='text/html' href='http://exactsolution4u.blogspot.com/2011/08/android-for-beginner-first-example.html' title='Android for beginner - First example'/><author><name>Mayur Upadhyay</name><uri>http://www.blogger.com/profile/03327601152886094464</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVkXAQ96033NyOkFmvWE8XOjziurDnFnEs6Wj2JI21PB1x3N1ItqEmuQN9kAM22lCOTkAMhvvB6gvhFUMVTKxZqg7J1Azlk__DhyphenhyphenMMtWq5BIXy0qn7LVBKvtXPgGUcaJorwn-7O3a30LV_/s72-c/a1.JPG" height="72" width="72"/><thr:total>0</thr:total></entry></feed>