<?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-7523470230003836388</id><updated>2024-09-19T22:01:28.090+05:30</updated><category term="Frist Post"/><category term="JAVA QUESTIONS"/><category term="VHDL (VHSIC hardware description language)"/><title type='text'>If anyone need help in programming &amp;amp; Share problems</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://problemssolvehere.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://problemssolvehere.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Kanhaiya Lal</name><uri>http://www.blogger.com/profile/17729850042667687272</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>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7523470230003836388.post-1422923750649968826</id><published>2012-07-08T13:32:00.000+05:30</published><updated>2014-01-20T12:05:33.152+05:30</updated><title type='text'>Introduction  :</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;If you have any problem related &amp;nbsp;to programming&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;(&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;C / C++ / JAVA(core) / PHP / MySQL&lt;/span&gt;&lt;/b&gt;).&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;You can share your problem with me,I will try to work on your problem and give result as soon &amp;nbsp;as possible.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;Working as a&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;Web Developer &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;Er. Kanhaiya Lal (B.Tech-CSE-2011)&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/center&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;hr /&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  var _gaq = _gaq || [];
  _gaq.push([&#39;_setAccount&#39;, &#39;UA-32624241-1&#39;]);
  _gaq.push([&#39;_trackPageview&#39;]);

  (function() {
    var ga = document.createElement(&#39;script&#39;); ga.type = &#39;text/javascript&#39;; ga.async = true;
    ga.src = (&#39;https:&#39; == document.location.protocol ? &#39;https://ssl&#39; : &#39;http://www&#39;) + &#39;.google-analytics.com/ga.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(ga, s);
  })();
&lt;/script&gt;

&lt;br /&gt;
&lt;div callback=&quot;kanahaiya5590 Blog&quot; class=&quot;g-plusone&quot; data-annotation=&quot;inline&quot; data-width=&quot;&quot;&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
    var po = document.createElement(&#39;script&#39;); po.type = &#39;text/javascript&#39;; po.async = true;
    po.src = &#39;https://apis.google.com/js/plusone.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(po, s);
  })();
&lt;/script&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://problemssolvehere.blogspot.com/feeds/1422923750649968826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://problemssolvehere.blogspot.com/2011/09/if-you-have-any-problem-related.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/1422923750649968826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/1422923750649968826'/><link rel='alternate' type='text/html' href='http://problemssolvehere.blogspot.com/2011/09/if-you-have-any-problem-related.html' title='Introduction  :'/><author><name>Kanhaiya Lal</name><uri>http://www.blogger.com/profile/17729850042667687272</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-7523470230003836388.post-5512354993357387835</id><published>2012-07-08T13:21:00.000+05:30</published><updated>2012-07-08T13:25:35.755+05:30</updated><title type='text'>Palindrome In PHP : kanhaiya lal (08/07/2012)</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;background-color: white; color: red; font-size: large; text-align: left;&quot;&gt;Source Code :=&amp;gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: red; font-size: large;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;$x=&quot;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;madam&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #999999;&quot;&gt; //Input String&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: lime; font-size: large;&quot;&gt;&amp;nbsp; checkPalindrom($x); &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: large;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;//function Calling&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-size: large;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: purple; font-size: large;&quot;&gt;function checkPalindrom($x) //function&amp;nbsp;Definition&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: purple; font-size: large;&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #3d85c6;&quot;&gt; $len=strlen($x); &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #999999;&quot;&gt;//get String Length&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: large;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #bf9000; font-size: large;&quot;&gt; $p=substr($x,0,1); &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #999999; font-size: large;&quot;&gt;&amp;nbsp;//get First Char&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #bf9000; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$q=substr($x,$len-1,$len); &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #999999; font-size: large;&quot;&gt;//get Last char&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #351c75;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-size: large;&quot;&gt;if($p===$q)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0c343d;&quot;&gt; if($x!=&#39; &#39; &amp;amp;&amp;amp; strlen($x)!=0)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0c343d; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #e06666;&quot;&gt; $x=substr($x,1,$len-2); &lt;/span&gt;&lt;span style=&quot;color: #999999;&quot;&gt;//get String with Remove first &amp;amp; last char of New String.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp; &amp;nbsp;checkPalindrom($x);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #0c343d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0c343d; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #741b47;&quot;&gt;echo &quot;True,It&#39;s&amp;nbsp;Palindrome.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;color: #741b47;&quot;&gt;&quot;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &lt;span style=&quot;color: #351c75;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #351c75; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #741b47;&quot;&gt; die(&quot;No,&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #741b47;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;It&#39;s not&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Palindrome.&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&quot;); &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: #351c75;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: purple; font-size: large;&quot;&gt;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: large;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: large;&quot;&gt;Output :=&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; True,It&#39;s Palindrome.&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://problemssolvehere.blogspot.com/feeds/5512354993357387835/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://problemssolvehere.blogspot.com/2012/07/palindrome-in-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/5512354993357387835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/5512354993357387835'/><link rel='alternate' type='text/html' href='http://problemssolvehere.blogspot.com/2012/07/palindrome-in-php.html' title='Palindrome In PHP : kanhaiya lal (08/07/2012)'/><author><name>Kanhaiya Lal</name><uri>http://www.blogger.com/profile/17729850042667687272</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-7523470230003836388.post-4235644760638966939</id><published>2012-06-16T14:01:00.001+05:30</published><updated>2012-06-16T14:05:15.622+05:30</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: red; font-size: large;&quot;&gt;&lt;b&gt;REAL TIME HTML EDITOR&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://problemssolvehere.blogspot.in/p/editor.html&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Click to given link to open online html editor&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;Html Editor&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://problemssolvehere.blogspot.com/feeds/4235644760638966939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://problemssolvehere.blogspot.com/2012/06/html-editor.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/4235644760638966939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/4235644760638966939'/><link rel='alternate' type='text/html' href='http://problemssolvehere.blogspot.com/2012/06/html-editor.html' title=''/><author><name>Kanhaiya Lal</name><uri>http://www.blogger.com/profile/17729850042667687272</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-7523470230003836388.post-6176405545230892869</id><published>2012-06-15T11:47:00.001+05:30</published><updated>2012-06-16T00:28:09.508+05:30</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;br /&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dotted; border-bottom-width: 1px; color: #666666; font-family: &#39;Trebuchet MS&#39;, Tahoma, Arial; font-size: 24px; font-weight: normal; letter-spacing: -1px; line-height: 24px; margin: 0px 0px 2px; padding-bottom: 3px; text-align: -webkit-auto;&quot;&gt;



&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/&quot; rel=&quot;bookmark&quot; style=&quot;color: #666666; text-decoration: none;&quot; title=&quot;Permanent Link: Model View Controller(MVC) in PHP&quot;&gt;Model View Controller(MVC) in PHP&lt;/a&gt;&lt;/h2&gt;
&lt;br /&gt;




&lt;/div&gt;
&lt;div class=&quot;dd_content_wrap&quot;&gt;
&lt;div style=&quot;line-height: 1.8em; padding: 0px 0px 15px;&quot;&gt;
The model view controller pattern is the most used pattern for today’s world web applications. It has been used for the first time in Smalltalk and then adopted and popularized by Java. At present there are more than a dozen PHP web frameworks based on MVC pattern.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.8em; padding: 0px 0px 15px;&quot;&gt;
Despite the fact that the MVC pattern is very popular in PHP, is hard to find a proper tutorial accompanied by a simple source code example. That is the purpose of this tutorial.&lt;br /&gt;
&lt;span id=&quot;more-182&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;padding-left: 15px;&quot;&gt;The MVC pattern separates an application in 3 modules: Model, View and Controller:&lt;div style=&quot;line-height: 1.8em; padding: 0px 0px 15px;&quot;&gt;
&lt;/div&gt;
&lt;li style=&quot;padding-top: 10px;&quot;&gt;The&amp;nbsp;&lt;strong&gt;model&amp;nbsp;&lt;/strong&gt;is responsible to manage the data; it stores and retrieves entities used by an application, usually from a database, and contains the logic implemented by the application.&lt;/li&gt;
&lt;li style=&quot;padding-top: 10px;&quot;&gt;The&amp;nbsp;&lt;strong&gt;view (presentation)&lt;/strong&gt;&amp;nbsp;is responsible to display the data provided by the model in a specific format. It has a similar usage with the template modules present in some popular web applications, like wordpress, joomla, …&lt;/li&gt;
&lt;li style=&quot;padding-top: 10px;&quot;&gt;The&amp;nbsp;&lt;strong&gt;controller&amp;nbsp;&lt;/strong&gt;handles the model and view layers to work together. The controller receives a request from the client, invoke the model to perform the requested operations and send the data to the View. The view format the data to be presented to the user, in a web application as an html output.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;line-height: 1.8em; padding: 0px 0px 15px;&quot;&gt;
The above figure contains the MVC Collaboration Diagram, where the links and dependencies between figures can be observed:&lt;br /&gt;
&lt;img alt=&quot;mvc-collaboration&quot; class=&quot;aligncenter size-full wp-image-183&quot; height=&quot;178&quot; src=&quot;http://php-html.net/tutorials/wp-content/uploads/2009/08/mvc-collaboration.png&quot; style=&quot;border: none; padding: 20px;&quot; title=&quot;mvc-collaboration&quot; width=&quot;500&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.8em; padding: 0px 0px 15px;&quot;&gt;
Our short php example has a simple structure, putting each MVC module in one folder:&lt;br /&gt;
&lt;img alt=&quot;mvc-structure&quot; class=&quot;alignnone size-full wp-image-227&quot; height=&quot;163&quot; src=&quot;http://php-html.net/tutorials/wp-content/uploads/2009/08/mvc-structure.png&quot; style=&quot;border: none; padding: 20px;&quot; title=&quot;mvc-structure&quot; width=&quot;202&quot; /&gt;&lt;/div&gt;
&lt;h3 style=&quot;color: #2763a5; font-size: 17px; font-weight: normal; line-height: 17px; margin: 40px 0px 10px;&quot;&gt;



Controller&lt;/h3&gt;
&lt;div style=&quot;line-height: 1.8em; padding: 0px 0px 15px;&quot;&gt;
The controller is the first thing which takes a request, parse it, initialize and invoke the model and takes the model response and send it to the presentation layer. It’s practically the liant between the Model and the View, a small framework where Model and View are plugged in. In our naive php implementation the controller is implemented by only one class, named unexpectedly controller. The application entry point will be index.php. The index php file will delegate all the requests to the controller:&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: #e7e5dc; font-family: Arial, Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 10px; margin: 0px 0px 50px; overflow: auto; padding-top: 1px; width: 586px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;padding-left: 35px;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 9px; line-height: normal; padding: 3px 8px 10px 10px;&quot;&gt;
&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style: decimal-leading-zero; margin: 0px 0px 1px 35px; padding: 0px;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;index.php&amp;nbsp;file&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;include_once&lt;/span&gt;(&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;controller/Controller.php&quot;&lt;/span&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;vars&quot;&gt;$controller&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&amp;nbsp;Controller();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;vars&quot;&gt;$controller&lt;/span&gt;-&amp;gt;invoke();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.8em; padding: 0px 0px 15px;&quot;&gt;
Our Controller class has only one function and the constructor. The constructor instantiate a model class and when a request is done, the controller decide which data is required from the model. Then it calls the model class to retrieve the data. After that it calls the corresponding passing the data coming from the model. The code is extremely simple. Note that the controller does not know anything about the database or about how the page is generated.&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: #e7e5dc; font-family: Arial, Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 10px; margin: 0px 0px 50px; overflow: auto; padding-top: 1px; width: 586px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;padding-left: 35px;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 9px; line-height: normal; padding: 3px 8px 10px 10px;&quot;&gt;
&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style: decimal-leading-zero; margin: 0px 0px 1px 35px; padding: 0px;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;include_once&lt;/span&gt;(&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;model/Model.php&quot;&lt;/span&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;class&lt;/span&gt;&amp;nbsp;Controller&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;vars&quot;&gt;$model&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&amp;nbsp;__construct()&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;vars&quot;&gt;$this&lt;/span&gt;-&amp;gt;model&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&amp;nbsp;Model();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&amp;nbsp;invoke()&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(!isset(&lt;span class=&quot;vars&quot;&gt;$_GET&lt;/span&gt;[&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;book&#39;&lt;/span&gt;]))&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&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;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;no&amp;nbsp;special&amp;nbsp;book&amp;nbsp;is&amp;nbsp;requested,&amp;nbsp;we&#39;ll&amp;nbsp;show&amp;nbsp;a&amp;nbsp;list&amp;nbsp;of&amp;nbsp;all&amp;nbsp;available&amp;nbsp;books&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;vars&quot;&gt;$books&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;vars&quot;&gt;$this&lt;/span&gt;-&amp;gt;model-&amp;gt;getBookList();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;include&lt;/span&gt;&amp;nbsp;&#39;view/booklist.php&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;show&amp;nbsp;the&amp;nbsp;requested&amp;nbsp;book&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$book&amp;nbsp;=&amp;nbsp;$this-&amp;gt;model-&amp;gt;getBook($_GET[&#39;&lt;/span&gt;book&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;]);&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;include&amp;nbsp;&#39;&lt;/span&gt;view/viewbook.php&#39;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&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;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.8em; padding: 0px 0px 15px;&quot;&gt;
In the following MVC Sequence Diagram it can be observed the flow during a http request:&lt;br /&gt;
&lt;img alt=&quot;mvc-sequence1&quot; height=&quot;284&quot; src=&quot;http://php-html.net/tutorials/wp-content/uploads/2009/08/mvc-sequence1.png&quot; style=&quot;border: none; padding-left: 20px;&quot; title=&quot;mvc-sequence1&quot; width=&quot;463&quot; /&gt;&lt;/div&gt;
&lt;h3 style=&quot;color: #2763a5; font-size: 17px; font-weight: normal; line-height: 17px; margin: 40px 0px 10px;&quot;&gt;



Model and Entity Classes&lt;/h3&gt;
&lt;ul style=&quot;padding-left: 15px;&quot;&gt;The Model represents the data and the logic of an application, what many calls business logic. Usually, it’s responsible for:&lt;div style=&quot;line-height: 1.8em; padding: 0px 0px 15px;&quot;&gt;
&lt;/div&gt;
&lt;li style=&quot;padding-top: 10px;&quot;&gt;storing, deleting, updating the application data. Generally it includes the database operations, but implementing the same operations invoking external web services or APIs is not an unusual at all.&lt;/li&gt;
&lt;li style=&quot;padding-top: 10px;&quot;&gt;encapsulating the application logic. This is the layer that should implement all the logic of the application. The most common mistakes are to implement application logic operations inside the controller or the view(presentation) layer.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;line-height: 1.8em; padding: 0px 0px 15px;&quot;&gt;
In our example the model is represented by 2 classes: the “Model” class and a “Book” class. The model doesn’t need any other presentation. The “Book” class is an entity class. This class should be exposed to the View layer and represents the format exported by the Model view. In a good implementation of the MVC pattern only entity classes should be exposed by the model and they should not encapsulate any business logic. Their solely purpose is to keep data. Depending on implementation Entity objects can be replaced by xml or json chunk of data. In the above snippet you can notice how Model is returning a specific book, or a list of all available books:&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: #e7e5dc; font-family: Arial, Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 10px; margin: 0px 0px 50px; overflow: auto; padding-top: 1px; width: 586px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;padding-left: 35px;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 9px; line-height: normal; padding: 3px 8px 10px 10px;&quot;&gt;
&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style: decimal-leading-zero; margin: 0px 0px 1px 35px; padding: 0px;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;include_once&lt;/span&gt;(&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;model/Book.php&quot;&lt;/span&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;class&lt;/span&gt;&amp;nbsp;Model&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&amp;nbsp;getBookList()&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;here&amp;nbsp;goes&amp;nbsp;some&amp;nbsp;hardcoded&amp;nbsp;values&amp;nbsp;to&amp;nbsp;simulate&amp;nbsp;the&amp;nbsp;database&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;return&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;array&lt;/span&gt;(&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&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;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;Jungle&amp;nbsp;Book&quot;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&amp;nbsp;Book(&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;Jungle&amp;nbsp;Book&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;R.&amp;nbsp;Kipling&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;A&amp;nbsp;classic&amp;nbsp;book.&quot;&lt;/span&gt;),&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&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;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;Moonwalker&quot;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&amp;nbsp;Book(&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;Moonwalker&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;J.&amp;nbsp;Walker&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;&quot;&lt;/span&gt;),&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&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;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;PHP&amp;nbsp;for&amp;nbsp;Dummies&quot;&lt;/span&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&amp;nbsp;Book(&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;PHP&amp;nbsp;for&amp;nbsp;Dummies&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;Some&amp;nbsp;Smart&amp;nbsp;Guy&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;&quot;&lt;/span&gt;)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&amp;nbsp;getBook(&lt;span class=&quot;vars&quot;&gt;$title&lt;/span&gt;)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;we&amp;nbsp;use&amp;nbsp;the&amp;nbsp;previous&amp;nbsp;function&amp;nbsp;to&amp;nbsp;get&amp;nbsp;all&amp;nbsp;the&amp;nbsp;books&amp;nbsp;and&amp;nbsp;then&amp;nbsp;we&amp;nbsp;return&amp;nbsp;the&amp;nbsp;requested&amp;nbsp;one.&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;in&amp;nbsp;a&amp;nbsp;real&amp;nbsp;life&amp;nbsp;scenario&amp;nbsp;this&amp;nbsp;will&amp;nbsp;be&amp;nbsp;done&amp;nbsp;through&amp;nbsp;a&amp;nbsp;db&amp;nbsp;select&amp;nbsp;command&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;vars&quot;&gt;$allBooks&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;vars&quot;&gt;$this&lt;/span&gt;-&amp;gt;getBookList();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;return&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;vars&quot;&gt;$allBooks&lt;/span&gt;[&lt;span class=&quot;vars&quot;&gt;$title&lt;/span&gt;];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.8em; padding: 0px 0px 15px;&quot;&gt;
In our example the model layer includes the Book class. In a real scenario, the model will include all the entities and the classes to persist data into the database, and the classes encapsulating the business logic.&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: #e7e5dc; font-family: Arial, Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 10px; margin: 0px 0px 50px; overflow: auto; padding-top: 1px; width: 586px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;padding-left: 35px;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 9px; line-height: normal; padding: 3px 8px 10px 10px;&quot;&gt;
&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style: decimal-leading-zero; margin: 0px 0px 1px 35px; padding: 0px;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;class&lt;/span&gt;&amp;nbsp;Book&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;vars&quot;&gt;$title&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;vars&quot;&gt;$author&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;vars&quot;&gt;$description&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&amp;nbsp;__construct(&lt;span class=&quot;vars&quot;&gt;$title&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;vars&quot;&gt;$author&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;vars&quot;&gt;$description&lt;/span&gt;)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;vars&quot;&gt;$this&lt;/span&gt;-&amp;gt;title&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;vars&quot;&gt;$title&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;vars&quot;&gt;$this&lt;/span&gt;-&amp;gt;author&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;vars&quot;&gt;$author&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;vars&quot;&gt;$this&lt;/span&gt;-&amp;gt;description&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;vars&quot;&gt;$description&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;h3 style=&quot;color: #2763a5; font-size: 17px; font-weight: normal; line-height: 17px; margin: 40px 0px 10px;&quot;&gt;



View (Presentation)&lt;/h3&gt;
&lt;div style=&quot;line-height: 1.8em; padding: 0px 0px 15px;&quot;&gt;
The view(presentation layer)is responsible for formating the data received from the model in a form accessible to the user. The data can come in different formats from the model: simple objects( sometimes called Value Objects), xml structures, json, …&lt;/div&gt;
&lt;div style=&quot;line-height: 1.8em; padding: 0px 0px 15px;&quot;&gt;
The view should not be confused to the template mechanism sometimes they work in the same manner and address similar issues. Both will reduce the dependency of the presentation layer of from rest of the system and separates the presentation elements(html) from the code. The controller delegate the data from the model to a specific view element, usually associated to the main entity in the model. For example the operation “display account” will be associated to a “display account” view. The view layer can use a template system to render the html pages. The template mechanism can reuse specific parts of the page: header, menus, footer, lists and tables, …. Speaking in the context of the MVC pattern&lt;/div&gt;
&lt;div style=&quot;line-height: 1.8em; padding: 0px 0px 15px;&quot;&gt;
In our example the view contains only 2 files one for displaying one book and the other one for displaying a list of books.&lt;/div&gt;
&lt;div style=&quot;line-height: 1.8em; padding: 0px 0px 15px;&quot;&gt;
&lt;strong&gt;viewbook.php&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: #e7e5dc; font-family: Arial, Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 10px; margin: 0px 0px 50px; overflow: auto; padding-top: 1px; width: 586px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;padding-left: 35px;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 9px; line-height: normal; padding: 3px 8px 10px 10px;&quot;&gt;
&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-xml&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style: decimal-leading-zero; margin: 0px 0px 1px 35px; padding: 0px;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;head&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;head&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;php&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;&#39;Title:&#39;&amp;nbsp;.&amp;nbsp;$book-&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;title&amp;nbsp;.&amp;nbsp;&#39;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;br&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;/&amp;gt;&lt;/span&gt;&#39;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;&#39;Author:&#39;&amp;nbsp;.&amp;nbsp;$book-&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;author&amp;nbsp;.&amp;nbsp;&#39;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;br&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;/&amp;gt;&lt;/span&gt;&#39;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;&#39;Description:&#39;&amp;nbsp;.&amp;nbsp;$book-&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;description&amp;nbsp;.&amp;nbsp;&#39;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;br&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;/&amp;gt;&lt;/span&gt;&#39;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.8em; padding: 0px 0px 15px;&quot;&gt;
&lt;strong&gt;booklist.php&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: #e7e5dc; font-family: Arial, Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 10px; margin: 0px 0px 50px; overflow: auto; padding-top: 1px; width: 586px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;padding-left: 35px;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 9px; line-height: normal; padding: 3px 8px 10px 10px;&quot;&gt;
&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://php-html.net/tutorials/model-view-controller-in-php/#&quot; style=&quot;color: #a0a0a0; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-xml&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style: decimal-leading-zero; margin: 0px 0px 1px 35px; padding: 0px;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;head&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;head&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;table&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tbody&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;Title&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;Author&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;Description&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tbody&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;php&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&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;nbsp;foreach&amp;nbsp;($books&amp;nbsp;as&amp;nbsp;$&lt;span class=&quot;attribute&quot; style=&quot;color: red;&quot;&gt;title&lt;/span&gt;&amp;nbsp;=&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;$book)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&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;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;&#39;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;a&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;attribute&quot; style=&quot;color: red;&quot;&gt;href&lt;/span&gt;=&lt;span class=&quot;attribute-value&quot; style=&quot;color: blue;&quot;&gt;&quot;index.php?book=&#39;.$book-&amp;gt;title.&#39;&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&#39;.$book-&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;title.&#39;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&#39;.$book-&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;author.&#39;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&#39;.$book-&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;description.&#39;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&#39;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&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;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;table&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; padding-left: 10px; padding-top: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.8em; padding: 0px 0px 15px;&quot;&gt;
The above example is a simplified implementation in PHP. Most of the PHP web frameworks based on MVC have similar implementations, in a much better shape. However, the possibility of MVC pattern are endless. For example different layers can be implemented in different languages or distributed on different machines. AJAX applications can implements the View layer directly in Javascript in the browser, invoking JSON services. The controller can be partially implemented on client, partially on server…&lt;/div&gt;
&lt;ul style=&quot;padding-left: 15px;&quot;&gt;This post should not be ended before enumerating the advantages of Model View Controller pattern:&lt;div style=&quot;line-height: 1.8em; padding: 0px 0px 15px;&quot;&gt;
&lt;/div&gt;
&lt;li style=&quot;padding-top: 10px;&quot;&gt;the Model and View are separated, making the application more flexible.&lt;/li&gt;
&lt;li style=&quot;padding-top: 10px;&quot;&gt;the Model and view can be changed separately, or replaced. For example a web application can be transformed in a smart client application just by writing a new View module, or an application can use web services in the backend instead of a database, just replacing the model module.&lt;/li&gt;
&lt;li style=&quot;padding-top: 10px;&quot;&gt;each module can be tested and debugged separately.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;line-height: 1.8em; padding: 0px 0px 15px;&quot;&gt;
The files are available for download as a zip from&amp;nbsp;&lt;a href=&quot;http://sourceforge.net/projects/mvc-php/files/mvc.zip/download&quot; rel=&quot;nofollow&quot; style=&quot;color: #6da6e2; text-decoration: none;&quot;&gt;http://sourceforge.net/projects/mvc-php/files/mvc.zip/download&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://problemssolvehere.blogspot.com/feeds/6176405545230892869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://problemssolvehere.blogspot.com/2012/06/model-view-controllermvc-in-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/6176405545230892869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/6176405545230892869'/><link rel='alternate' type='text/html' href='http://problemssolvehere.blogspot.com/2012/06/model-view-controllermvc-in-php.html' title=''/><author><name>Kanhaiya Lal</name><uri>http://www.blogger.com/profile/17729850042667687272</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-7523470230003836388.post-7015177479897795466</id><published>2011-12-26T02:31:00.000+05:30</published><updated>2011-12-26T02:43:57.227+05:30</updated><title type='text'>Best Practices for Speeding Up Your Web Site</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 dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;h3 id=&quot;num_http&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Minimize HTTP Requests&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: content&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;80% of the end-user response time is spent on the front-end. Most of this time is tied up in downloading all the components in the page: images, stylesheets, scripts, Flash, etc. Reducing the number of components in turn reduces the number of HTTP requests required to render the page. This is the key to faster pages.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;One way to reduce the number of components in the page is to simplify the page&#39;s design. But is there a way to build pages with richer content while also achieving fast response times? Here are some techniques for reducing the number of HTTP requests, while still supporting rich page designs.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;strong style=&quot;font-weight: bold;&quot;&gt;Combined files&lt;/strong&gt;&amp;nbsp;are a way to reduce the number of HTTP requests by combining all scripts into a single script, and similarly combining all CSS into a single stylesheet. Combining files is more challenging when the scripts and stylesheets vary from page to page, but making this part of your release process improves response times.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://alistapart.com/articles/sprites&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;&lt;strong style=&quot;font-weight: bold;&quot;&gt;CSS Sprites&lt;/strong&gt;&lt;/a&gt;&amp;nbsp;are the preferred method for reducing the number of image requests. Combine your background images into a single image and use the CSS&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;background-image&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;background-position&lt;/code&gt;&amp;nbsp;properties to display the desired image segment.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.w3.org/TR/html401/struct/objects.html#h-13.6&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;&lt;strong style=&quot;font-weight: bold;&quot;&gt;Image maps&lt;/strong&gt;&lt;/a&gt;&amp;nbsp;combine multiple images into a single image. The overall size is about the same, but reducing the number of HTTP requests speeds up the page. Image maps only work if the images are contiguous in the page, such as a navigation bar. Defining the coordinates of image maps can be tedious and error prone. Using image maps for navigation is not accessible too, so it&#39;s not recommended.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;strong style=&quot;font-weight: bold;&quot;&gt;Inline images&lt;/strong&gt;&amp;nbsp;use the&amp;nbsp;&lt;a href=&quot;http://tools.ietf.org/html/rfc2397&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;&lt;code style=&quot;line-height: 13px; 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;data:&lt;/code&gt;&amp;nbsp;URL scheme&lt;/a&gt;&amp;nbsp;to embed the image data in the actual page. This can increase the size of your HTML document. Combining inline images into your (cached) stylesheets is a way to reduce HTTP requests and avoid increasing the size of your pages. Inline images are not yet supported across all major browsers.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Reducing the number of HTTP requests in your page is the place to start. This is the most important guideline for improving performance for first time visitors. As described in Tenni Theurer&#39;s blog post&lt;a href=&quot;http://yuiblog.com/blog/2007/01/04/performance-research-part-2/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;Browser Cache Usage - Exposed!&lt;/a&gt;, 40-60% of daily visitors to your site come in with an empty cache. Making your page fast for these first time visitors is key to a better user experience.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 id=&quot;cdn&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Use a Content Delivery Network&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: server&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The user&#39;s proximity to your web server has an impact on response times. Deploying your content across multiple, geographically dispersed servers will make your pages load faster from the user&#39;s perspective. But where should you start?&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;As a first step to implementing geographically dispersed content, don&#39;t attempt to redesign your web application to work in a distributed architecture. Depending on the application, changing the architecture could include daunting tasks such as synchronizing session state and replicating database transactions across server locations. Attempts to reduce the distance between users and your content could be delayed by, or never pass, this application architecture step.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Remember that 80-90% of the end-user response time is spent downloading all the components in the page: images, stylesheets, scripts, Flash, etc. This is the&amp;nbsp;&lt;em&gt;Performance Golden Rule&lt;/em&gt;. Rather than starting with the difficult task of redesigning your application architecture, it&#39;s better to first disperse your static content. This not only achieves a bigger reduction in response times, but it&#39;s easier thanks to content delivery networks.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;A content delivery network (CDN) is a collection of web servers distributed across multiple locations to deliver content more efficiently to users. The server selected for delivering content to a specific user is typically based on a measure of network proximity. For example, the server with the fewest network hops or the server with the quickest response time is chosen.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Some large Internet companies own their own CDN, but it&#39;s cost-effective to use a CDN service provider, such as&amp;nbsp;&lt;a href=&quot;http://www.akamai.com/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;Akamai Technologies&lt;/a&gt;,&amp;nbsp;&lt;a href=&quot;http://www.edgecast.com/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;EdgeCast&lt;/a&gt;, or&amp;nbsp;&lt;a href=&quot;http://www.level3.com/index.cfm?pageID=36&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;level3&lt;/a&gt;. For start-up companies and private web sites, the cost of a CDN service can be prohibitive, but as your target audience grows larger and becomes more global, a CDN is necessary to achieve fast response times. At Yahoo!, properties that moved static content off their application web servers to a CDN (both 3rd party as mentioned above as well as Yahoo’s own&amp;nbsp;&lt;a href=&quot;https://cwiki.apache.org/TS/traffic-server.html&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;CDN&lt;/a&gt;) improved end-user response times by 20% or more. Switching to a CDN is a relatively easy code change that will dramatically improve the speed of your web site.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 id=&quot;expires&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Add an Expires or a Cache-Control Header&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: server&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;There are two aspects to this rule:&lt;/div&gt;&lt;ul style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px; 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;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;For static components: implement &quot;Never expire&quot; policy by setting far future&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;Expires&lt;/code&gt;&amp;nbsp;header&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;For dynamic components: use an appropriate&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;Cache-Control&lt;/code&gt;&amp;nbsp;header to help the browser with conditional requests&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Web page designs are getting richer and richer, which means more scripts, stylesheets, images, and Flash in the page. A first-time visitor to your page may have to make several HTTP requests, but by using the Expires header you make those components cacheable. This avoids unnecessary HTTP requests on subsequent page views. Expires headers are most often used with images, but they should be used on&lt;em&gt;all&lt;/em&gt;&amp;nbsp;components including scripts, stylesheets, and Flash components.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Browsers (and proxies) use a cache to reduce the number and size of HTTP requests, making web pages load faster. A web server uses the Expires header in the HTTP response to tell the client how long a component can be cached. This is a far future Expires header, telling the browser that this response won&#39;t be stale until April 15, 2010.&lt;/div&gt;&lt;pre style=&quot;background-color: white; color: #333333; font-size: 13px; line-height: 13px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Expires: Thu, 15 Apr 2010 20:00:00 GMT&lt;/pre&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;If your server is Apache, use the ExpiresDefault directive to set an expiration date relative to the current date. This example of the ExpiresDefault directive sets the Expires date 10 years out from the time of the request.&lt;/div&gt;&lt;pre style=&quot;background-color: white; color: #333333; font-size: 13px; line-height: 13px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;ExpiresDefault &quot;access plus 10 years&quot;&lt;/pre&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Keep in mind, if you use a far future Expires header you have to change the component&#39;s filename whenever the component changes. At Yahoo! we often make this step part of the build process: a version number is embedded in the component&#39;s filename, for example, yahoo_2.0.6.js.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Using a far future Expires header affects page views only after a user has already visited your site. It has no effect on the number of HTTP requests when a user visits your site for the first time and the browser&#39;s cache is empty. Therefore the impact of this performance improvement depends on how often users hit your pages with a primed cache. (A &quot;primed cache&quot; already contains all of the components in the page.) We&amp;nbsp;&lt;a href=&quot;http://yuiblog.com/blog/2007/01/04/performance-research-part-2/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;measured this at Yahoo!&lt;/a&gt;&amp;nbsp;and found the number of page views with a primed cache is 75-85%. By using a far future Expires header, you increase the number of components that are cached by the browser and re-used on subsequent page views without sending a single byte over the user&#39;s Internet connection.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 id=&quot;gzip&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Gzip Components&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: server&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The time it takes to transfer an HTTP request and response across the network can be significantly reduced by decisions made by front-end engineers. It&#39;s true that the end-user&#39;s bandwidth speed, Internet service provider, proximity to peering exchange points, etc. are beyond the control of the development team. But there are other variables that affect response times. Compression reduces response times by reducing the size of the HTTP response.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Starting with HTTP/1.1, web clients indicate support for compression with the Accept-Encoding header in the HTTP request.&lt;/div&gt;&lt;pre style=&quot;background-color: white; color: #333333; font-size: 13px; line-height: 13px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Accept-Encoding: gzip, deflate&lt;/pre&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;If the web server sees this header in the request, it may compress the response using one of the methods listed by the client. The web server notifies the web client of this via the Content-Encoding header in the response.&lt;/div&gt;&lt;pre style=&quot;background-color: white; color: #333333; font-size: 13px; line-height: 13px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Content-Encoding: gzip&lt;/pre&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Gzip is the most popular and effective compression method at this time. It was developed by the GNU project and standardized by&amp;nbsp;&lt;a href=&quot;http://www.ietf.org/rfc/rfc1952.txt&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;RFC 1952&lt;/a&gt;. The only other compression format you&#39;re likely to see is deflate, but it&#39;s less effective and less popular.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Gzipping generally reduces the response size by about 70%. Approximately 90% of today&#39;s Internet traffic travels through browsers that claim to support gzip. If you use Apache, the module configuring gzip depends on your version: Apache 1.3 uses&amp;nbsp;&lt;a href=&quot;http://sourceforge.net/projects/mod-gzip/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;mod_gzip&lt;/a&gt;&amp;nbsp;while Apache 2.x uses&amp;nbsp;&lt;a href=&quot;http://httpd.apache.org/docs/2.0/mod/mod_deflate.html&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;mod_deflate&lt;/a&gt;.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;There are known issues with browsers and proxies that may cause a mismatch in what the browser expects and what it receives with regard to compressed content. Fortunately, these edge cases are dwindling as the use of older browsers drops off. The Apache modules help out by adding appropriate Vary response headers automatically.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Servers choose what to gzip based on file type, but are typically too limited in what they decide to compress. Most web sites gzip their HTML documents. It&#39;s also worthwhile to gzip your scripts and stylesheets, but many web sites miss this opportunity. In fact, it&#39;s worthwhile to compress any text response including XML and JSON. Image and PDF files should not be gzipped because they are already compressed. Trying to gzip them not only wastes CPU but can potentially increase file sizes.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Gzipping as many file types as possible is an easy way to reduce page weight and accelerate the user experience.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 id=&quot;css_top&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Put Stylesheets at the Top&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: css&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;While researching performance at Yahoo!, we discovered that moving stylesheets to the document HEAD makes pages&amp;nbsp;&lt;em&gt;appear&lt;/em&gt;&amp;nbsp;to be loading faster. This is because putting stylesheets in the HEAD allows the page to render progressively.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Front-end engineers that care about performance want a page to load progressively; that is, we want the browser to display whatever content it has as soon as possible. This is especially important for pages with a lot of content and for users on slower Internet connections. The importance of giving users visual feedback, such as progress indicators, has been well researched and&amp;nbsp;&lt;a href=&quot;http://www.useit.com/papers/responsetime.html&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;documented&lt;/a&gt;. In our case the HTML page is the progress indicator! When the browser loads the page progressively the header, the navigation bar, the logo at the top, etc. all serve as visual feedback for the user who is waiting for the page. This improves the overall user experience.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The problem with putting stylesheets near the bottom of the document is that it prohibits progressive rendering in many browsers, including Internet Explorer. These browsers block rendering to avoid having to redraw elements of the page if their styles change. The user is stuck viewing a blank white page.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The&amp;nbsp;&lt;a href=&quot;http://www.w3.org/TR/html4/struct/links.html#h-12.3&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;HTML specification&lt;/a&gt;&amp;nbsp;clearly states that stylesheets are to be included in the HEAD of the page: &quot;Unlike A, [LINK] may only appear in the HEAD section of a document, although it may appear any number of times.&quot; Neither of the alternatives, the blank white screen or flash of unstyled content, are worth the risk. The optimal solution is to follow the HTML specification and load your stylesheets in the document HEAD.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 id=&quot;js_bottom&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Put Scripts at the Bottom&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: javascript&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The problem caused by scripts is that they block parallel downloads. The&amp;nbsp;&lt;a href=&quot;http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.1.4&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;HTTP/1.1 specification&lt;/a&gt;suggests that browsers download no more than two components in parallel per hostname. If you serve your images from multiple hostnames, you can get more than two downloads to occur in parallel. While a script is downloading, however, the browser won&#39;t start any other downloads, even on different hostnames.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;In some situations it&#39;s not easy to move scripts to the bottom. If, for example, the script uses&lt;code style=&quot;line-height: 13px; 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;document.write&lt;/code&gt;&amp;nbsp;to insert part of the page&#39;s content, it can&#39;t be moved lower in the page. There might also be scoping issues. In many cases, there are ways to workaround these situations.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;An alternative suggestion that often comes up is to use deferred scripts. The&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;DEFER&lt;/code&gt;&amp;nbsp;attribute indicates that the script does not contain document.write, and is a clue to browsers that they can continue rendering. Unfortunately, Firefox doesn&#39;t support the&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;DEFER&lt;/code&gt;&amp;nbsp;attribute. In Internet Explorer, the script may be deferred, but not as much as desired. If a script can be deferred, it can also be moved to the bottom of the page. That will make your web pages load faster.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 id=&quot;css_expressions&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Avoid CSS Expressions&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: css&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;CSS expressions are a powerful (and dangerous) way to set CSS properties dynamically. They were supported in Internet Explorer starting with version 5, but were&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms537634%28VS.85%29.aspx&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;deprecated starting with IE8&lt;/a&gt;. As an example, the background color could be set to alternate every hour using CSS expressions:&lt;/div&gt;&lt;pre style=&quot;background-color: white; color: #333333; font-size: 13px; line-height: 13px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;background-color: expression( (new Date()).getHours()%2 ? &quot;#B8D4FF&quot; : &quot;#F08A00&quot; );&lt;/pre&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;As shown here, the&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;expression&lt;/code&gt;&amp;nbsp;method accepts a JavaScript expression. The CSS property is set to the result of evaluating the JavaScript expression. The&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;expression&lt;/code&gt;&amp;nbsp;method is ignored by other browsers, so it is useful for setting properties in Internet Explorer needed to create a consistent experience across browsers.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The problem with expressions is that they are evaluated more frequently than most people expect. Not only are they evaluated when the page is rendered and resized, but also when the page is scrolled and even when the user moves the mouse over the page. Adding a counter to the CSS expression allows us to keep track of when and how often a CSS expression is evaluated. Moving the mouse around the page can easily generate more than 10,000 evaluations.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;One way to reduce the number of times your CSS expression is evaluated is to use one-time expressions, where the first time the expression is evaluated it sets the style property to an explicit value, which replaces the CSS expression. If the style property must be set dynamically throughout the life of the page, using event handlers instead of CSS expressions is an alternative approach. If you must use CSS expressions, remember that they may be evaluated thousands of times and could affect the performance of your page.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 id=&quot;external&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Make JavaScript and CSS External&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: javascript, css&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Many of these performance rules deal with how external components are managed. However, before these considerations arise you should ask a more basic question: Should JavaScript and CSS be contained in external files, or inlined in the page itself?&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Using external files in the real world generally produces faster pages because the JavaScript and CSS files are cached by the browser. JavaScript and CSS that are inlined in HTML documents get downloaded every time the HTML document is requested. This reduces the number of HTTP requests that are needed, but increases the size of the HTML document. On the other hand, if the JavaScript and CSS are in external files cached by the browser, the size of the HTML document is reduced without increasing the number of HTTP requests.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The key factor, then, is the frequency with which external JavaScript and CSS components are cached relative to the number of HTML documents requested. This factor, although difficult to quantify, can be gauged using various metrics. If users on your site have multiple page views per session and many of your pages re-use the same scripts and stylesheets, there is a greater potential benefit from cached external files.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Many web sites fall in the middle of these metrics. For these sites, the best solution generally is to deploy the JavaScript and CSS as external files. The only exception where inlining is preferable is with home pages, such as&amp;nbsp;&lt;a href=&quot;http://www.yahoo.com/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;Yahoo!&#39;s front page&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;http://my.yahoo.com/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;My Yahoo!&lt;/a&gt;. Home pages that have few (perhaps only one) page view per session may find that inlining JavaScript and CSS results in faster end-user response times.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;For front pages that are typically the first of many page views, there are techniques that leverage the reduction of HTTP requests that inlining provides, as well as the caching benefits achieved through using external files. One such technique is to inline JavaScript and CSS in the front page, but dynamically download the external files after the page has finished loading. Subsequent pages would reference the external files that should already be in the browser&#39;s cache.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 id=&quot;dns_lookups&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Reduce DNS Lookups&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: content&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The Domain Name System (DNS) maps hostnames to IP addresses, just as phonebooks map people&#39;s names to their phone numbers. When you type www.yahoo.com into your browser, a DNS resolver contacted by the browser returns that server&#39;s IP address. DNS has a cost. It typically takes 20-120 milliseconds for DNS to lookup the IP address for a given hostname. The browser can&#39;t download anything from this hostname until the DNS lookup is completed.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;DNS lookups are cached for better performance. This caching can occur on a special caching server, maintained by the user&#39;s ISP or local area network, but there is also caching that occurs on the individual user&#39;s computer. The DNS information remains in the operating system&#39;s DNS cache (the &quot;DNS Client service&quot; on Microsoft Windows). Most browsers have their own caches, separate from the operating system&#39;s cache. As long as the browser keeps a DNS record in its own cache, it doesn&#39;t bother the operating system with a request for the record.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Internet Explorer caches DNS lookups for 30 minutes by default, as specified by the&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;DnsCacheTimeout&lt;/code&gt;registry setting. Firefox caches DNS lookups for 1 minute, controlled by the&lt;code style=&quot;line-height: 13px; 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;network.dnsCacheExpiration&lt;/code&gt;&amp;nbsp;configuration setting. (Fasterfox changes this to 1 hour.)&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;When the client&#39;s DNS cache is empty (for both the browser and the operating system), the number of DNS lookups is equal to the number of unique hostnames in the web page. This includes the hostnames used in the page&#39;s URL, images, script files, stylesheets, Flash objects, etc. Reducing the number of unique hostnames reduces the number of DNS lookups.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Reducing the number of unique hostnames has the potential to reduce the amount of parallel downloading that takes place in the page. Avoiding DNS lookups cuts response times, but reducing parallel downloads may increase response times. My guideline is to split these components across at least two but no more than four hostnames. This results in a good compromise between reducing DNS lookups and allowing a high degree of parallel downloads.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 id=&quot;minify&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Minify JavaScript and CSS&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: javascript, css&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Minification is the practice of removing unnecessary characters from code to reduce its size thereby improving load times. When code is minified all comments are removed, as well as unneeded white space characters (space, newline, and tab). In the case of JavaScript, this improves response time performance because the size of the downloaded file is reduced. Two popular tools for minifying JavaScript code are&lt;a href=&quot;http://crockford.com/javascript/jsmin&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;JSMin&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;http://developer.yahoo.com/yui/compressor/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;YUI Compressor&lt;/a&gt;. The YUI compressor can also minify CSS.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Obfuscation is an alternative optimization that can be applied to source code. It&#39;s more complex than minification and thus more likely to generate bugs as a result of the obfuscation step itself. In a survey of ten top U.S. web sites, minification achieved a 21% size reduction versus 25% for obfuscation. Although obfuscation has a higher size reduction, minifying JavaScript is less risky.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;In addition to minifying external scripts and styles, inlined&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;&amp;lt;script&amp;gt;&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;&amp;lt;style&amp;gt;&lt;/code&gt;&amp;nbsp;blocks can and should also be minified. Even if you gzip your scripts and styles, minifying them will still reduce the size by 5% or more. As the use and size of JavaScript and CSS increases, so will the savings gained by minifying your code.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 id=&quot;redirects&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Avoid Redirects&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: content&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Redirects are accomplished using the 301 and 302 status codes. Here&#39;s an example of the HTTP headers in a 301 response:&lt;/div&gt;&lt;pre style=&quot;background-color: white; color: #333333; font-size: 13px; line-height: 13px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;HTTP/1.1 301 Moved Permanently
      Location: http://example.com/newuri
      Content-Type: text/html&lt;/pre&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The browser automatically takes the user to the URL specified in the&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;Location&lt;/code&gt;&amp;nbsp;field. All the information necessary for a redirect is in the headers. The body of the response is typically empty. Despite their names, neither a 301 nor a 302 response is cached in practice unless additional headers, such as&lt;code style=&quot;line-height: 13px; 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;Expires&lt;/code&gt;&amp;nbsp;or&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;Cache-Control&lt;/code&gt;, indicate it should be. The meta refresh tag and JavaScript are other ways to direct users to a different URL, but if you must do a redirect, the preferred technique is to use the standard 3xx HTTP status codes, primarily to ensure the back button works correctly.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The main thing to remember is that redirects slow down the user experience. Inserting a redirect between the user and the HTML document delays everything in the page since nothing in the page can be rendered and no components can start being downloaded until the HTML document has arrived.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;One of the most wasteful redirects happens frequently and web developers are generally not aware of it. It occurs when a trailing slash (/) is missing from a URL that should otherwise have one. For example, going to&amp;nbsp;&lt;a href=&quot;http://astrology.yahoo.com/astrology&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;http://astrology.yahoo.com/astrology&lt;/a&gt;&amp;nbsp;results in a 301 response containing a redirect to&lt;a href=&quot;http://astrology.yahoo.com/astrology/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;http://astrology.yahoo.com/astrology/&lt;/a&gt;&amp;nbsp;(notice the added trailing slash). This is fixed in Apache by using&lt;code style=&quot;line-height: 13px; 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;Alias&lt;/code&gt;&amp;nbsp;or&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;mod_rewrite&lt;/code&gt;, or the&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;DirectorySlash&lt;/code&gt;&amp;nbsp;directive if you&#39;re using Apache handlers.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Connecting an old web site to a new one is another common use for redirects. Others include connecting different parts of a website and directing the user based on certain conditions (type of browser, type of user account, etc.). Using a redirect to connect two web sites is simple and requires little additional coding. Although using redirects in these situations reduces the complexity for developers, it degrades the user experience. Alternatives for this use of redirects include using&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;Alias&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;mod_rewrite&lt;/code&gt;&amp;nbsp;if the two code paths are hosted on the same server. If a domain name change is the cause of using redirects, an alternative is to create a CNAME (a DNS record that creates an alias pointing from one domain name to another) in combination with&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;Alias&lt;/code&gt;&amp;nbsp;or&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;mod_rewrite&lt;/code&gt;.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 id=&quot;js_dupes&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Remove Duplicate Scripts&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: javascript&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;It hurts performance to include the same JavaScript file twice in one page. This isn&#39;t as unusual as you might think. A review of the ten top U.S. web sites shows that two of them contain a duplicated script. Two main factors increase the odds of a script being duplicated in a single web page: team size and number of scripts. When it does happen, duplicate scripts hurt performance by creating unnecessary HTTP requests and wasted JavaScript execution.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Unnecessary HTTP requests happen in Internet Explorer, but not in Firefox. In Internet Explorer, if an external script is included twice and is not cacheable, it generates two HTTP requests during page loading. Even if the script is cacheable, extra HTTP requests occur when the user reloads the page.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;In addition to generating wasteful HTTP requests, time is wasted evaluating the script multiple times. This redundant JavaScript execution happens in both Firefox and Internet Explorer, regardless of whether the script is cacheable.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;One way to avoid accidentally including the same script twice is to implement a script management module in your templating system. The typical way to include a script is to use the SCRIPT tag in your HTML page.&lt;/div&gt;&lt;pre style=&quot;background-color: white; color: #333333; font-size: 13px; line-height: 13px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;menu_1.0.17.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;An alternative in PHP would be to create a function called&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;insertScript&lt;/code&gt;.&lt;/div&gt;&lt;pre style=&quot;background-color: white; color: #333333; font-size: 13px; line-height: 13px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;?php insertScript(&quot;menu.js&quot;) ?&amp;gt;&lt;/pre&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;In addition to preventing the same script from being inserted multiple times, this function could handle other issues with scripts, such as dependency checking and adding version numbers to script filenames to support far future Expires headers.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 id=&quot;etags&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Configure ETags&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: server&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Entity tags (ETags) are a mechanism that web servers and browsers use to determine whether the component in the browser&#39;s cache matches the one on the origin server. (An &quot;entity&quot; is another word a &quot;component&quot;: images, scripts, stylesheets, etc.) ETags were added to provide a mechanism for validating entities that is more flexible than the last-modified date. An ETag is a string that uniquely identifies a specific version of a component. The only format constraints are that the string be quoted. The origin server specifies the component&#39;s ETag using the&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;ETag&lt;/code&gt;&amp;nbsp;response header.&lt;/div&gt;&lt;pre style=&quot;background-color: white; color: #333333; font-size: 13px; line-height: 13px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;HTTP/1.1 200 OK
      Last-Modified: Tue, 12 Dec 2006 03:03:59 GMT
      ETag: &quot;10c24bc-4ab-457e1c1f&quot;
      Content-Length: 12195&lt;/pre&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Later, if the browser has to validate a component, it uses the&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;If-None-Match&lt;/code&gt;&amp;nbsp;header to pass the ETag back to the origin server. If the ETags match, a 304 status code is returned reducing the response by 12195 bytes for this example.&lt;/div&gt;&lt;pre style=&quot;background-color: white; color: #333333; font-size: 13px; line-height: 13px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;GET /i/yahoo.gif HTTP/1.1
      Host: us.yimg.com
      If-Modified-Since: Tue, 12 Dec 2006 03:03:59 GMT
      If-None-Match: &quot;10c24bc-4ab-457e1c1f&quot;
      HTTP/1.1 304 Not Modified&lt;/pre&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The problem with ETags is that they typically are constructed using attributes that make them unique to a specific server hosting a site. ETags won&#39;t match when a browser gets the original component from one server and later tries to validate that component on a different server, a situation that is all too common on Web sites that use a cluster of servers to handle requests. By default, both Apache and IIS embed data in the ETag that dramatically reduces the odds of the validity test succeeding on web sites with multiple servers.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The ETag format for Apache 1.3 and 2.x is&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;inode-size-timestamp&lt;/code&gt;. Although a given file may reside in the same directory across multiple servers, and have the same file size, permissions, timestamp, etc., its inode is different from one server to the next.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;IIS 5.0 and 6.0 have a similar issue with ETags. The format for ETags on IIS is&lt;code style=&quot;line-height: 13px; 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;Filetimestamp:ChangeNumber&lt;/code&gt;. A&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;ChangeNumber&lt;/code&gt;&amp;nbsp;is a counter used to track configuration changes to IIS. It&#39;s unlikely that the&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;ChangeNumber&lt;/code&gt;&amp;nbsp;is the same across all IIS servers behind a web site.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The end result is ETags generated by Apache and IIS for the exact same component won&#39;t match from one server to another. If the ETags don&#39;t match, the user doesn&#39;t receive the small, fast 304 response that ETags were designed for; instead, they&#39;ll get a normal 200 response along with all the data for the component. If you host your web site on just one server, this isn&#39;t a problem. But if you have multiple servers hosting your web site, and you&#39;re using Apache or IIS with the default ETag configuration, your users are getting slower pages, your servers have a higher load, you&#39;re consuming greater bandwidth, and proxies aren&#39;t caching your content efficiently. Even if your components have a far future&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;Expires&lt;/code&gt;header, a conditional GET request is still made whenever the user hits Reload or Refresh.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;If you&#39;re not taking advantage of the flexible validation model that ETags provide, it&#39;s better to just remove the ETag altogether. The&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;Last-Modified&lt;/code&gt;&amp;nbsp;header validates based on the component&#39;s timestamp. And removing the ETag reduces the size of the HTTP headers in both the response and subsequent requests. This&amp;nbsp;&lt;a href=&quot;http://support.microsoft.com/?id=922733&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;Microsoft Support article&lt;/a&gt;&amp;nbsp;describes how to remove ETags. In Apache, this is done by simply adding the following line to your Apache configuration file:&lt;/div&gt;&lt;pre style=&quot;background-color: white; color: #333333; font-size: 13px; line-height: 13px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;FileETag none&lt;/pre&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 id=&quot;cacheajax&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Make Ajax Cacheable&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: content&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;One of the cited benefits of Ajax is that it provides instantaneous feedback to the user because it requests information asynchronously from the backend web server. However, using Ajax is no guarantee that the user won&#39;t be twiddling his thumbs waiting for those asynchronous JavaScript and XML responses to return. In many applications, whether or not the user is kept waiting depends on how Ajax is used. For example, in a web-based email client the user will be kept waiting for the results of an Ajax request to find all the email messages that match their search criteria. It&#39;s important to remember that &quot;asynchronous&quot; does not imply &quot;instantaneous&quot;.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;To improve performance, it&#39;s important to optimize these Ajax responses. The most important way to improve the performance of Ajax is to make the responses cacheable, as discussed in&amp;nbsp;&lt;a href=&quot;http://developer.yahoo.com/performance/rules.html#expires&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;Add an Expires or a Cache-Control Header&lt;/a&gt;. Some of the other rules also apply to Ajax:&lt;/div&gt;&lt;ul style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px; 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;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://developer.yahoo.com/performance/rules.html#gzip&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;Gzip Components&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://developer.yahoo.com/performance/rules.html#dns_lookups&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;Reduce DNS Lookups&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://developer.yahoo.com/performance/rules.html#minify&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;Minify JavaScript&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://developer.yahoo.com/performance/rules.html#redirects&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;Avoid Redirects&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://developer.yahoo.com/performance/rules.html#etags&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;Configure ETags&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Let&#39;s look at an example. A Web 2.0 email client might use Ajax to download the user&#39;s address book for autocompletion. If the user hasn&#39;t modified her address book since the last time she used the email web app, the previous address book response could be read from cache if that Ajax response was made cacheable with a future Expires or Cache-Control header. The browser must be informed when to use a previously cached address book response versus requesting a new one. This could be done by adding a timestamp to the address book Ajax URL indicating the last time the user modified her address book, for example,&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;&amp;amp;t=1190241612&lt;/code&gt;. If the address book hasn&#39;t been modified since the last download, the timestamp will be the same and the address book will be read from the browser&#39;s cache eliminating an extra HTTP roundtrip. If the user has modified her address book, the timestamp ensures the new URL doesn&#39;t match the cached response, and the browser will request the updated address book entries.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Even though your Ajax responses are created dynamically, and might only be applicable to a single user, they can still be cached. Doing so will make your Web 2.0 apps faster.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 id=&quot;flush&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Flush the Buffer Early&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: server&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;When users request a page, it can take anywhere from 200 to 500ms for the backend server to stitch together the HTML page. During this time, the browser is idle as it waits for the data to arrive. In PHP you have the function&amp;nbsp;&lt;a href=&quot;http://php.net/flush&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;flush()&lt;/a&gt;. It allows you to send your partially ready HTML response to the browser so that the browser can start fetching components while your backend is busy with the rest of the HTML page. The benefit is mainly seen on busy backends or light frontends.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;A good place to consider flushing is right after the HEAD because the HTML for the head is usually easier to produce and it allows you to include any CSS and JavaScript files for the browser to start fetching in parallel while the backend is still processing.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Example:&lt;/div&gt;&lt;pre style=&quot;background-color: white; color: #333333; font-size: 13px; line-height: 13px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;... &amp;lt;!-- css, js --&amp;gt;
    &amp;lt;/head&amp;gt;
    &lt;span class=&quot;hilite&quot; style=&quot;color: red; font-weight: bold;&quot;&gt;&amp;lt;?php flush(); ?&amp;gt;&lt;/span&gt;
    &amp;lt;body&amp;gt;
      ... &amp;lt;!-- content --&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://search.yahoo.com/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;Yahoo! search&lt;/a&gt;&amp;nbsp;pioneered research and real user testing to prove the benefits of using this technique.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 id=&quot;ajax_get&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Use GET for AJAX Requests&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: server&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The&amp;nbsp;&lt;a href=&quot;http://mail.yahoo.com/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;Yahoo! Mail&lt;/a&gt;&amp;nbsp;team found that when using&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;XMLHttpRequest&lt;/code&gt;, POST is implemented in the browsers as a two-step process: sending the headers first, then sending data. So it&#39;s best to use GET, which only takes one TCP packet to send (unless you have a lot of cookies). The maximum URL length in IE is 2K, so if you send more than 2K data you might not be able to use GET.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;An interesting side affect is that POST without actually posting any data behaves like GET. Based on the&lt;a href=&quot;http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;HTTP specs&lt;/a&gt;, GET is meant for retrieving information, so it makes sense (semantically) to use GET when you&#39;re only requesting data, as opposed to sending data to be stored server-side.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 id=&quot;postload&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Post-load Components&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: content&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;You can take a closer look at your page and ask yourself: &quot;What&#39;s absolutely required in order to render the page initially?&quot;. The rest of the content and components can wait.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;JavaScript is an ideal candidate for splitting before and after the onload event. For example if you have JavaScript code and libraries that do drag and drop and animations, those can wait, because dragging elements on the page comes after the initial rendering. Other places to look for candidates for post-loading include hidden content (content that appears after a user action) and images below the fold.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Tools to help you out in your effort:&amp;nbsp;&lt;a href=&quot;http://developer.yahoo.com/yui/imageloader/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;YUI Image Loader&lt;/a&gt;&amp;nbsp;allows you to delay images below the fold and the&lt;a href=&quot;http://developer.yahoo.com/yui/get/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;YUI Get utility&lt;/a&gt;&amp;nbsp;is an easy way to include JS and CSS on the fly. For an example in the wild take a look at&lt;a href=&quot;http://www.yahoo.com/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;Yahoo! Home Page&lt;/a&gt;&amp;nbsp;with Firebug&#39;s Net Panel turned on.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;It&#39;s good when the performance goals are inline with other web development best practices. In this case, the idea of progressive enhancement tells us that JavaScript, when supported, can improve the user experience but you have to make sure the page works even without JavaScript. So after you&#39;ve made sure the page works fine, you can enhance it with some post-loaded scripts that give you more bells and whistles such as drag and drop and animations.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 id=&quot;preload&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Preload Components&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: content&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Preload may look like the opposite of post-load, but it actually has a different goal. By preloading components you can take advantage of the time the browser is idle and request components (like images, styles and scripts) you&#39;ll need in the future. This way when the user visits the next page, you could have most of the components already in the cache and your page will load much faster for the user.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;There are actually several types of preloading:&lt;/div&gt;&lt;ul style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px; 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;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;em&gt;Unconditional&lt;/em&gt;&amp;nbsp;preload - as soon as onload fires, you go ahead and fetch some extra components. Check google.com for an example of how a sprite image is requested onload. This sprite image is not needed on the google.com homepage, but it is needed on the consecutive search result page.&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;em&gt;Conditional&lt;/em&gt;&amp;nbsp;preload - based on a user action you make an educated guess where the user is headed next and preload accordingly. On&amp;nbsp;&lt;a href=&quot;http://search.yahoo.com/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;search.yahoo.com&lt;/a&gt;&amp;nbsp;you can see how some extra components are requested after you start typing in the input box.&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;em&gt;Anticipated&lt;/em&gt;&amp;nbsp;preload - preload in advance before launching a redesign. It often happens after a redesign that you hear: &quot;The new site is cool, but it&#39;s slower than before&quot;. Part of the problem could be that the users were visiting your old site with a full cache, but the new one is always an empty cache experience. You can mitigate this side effect by preloading some components before you even launched the redesign. Your old site can use the time the browser is idle and request images and scripts that will be used by the new site&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 id=&quot;min_dom&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Reduce the Number of DOM Elements&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: content&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;A complex page means more bytes to download and it also means slower DOM access in JavaScript. It makes a difference if you loop through 500 or 5000 DOM elements on the page when you want to add an event handler for example.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;A high number of DOM elements can be a symptom that there&#39;s something that should be improved with the markup of the page without necessarily removing content. Are you using nested tables for layout purposes? Are you throwing in more&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;&amp;lt;div&amp;gt;&lt;/code&gt;s only to fix layout issues? Maybe there&#39;s a better and more semantically correct way to do your markup.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;A great help with layouts are the&amp;nbsp;&lt;a href=&quot;http://developer.yahoo.com/yui/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;YUI CSS utilities&lt;/a&gt;: grids.css can help you with the overall layout, fonts.css and reset.css can help you strip away the browser&#39;s defaults formatting. This is a chance to start fresh and think about your markup, for example use&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;&amp;lt;div&amp;gt;&lt;/code&gt;s only when it makes sense semantically, and not because it renders a new line.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The number of DOM elements is easy to test, just type in Firebug&#39;s console:&lt;br /&gt;
&lt;code style=&quot;line-height: 13px; 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;document.getElementsByTagName(&#39;*&#39;).length&lt;/code&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;And how many DOM elements are too many? Check other similar pages that have good markup. For example the&amp;nbsp;&lt;a href=&quot;http://www.yahoo.com/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;Yahoo! Home Page&lt;/a&gt;&amp;nbsp;is a pretty busy page and still under 700 elements (HTML tags).&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 id=&quot;split&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Split Components Across Domains&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: content&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Splitting components allows you to maximize parallel downloads. Make sure you&#39;re using not more than 2-4 domains because of the DNS lookup penalty. For example, you can host your HTML and dynamic content on&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;www.example.org&lt;/code&gt;&amp;nbsp;and split static components between&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;static1.example.org&lt;/code&gt;&amp;nbsp;and&lt;code style=&quot;line-height: 13px; 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;static2.example.org&lt;/code&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;For more information check &quot;&lt;a href=&quot;http://yuiblog.com/blog/2007/04/11/performance-research-part-4/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;Maximizing Parallel Downloads in the Carpool Lane&lt;/a&gt;&quot; by Tenni Theurer and Patty Chi.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 id=&quot;iframes&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Minimize the Number of iframes&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: content&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Iframes allow an HTML document to be inserted in the parent document. It&#39;s important to understand how iframes work so they can be used effectively.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;code style=&quot;line-height: 13px; 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;&amp;lt;iframe&amp;gt;&lt;/code&gt;&amp;nbsp;pros:&lt;/div&gt;&lt;ul style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px; 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;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Helps with slow third-party content like badges and ads&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Security sandbox&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Download scripts in parallel&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;code style=&quot;line-height: 13px; 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;&amp;lt;iframe&amp;gt;&lt;/code&gt;&amp;nbsp;cons:&lt;/div&gt;&lt;ul style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px; 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;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Costly even if blank&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Blocks page onload&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Non-semantic&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 id=&quot;no404&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;No 404s&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: content&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;HTTP requests are expensive so making an HTTP request and getting a useless response (i.e. 404 Not Found) is totally unnecessary and will slow down the user experience without any benefit.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Some sites have helpful 404s &quot;Did you mean X?&quot;, which is great for the user experience but also wastes server resources (like database, etc). Particularly bad is when the link to an external JavaScript is wrong and the result is a 404. First, this download will block parallel downloads. Next the browser may try to parse the 404 response body as if it were JavaScript code, trying to find something usable in it.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3 id=&quot;cookie_size&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Reduce Cookie Size&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: cookie&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;HTTP cookies are used for a variety of reasons such as authentication and personalization. Information about cookies is exchanged in the HTTP headers between web servers and browsers. It&#39;s important to keep the size of cookies as low as possible to minimize the impact on the user&#39;s response time.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;For more information check&amp;nbsp;&lt;a href=&quot;http://yuiblog.com/blog/2007/03/01/performance-research-part-3/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;&quot;When the Cookie Crumbles&quot;&lt;/a&gt;&amp;nbsp;by Tenni Theurer and Patty Chi. The take-home of this research:&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/div&gt;&lt;ul style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px; 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;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Eliminate unnecessary cookies&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Keep cookie sizes as low as possible to minimize the impact on the user response time&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Be mindful of setting cookies at the appropriate domain level so other sub-domains are not affected&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Set an Expires date appropriately. An earlier Expires date or none removes the cookie sooner, improving the user response time&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/div&gt;&lt;h3 id=&quot;cookie_free&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Use Cookie-free Domains for Components&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: cookie&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;When the browser makes a request for a static image and sends cookies together with the request, the server doesn&#39;t have any use for those cookies. So they only create network traffic for no good reason. You should make sure static components are requested with cookie-free requests. Create a subdomain and host all your static components there.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;If your domain is&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;www.example.org&lt;/code&gt;, you can host your static components on&lt;code style=&quot;line-height: 13px; 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;static.example.org&lt;/code&gt;. However, if you&#39;ve already set cookies on the top-level domain&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;example.org&lt;/code&gt;as opposed to&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;www.example.org&lt;/code&gt;, then all the requests to&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;static.example.org&lt;/code&gt;&amp;nbsp;will include those cookies. In this case, you can buy a whole new domain, host your static components there, and keep this domain cookie-free. Yahoo! uses&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;yimg.com&lt;/code&gt;, YouTube uses&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;ytimg.com&lt;/code&gt;, Amazon uses&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;images-amazon.com&lt;/code&gt;&amp;nbsp;and so on.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Another benefit of hosting static components on a cookie-free domain is that some proxies might refuse to cache the components that are requested with cookies. On a related note, if you wonder if you should use example.org or www.example.org for your home page, consider the cookie impact. Omitting www leaves you no choice but to write cookies to&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;*.example.org&lt;/code&gt;, so for performance reasons it&#39;s best to use the www subdomain and write the cookies to that subdomain.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/div&gt;&lt;h3 id=&quot;dom_access&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Minimize DOM Access&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: javascript&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Accessing DOM elements with JavaScript is slow so in order to have a more responsive page, you should:&lt;/div&gt;&lt;ul style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px; 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;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Cache references to accessed elements&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Update nodes &quot;offline&quot; and then add them to the tree&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Avoid fixing layout with JavaScript&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;For more information check the YUI theatre&#39;s&amp;nbsp;&lt;a href=&quot;http://yuiblog.com/blog/2007/12/20/video-lecomte/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;&quot;High Performance Ajax Applications&quot;&lt;/a&gt;&amp;nbsp;by Julien Lecomte.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/div&gt;&lt;h3 id=&quot;events&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Develop Smart Event Handlers&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: javascript&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Sometimes pages feel less responsive because of too many event handlers attached to different elements of the DOM tree which are then executed too often. That&#39;s why using&amp;nbsp;&lt;em&gt;event delegation&lt;/em&gt;&amp;nbsp;is a good approach. If you have 10 buttons inside a&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;div&lt;/code&gt;, attach only one event handler to the div wrapper, instead of one handler for each button. Events bubble up so you&#39;ll be able to catch the event and figure out which button it originated from.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;You also don&#39;t need to wait for the onload event in order to start doing something with the DOM tree. Often all you need is the element you want to access to be available in the tree. You don&#39;t have to wait for all images to be downloaded.&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;DOMContentLoaded&lt;/code&gt;&amp;nbsp;is the event you might consider using instead of onload, but until it&#39;s available in all browsers, you can use the&amp;nbsp;&lt;a href=&quot;http://developer.yahoo.com/yui/event/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;YUI Event&lt;/a&gt;&amp;nbsp;utility, which has an&lt;code style=&quot;line-height: 13px; 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;a href=&quot;http://developer.yahoo.com/yui/event/#onavailable&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;onAvailable&lt;/a&gt;&lt;/code&gt;&amp;nbsp;method.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;For more information check the YUI theatre&#39;s&amp;nbsp;&lt;a href=&quot;http://yuiblog.com/blog/2007/12/20/video-lecomte/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;&quot;High Performance Ajax Applications&quot;&lt;/a&gt;&amp;nbsp;by Julien Lecomte.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/div&gt;&lt;h3 id=&quot;csslink&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Choose &amp;lt;link&amp;gt; over @import&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: css&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;One of the previous best practices states that CSS should be at the top in order to allow for progressive rendering.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;In IE&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;@import&lt;/code&gt;&amp;nbsp;behaves the same as using&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;&amp;lt;link&amp;gt;&lt;/code&gt;&amp;nbsp;at the bottom of the page, so it&#39;s best not to use it.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/div&gt;&lt;h3 id=&quot;no_filters&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Avoid Filters&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: css&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The IE-proprietary&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;AlphaImageLoader&lt;/code&gt;&amp;nbsp;filter aims to fix a problem with semi-transparent true color PNGs in IE versions &amp;lt; 7. The problem with this filter is that it blocks rendering and freezes the browser while the image is being downloaded. It also increases memory consumption and is applied per element, not per image, so the problem is multiplied.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The best approach is to avoid&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;AlphaImageLoader&lt;/code&gt;&amp;nbsp;completely and use gracefully degrading PNG8 instead, which are fine in IE. If you absolutely need&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;AlphaImageLoader&lt;/code&gt;, use the underscore hack&lt;code style=&quot;line-height: 13px; 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;_filter&lt;/code&gt;&amp;nbsp;as to not penalize your IE7+ users.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/div&gt;&lt;h3 id=&quot;opt_images&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Optimize Images&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: images&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;After a designer is done with creating the images for your web page, there are still some things you can try before you FTP those images to your web server.&lt;/div&gt;&lt;ul style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px; 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;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;You can check the GIFs and see if they are using a palette size corresponding to the number of colors in the image. Using&amp;nbsp;&lt;a href=&quot;http://www.imagemagick.org/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;imagemagick&lt;/a&gt;&amp;nbsp;it&#39;s easy to check using&lt;br /&gt;
&lt;code style=&quot;line-height: 13px; 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;identify -verbose image.gif&lt;/code&gt;&lt;br /&gt;
When you see an image useing 4 colors and a 256 color &quot;slots&quot; in the palette, there is room for improvement.&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Try converting GIFs to PNGs and see if there is a saving. More often than not, there is. Developers often hesitate to use PNGs due to the limited support in browsers, but this is now a thing of the past. The only real problem is alpha-transparency in true color PNGs, but then again, GIFs are not true color and don&#39;t support variable transparency either. So anything a GIF can do, a palette PNG (PNG8) can do too (except for animations). This simple imagemagick command results in totally safe-to-use PNGs:&lt;br /&gt;
&lt;code style=&quot;line-height: 13px; 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;convert image.gif image.png&lt;/code&gt;&lt;br /&gt;
&quot;All we are saying is: Give PiNG a Chance!&quot;&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Run&amp;nbsp;&lt;a href=&quot;http://pmt.sourceforge.net/pngcrush/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;pngcrush&lt;/a&gt;&amp;nbsp;(or any other PNG optimizer tool) on all your PNGs. Example:&lt;br /&gt;
&lt;code style=&quot;line-height: 13px; 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;pngcrush image.png -rem alla -reduce -brute result.png&lt;/code&gt;&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Run jpegtran on all your JPEGs. This tool does lossless JPEG operations such as rotation and can also be used to optimize and remove comments and other useless information (such as EXIF information) from your images.&lt;br /&gt;
&lt;code style=&quot;line-height: 13px; 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;jpegtran -copy none -optimize -perfect src.jpg dest.jpg&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/div&gt;&lt;h3 id=&quot;opt_sprites&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Optimize CSS Sprites&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: images&lt;/div&gt;&lt;ul style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px; 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;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Arranging the images in the sprite horizontally as opposed to vertically usually results in a smaller file size.&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Combining similar colors in a sprite helps you keep the color count low, ideally under 256 colors so to fit in a PNG8.&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;Be mobile-friendly&quot; and don&#39;t leave big gaps between the images in a sprite. This doesn&#39;t affect the file size as much but requires less memory for the user agent to decompress the image into a pixel map. 100x100 image is 10 thousand pixels, where 1000x1000 is 1 million pixels&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/div&gt;&lt;h3 id=&quot;no_scale&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Don&#39;t Scale Images in HTML&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: images&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Don&#39;t use a bigger image than you need just because you can set the width and height in HTML. If you need&lt;br /&gt;
&lt;code style=&quot;line-height: 13px; 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;&amp;lt;img width=&quot;100&quot; height=&quot;100&quot; src=&quot;mycat.jpg&quot; alt=&quot;My Cat&quot; /&amp;gt;&lt;/code&gt;&lt;br /&gt;
then your image (mycat.jpg) should be 100x100px rather than a scaled down 500x500px image.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/div&gt;&lt;h3 id=&quot;favicon&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Make favicon.ico Small and Cacheable&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: images&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The favicon.ico is an image that stays in the root of your server. It&#39;s a necessary evil because even if you don&#39;t care about it the browser will still request it, so it&#39;s better not to respond with a&amp;nbsp;&lt;code style=&quot;line-height: 13px; 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;404 Not Found&lt;/code&gt;. Also since it&#39;s on the same server, cookies are sent every time it&#39;s requested. This image also interferes with the download sequence, for example in IE when you request extra components in the onload, the favicon will be downloaded before these extra components.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;So to mitigate the drawbacks of having a favicon.ico make sure:&lt;/div&gt;&lt;ul style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px; 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;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;It&#39;s small, preferably under 1K.&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Set Expires header with what you feel comfortable (since you cannot rename it if you decide to change it). You can probably safely set the Expires header a few months in the future. You can check the last modified date of your current favicon.ico to make an informed decision.&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://www.imagemagick.org/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;Imagemagick&lt;/a&gt;&amp;nbsp;can help you create small favicons&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/div&gt;&lt;h3 id=&quot;under25&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Keep Components under 25K&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: mobile&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;This restriction is related to the fact that iPhone won&#39;t cache components bigger than 25K. Note that this is the&amp;nbsp;&lt;em&gt;uncompressed&lt;/em&gt;&amp;nbsp;size. This is where minification is important because gzip alone may not be sufficient.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;For more information check &quot;&lt;a href=&quot;http://yuiblog.com/blog/2008/02/06/iphone-cacheability/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;Performance Research, Part 5: iPhone Cacheability - Making it Stick&lt;/a&gt;&quot; by Wayne Shea and Tenni Theurer.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/div&gt;&lt;h3 id=&quot;multipart&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Pack Components into a Multipart Document&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: mobile&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Packing components into a multipart document is like an email with attachments, it helps you fetch several components with one HTTP request (remember: HTTP requests are expensive). When you use this technique, first check if the user agent supports it (iPhone does not).&lt;/div&gt;&lt;h3 id=&quot;emptysrc&quot; style=&quot;background-color: white; color: #7b0099; font-family: arial, helvetica, clean, sans-serif; font-size: 21px; font-weight: normal; margin-bottom: 0.4em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Avoid Empty Image src&lt;/h3&gt;&lt;div class=&quot;date&quot; style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tag: server&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Image with empty string&amp;nbsp;&lt;b&gt;src&lt;/b&gt;&amp;nbsp;attribute occurs more than one will expect. It appears in two form:&lt;/div&gt;&lt;ol style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 0px; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;li style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;straight HTML&lt;br /&gt;
&lt;blockquote style=&quot;margin-bottom: 1em; margin-left: 2em; margin-right: 2em; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;img src=&quot;&quot;&amp;gt;&lt;/blockquote&gt;&lt;/li&gt;
&lt;li style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;JavaScript&lt;br /&gt;
&lt;blockquote style=&quot;margin-bottom: 1em; margin-left: 2em; margin-right: 2em; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;var img = new Image();&lt;br /&gt;
img.src = &quot;&quot;;&lt;/blockquote&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Both forms cause the same effect: browser makes another request to your server.&lt;/div&gt;&lt;ul style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px; 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;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;b&gt;Internet Explorer&lt;/b&gt;&amp;nbsp;makes a request to the directory in which the page is located.&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;b&gt;Safari and Chrome&lt;/b&gt;&amp;nbsp;make a request to the actual page itself.&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;b&gt;Firefox&lt;/b&gt;&amp;nbsp;3 and earlier versions behave the same as Safari and Chrome, but version 3.5 addressed this issue&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=444931&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;[bug 444931]&lt;/a&gt;&amp;nbsp;and no longer sends a request.&lt;/li&gt;
&lt;li class=&quot;bullist&quot; style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.3em; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;b&gt;Opera&lt;/b&gt;&amp;nbsp;does not do anything when an empty image src is encountered.&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;b&gt;Why is this behavior bad?&lt;/b&gt;&lt;/div&gt;&lt;ol style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 0px; margin-left: 2em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;li style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Cripple your servers by sending a large amount of unexpected traffic, especially for pages that get millions of page views per day.&lt;/li&gt;
&lt;li style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Waste server computing cycles generating a page that will never be viewed.&lt;/li&gt;
&lt;li style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Possibly corrupt user data. If you are tracking state in the request, either by cookies or in another way, you have the possibility of destroying data. Even though the image request does not return an image, all of the headers are read and accepted by the browser, including all cookies. While the rest of the response is thrown away, the damage may already be done.&lt;/li&gt;
&lt;/ol&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The root cause of this behavior is the way that URI resolution is performed in browsers. This behavior is defined in RFC 3986 - Uniform Resource Identifiers. When an empty string is encountered as a URI, it is considered a relative URI and is resolved according to the algorithm defined in section 5.2. This specific example, an empty string, is listed in section 5.4. Firefox, Safari, and Chrome are all resolving an empty string correctly per the specification, while Internet Explorer is resolving it incorrectly, apparently in line with an earlier version of the specification, RFC 2396 - Uniform Resource Identifiers (this was obsoleted by RFC 3986). So technically, the browsers are doing what they are supposed to do to resolve relative URIs. The problem is that in this context, the empty string is clearly unintentional.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;HTML5 adds to the description of the&amp;nbsp;&lt;img style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; /&gt;&amp;nbsp;tag&#39;s src attribute to instruct browsers not to make an additional request in section 4.8.2:&lt;/div&gt;&lt;blockquote style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 1em; margin-left: 2em; margin-right: 2em; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The src attribute must be present, and must contain a valid URL referencing a non-interactive, optionally animated, image resource that is neither paged nor scripted. If the base URI of the element is the same as the document&#39;s address, then the src attribute&#39;s value must not be the empty string.&lt;/blockquote&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 16px;&quot;&gt;Hopefully, browsers will not have this problem in the future. Unfortunately, there is no such clause for &amp;lt;script src=&quot;&quot;&amp;gt; and &amp;lt;link href=&quot;&quot;&amp;gt;. Maybe there is still time to make that adjustment to ensure browsers don&#39;t accidentally implement this behavior.&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;This rule was inspired by Yahoo!&#39;s JavaScript guru Nicolas C. Zakas. For more information check out his article &quot;&lt;a href=&quot;http://www.nczonline.net/blog/2009/11/30/empty-image-src-can-destroy-your-site/&quot; style=&quot;color: #16387c; text-decoration: none;&quot;&gt;Empty image src can destroy your site&lt;/a&gt;&quot;.&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #333333; font-family: arial, helvetica, clean, sans-serif; font-size: 13px; line-height: 1.49em; padding-bottom: 1em; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://problemssolvehere.blogspot.com/feeds/7015177479897795466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://problemssolvehere.blogspot.com/2011/12/best-practices-for-speeding-up-your-web.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/7015177479897795466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/7015177479897795466'/><link rel='alternate' type='text/html' href='http://problemssolvehere.blogspot.com/2011/12/best-practices-for-speeding-up-your-web.html' title='Best Practices for Speeding Up Your Web Site'/><author><name>Kanhaiya Lal</name><uri>http://www.blogger.com/profile/17729850042667687272</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-7523470230003836388.post-986975312030180693</id><published>2011-10-18T01:38:00.000+05:30</published><updated>2011-10-18T01:38:43.855+05:30</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;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-size: x-large;&quot;&gt;&lt;u&gt;Increment(++) and Decrement Operators(--)&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;C,Java and many other languages provide operators:&lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;these two&amp;nbsp;operators are also belong to them&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-size: large;&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: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;1. auto increment&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;operators.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6; font-size: large;&quot;&gt;2. auto&amp;nbsp;decrement&amp;nbsp;operators.&lt;/span&gt;&lt;/div&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;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp;In their simplest forms, they look like this:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #783f04;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt; ++i add 1 to i&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt; --j subtract 1 from j&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;These correspond to the slightly longer i += 1 and j -= 1, respectively, and also to the fully ``longhand&#39;&#39; forms i = i + 1 and j = j - 1.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&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;color: #0b5394;&quot;&gt;The ++ and -- operators apply to one operand (they&#39;re unary operators).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt; The expression ++i adds 1 to i, and stores the incremented result back in i.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;This means &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;that these operators don&#39;t just compute new values; they also modify the value of some variable. &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;These operators are unique in that they can appear both in postfix form, where they follow the operand as just shown:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&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;nbsp;i++&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;i--&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt; and prefix form, where they precede the operand:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --i&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;++i&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Example with&amp;nbsp;explanation:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;When the increment and decrement operators are part of a larger expression, then a subtle, yet powerful, difference between these two forms appears.&lt;/span&gt;&lt;br /&gt;
&lt;br /&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;color: purple;&quot;&gt;&lt;b&gt;In the prefix form,&lt;/b&gt;&lt;/span&gt; the operand is incremented or decremented before the value is obtained for use in the expression:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-size: large;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (Modify then change)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt; For example:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; x = 10;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;y = ++x;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;In this case, y is set to 11 as you would expect, because the increment occurs before x is assigned to y.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;thus, the line y=++x; is the equivalent of these two statements:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;              x=10;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;y=x+1;&lt;/span&gt;&lt;br /&gt;
---------------------------------------------------------------------------------------------------------&lt;/div&gt;&lt;div&gt;---------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&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;color: purple;&quot;&gt;&lt;b&gt;In postfix form,&lt;/b&gt;&lt;/span&gt; the previous value is obtained for use in the expression, and then the operand is modified:&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;color: lime; font-size: x-large;&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;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (Change then Modify)&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&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-size: large;&quot;&gt;For example:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; x = 10;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; y = x++;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;The value of x is obtained before the increment operator is executed, so the value of y is 10.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Here, the line y = x++; is the equivalent of these two statements:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;y =x;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; x = x + 1;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; Of course, in both cases x is set to 11.&lt;/span&gt;&lt;/div&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;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Example:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&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: #0b5394; font-size: large;&quot;&gt;//Prefix increment&amp;nbsp;decrement&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&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: #0b5394; font-size: large;&quot;&gt;#include&amp;lt;Stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;#include&amp;lt;conio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;void main()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int i,d,inc,dec;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;inc=10;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dec=20;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&quot;Initial value:\nInc=%d\n Dec=%d&quot;,inc,dec); &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //prefix&amp;nbsp;operation:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;i=++inc;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;d=--dec; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small;&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&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: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;printf(&quot;\n\nAfter Prefix operation value:\n i=%d\n d=%d&quot;,i,d); &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&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: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;printf(&quot;\n\n Prefix operation value:\nInc=%d\n Dec=%d&quot;,inc,dec); &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&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: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;getch();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&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: #990000; font-size: large;&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: #990000; font-size: large;&quot;&gt;Result :&lt;/span&gt;&lt;/div&gt;&lt;div&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;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Initial value:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&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;color: #990000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Inc=10&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&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;color: #990000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dec=20&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&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;color: #990000;&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;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;After Prefix operation value:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&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;color: #990000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i=11&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&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;color: #990000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; d=19&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&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;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Prefix operation value:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Inc=11&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dec=19&lt;/span&gt;&lt;/div&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;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;--------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small;&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;//Postfix increment&amp;nbsp;decrement&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&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: #0b5394; font-size: large;&quot;&gt;#include&amp;lt;Stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;#include&amp;lt;conio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;void main()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int i,d,inc,dec;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;inc=10;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dec=20;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&quot;Initial value:\n inc=%d\n dec=%d&quot;,inc,dec); &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; //postfix&amp;nbsp;operation:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;i=inc++;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;d=dec--; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf(&quot;After Postfix operation value:\n i=%d\n d=%d&quot;,i,d); &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;printf(&quot; \n\nPostfix operation value:\n inc=%d\n dec=%d&quot;,inc,dec); &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: small;&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;getch();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: large;&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: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;div style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Result :&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Initial value:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;inc=10&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dec=20&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;After Prefix operation value:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;i=10&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;div style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;d=20&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Postfix operation value:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;inc=11&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dec=19&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394; font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://problemssolvehere.blogspot.com/feeds/986975312030180693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://problemssolvehere.blogspot.com/2011/10/increment-and-decrement-operators-cjava.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/986975312030180693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/986975312030180693'/><link rel='alternate' type='text/html' href='http://problemssolvehere.blogspot.com/2011/10/increment-and-decrement-operators-cjava.html' title=''/><author><name>Kanhaiya Lal</name><uri>http://www.blogger.com/profile/17729850042667687272</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-7523470230003836388.post-5457392024434866963</id><published>2011-10-09T13:48:00.000+05:30</published><updated>2011-10-09T13:49:59.992+05:30</updated><title type='text'>Why we use Static Keyword in JAVA</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: large;&quot;&gt;The static keyword  can be used in 3 scenarios&lt;br /&gt;
&lt;br /&gt;
1) static variables&lt;br /&gt;
2) static methods&lt;br /&gt;
3) static blocks of code.&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Static Variable:&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;font-size: large;&quot;&gt;It is a variable which belongs to the class and not to object(instance).&amp;nbsp;Static variables are initialized only once, at the start of the execution. These variables will be initialized first, before the initialization of any instance variables.&amp;nbsp;A single copy to be shared by all instances of the class.&amp;nbsp;A static variable can be accessed directly by the class name and doesn’t need any object.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: blue;&quot;&gt;Syntax : &amp;lt;class-name&amp;gt;.&amp;lt;variable-name&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Static Method:&lt;/span&gt;It is a method which belongs to the class and not to the object(instance).A static method can access only static data. It can not access non-static data (instance variables). A static method can  call only  other static methods and can not call a non-static method from it.&amp;nbsp;A static method  can be accessed directly by the class name and doesn’t need any object.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;Syntax : &amp;lt;class-name&amp;gt;.&amp;lt;method-name&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&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;background-color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;A static method cannot refer to &quot;this&quot; or &quot;super&quot;  keywords in anyway.&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Note:&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: large;&quot;&gt; Main method is static , since it must &amp;nbsp;be accessible for an application to run , before any instantiation takes place.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: large;&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: blue; font-size: large;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&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;background-color: white; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; line-height: 14px;&quot;&gt;class Student {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&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;background-color: white; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; line-height: 14px;&quot;&gt;&lt;br /&gt;
int a;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&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;background-color: white; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; line-height: 14px;&quot;&gt;&lt;br /&gt;
static int b;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&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;background-color: white; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; line-height: 14px;&quot;&gt;&lt;br /&gt;
Student()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&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;background-color: white; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; line-height: 14px;&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-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; line-height: 14px;&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-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; line-height: 14px;&quot;&gt;&lt;br /&gt;
b++;&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-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; line-height: 14px;&quot;&gt;}&lt;br /&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-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; line-height: 14px;&quot;&gt;public void showData(){&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-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; line-height: 14px;&quot;&gt;System.out.println(&quot;Value of a = &quot;+a);&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-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; line-height: 14px;&quot;&gt;System.out.println(&quot;Value of b = &quot;+b);&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-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; line-height: 14px;&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-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; line-height: 14px;&quot;&gt;}&lt;br /&gt;
&lt;br /&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-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; line-height: 14px;&quot;&gt;class Demo{&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-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; line-height: 14px;&quot;&gt;public static void main(String args[]){&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-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; line-height: 14px;&quot;&gt;Student s1 = new Student();&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-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; line-height: 14px;&quot;&gt;s1.showData();&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-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; line-height: 14px;&quot;&gt;Student s2 = new Student();&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-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; line-height: 14px;&quot;&gt;s2.showData();&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-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; line-height: 14px;&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-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; line-height: 14px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&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: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&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: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #efefdd; color: #686362; font-family: Geneva, &#39;Trebuchet MS&#39;, Lucida, Arial, sans-serif; font-size: 12px; line-height: 15px;&quot;&gt;&lt;img alt=&quot;java-static-variable&quot; height=&quot;96&quot; src=&quot;http://www.javatutorialhub.com/images/stories/java-static-variable.jpg&quot; width=&quot;221&quot; /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #686362; font-family: Geneva, &#39;Trebuchet MS&#39;, Lucida, Arial, sans-serif; font-size: 12px; line-height: 15px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-size: large;&quot;&gt;Following diagram shows &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-size: large;&quot;&gt;, how reference variables &amp;amp; objects are created and static variables are accessed &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-size: large;&quot;&gt;by the different instances.&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #686362; font-family: Geneva, &#39;Trebuchet MS&#39;, Lucida, Arial, sans-serif; font-size: 12px; line-height: 15px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;img alt=&quot;java-static&quot; height=&quot;380&quot; src=&quot;http://www.javatutorialhub.com/images/stories/static.jpg&quot; width=&quot;614&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-size: large;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-size: large;&quot;&gt;Static Block&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-size: large;&quot;&gt;&lt;br /&gt;
The static block, is a block of statement inside a Java class that will be executed when a class is first loaded in to the JVM&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #686362; font-family: Geneva, &#39;Trebuchet MS&#39;, Lucida, Arial, sans-serif; line-height: 15px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-size: large;&quot;&gt;class Test{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #686362; font-family: Geneva, &#39;Trebuchet MS&#39;, Lucida, Arial, sans-serif; line-height: 15px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: #339966;&quot;&gt;&lt;span style=&quot;font-family: tahoma, arial, helvetica, sans-serif;&quot;&gt;&amp;nbsp;static {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #686362; font-family: Geneva, &#39;Trebuchet MS&#39;, Lucida, Arial, sans-serif; line-height: 15px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;color: #339966;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: tahoma, arial, helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Code goes here&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #686362; font-family: Geneva, &#39;Trebuchet MS&#39;, Lucida, Arial, sans-serif; line-height: 15px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;color: #339966;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: tahoma, arial, helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre style=&quot;color: #686362; font-family: Geneva, &#39;Trebuchet MS&#39;, Lucida, Arial, sans-serif; line-height: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
A static block helps to initialize the static data members, just like constructors help to initialize instance members&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #686362; font-family: Geneva, &#39;Trebuchet MS&#39;, Lucida, Arial, sans-serif; line-height: 15px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://problemssolvehere.blogspot.com/feeds/5457392024434866963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://problemssolvehere.blogspot.com/2011/10/static-keyword-can-be-used-in-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/5457392024434866963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/5457392024434866963'/><link rel='alternate' type='text/html' href='http://problemssolvehere.blogspot.com/2011/10/static-keyword-can-be-used-in-3.html' title='Why we use Static Keyword in JAVA'/><author><name>Kanhaiya Lal</name><uri>http://www.blogger.com/profile/17729850042667687272</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-7523470230003836388.post-6888895109104564113</id><published>2011-10-02T02:25:00.000+05:30</published><updated>2011-10-02T02:25:41.048+05:30</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 class=&quot;Apple-style-span&quot; style=&quot;color: red; font-size: x-large;&quot;&gt;&lt;b&gt;C /C++ Questions&lt;/b&gt;&lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-size: x-large;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;1. Write a c program without using any semicolon which output will : Hello word.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;div&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;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&amp;nbsp;&lt;u class=&quot;show1&quot; style=&quot;color: maroon; cursor: pointer; font-weight: 900;&quot;&gt;Answer&lt;/u&gt;&lt;br /&gt;
&lt;div class=&quot;explanation1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; display: block;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: x-large; line-height: 33px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt; line-height: 21px;&quot;&gt;Solution: 1&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: x-large; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: x-large; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;if&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;Hello world&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;)){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: x-large; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: x-large; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: x-large; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: x-large; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Solution: 2&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: x-large; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: x-large; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: x-large; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;while&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(!printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;Hello world&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;)){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: x-large; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: x-large; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: x-large; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: x-large; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Solution: 3&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: x-large; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: x-large; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: x-large; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;switch&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;Hello world&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;)){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: x-large; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: x-large; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;2.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 19px; line-height: 21px;&quot;&gt;What is dangling pointer in c?&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 19px; line-height: 21px;&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;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&lt;u class=&quot;show3&quot; style=&quot;color: maroon; cursor: pointer; font-weight: 900;&quot;&gt;Answer&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;explanation3&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; display: block;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;If any pointer is pointing the memory address of any variable but after some variable has deleted from that memory location&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;while&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;pointer is still pointing such memory location. Such pointer is known as dangling pointer and this problem is known as dangling pointer problem.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Initially:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 19px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0000ee; font-family: Georgia; font-size: 16px;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5358002845549051250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU-r_r_zwe8uLIMUmORea9rA4wLKkIYdRiQnTqVPJvIt_qpSarPYrhtG9t2gypZaDGZ-gcTdtbarJIbRycqnfY_8Cx6a6i3yuJhvWADxeMrEJeUIGDN_LyFoUqxOqUvd5SjqCG4dmfoS4/s400/Concept8.jpeg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(238, 238, 238); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(238, 238, 238); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(238, 238, 238); border-top-style: solid; border-top-width: 1px; box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; cursor: pointer; display: block; height: 170px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: center; width: 393px;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 19px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Later:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0000ee; font-family: Georgia; font-size: 16px;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5358002849661349026&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-Js7-FTtsV9ZmZInFx3oa5wepnzWuQzDACMYQa3l7O6mDCJSvrtH09KWgQv_7-lljxYIuUFq9wEiWacp-GrROesqlU16Xt7TMvK9AmkyoryaykKdAyKhViMOzCWvLht23VWQkF6NawxY/s400/Concept9.jpeg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(238, 238, 238); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(238, 238, 238); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(238, 238, 238); border-top-style: solid; border-top-width: 1px; box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; cursor: pointer; display: block; height: 202px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: center; width: 400px;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;color: #339966; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;For example:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;color: #339966; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;color: #339966; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: maroon; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(q)What will be output of following c program?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #339966; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: maroon; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;*&lt;b&gt;call&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;();&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;*ptr;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;ptr=call();&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;clrscr();&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,*ptr);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;*&amp;nbsp;&lt;b&gt;call&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;x=25;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;++x;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;return&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;amp;x;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Output:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Garbage value&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Explanation:&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;variable x is local variable. Its scope and lifetime is within the function call hence after returning address of x variable x became dead and pointer is still pointing ptr is still pointing to that location.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Solution of this problem:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;Make the variable x is as static variable.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div _moz-userdefined=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;In other word we can say a pointer whose pointing object has been deleted is called dangling pointer.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #222222;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&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: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;3.&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 19px; line-height: 20px;&quot;&gt;Why we use do-while loop in c? Also tell any properties which you know ?&amp;nbsp;&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;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; line-height: 21px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;u class=&quot;show8&quot; style=&quot;color: maroon; cursor: pointer; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; font-weight: 900;&quot;&gt;Answer&lt;/u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: maroon; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: 900; letter-spacing: 5px;&quot;&gt;&lt;u style=&quot;color: maroon; cursor: pointer; font-weight: 900;&quot;&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;explanation8&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; display: block;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;It is also called as post tested loop. It is used when it is necessary to execute the loop at least one time.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Syntax:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;do {&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; margin-left: 0.25in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Loop body&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;} while (Expression);&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; margin-left: 0.25in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;num,i=0;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; clrscr();&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;do&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;To enter press 1\n&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;To exit press&amp;nbsp; 2&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scanf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,&amp;amp;num);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ++i;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;switch&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(num){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&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;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;case&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;1:printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;You are welcome\n&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;);&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;break&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&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;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;default&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;: exit(0);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;while&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(i&amp;lt;=10);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; getch();&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Output: 3 3 4 4&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;If there is only one statement in the loop body then braces is optional. For example:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(a)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; line-height: 21px;&quot;&gt;&lt;div class=&quot;explanation8&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; display: block;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #222222; font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;double&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;i=5.5678;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; clrscr();&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;do&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;hi&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;while&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(!i);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; getch();&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Output: 3 3 4 4&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(b)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;main(){&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; line-height: 21px;&quot;&gt;&lt;div class=&quot;explanation8&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; display: block;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #222222; font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;double&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;i=5.63333;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; clrscr();&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;do&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;hi&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;while&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(!i);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; getch();&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Output: hi&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(c)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;x=25,y=1;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;do&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;if&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(x&amp;gt;5)&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot; ONE&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;else&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;if&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(x&amp;gt;10)&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot; TWO&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;else&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;if&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(x==25)&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot; THREE&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;else&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot; FOUR&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;while&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(y--);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; getch();&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Output: ONE ONE&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&lt;div class=&quot;explanation3&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; display: block;&quot;&gt;&lt;div style=&quot;color: #222222;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #222222;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #222222;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #222222;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&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: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;4.&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 19px;&quot;&gt;Why we use static variable in c? Tell me all properties of static variables which you know?&amp;nbsp;&lt;/span&gt;&amp;nbsp;&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;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;u class=&quot;show9&quot; style=&quot;color: maroon; cursor: pointer; font-weight: 900;&quot;&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; line-height: 18px;&quot;&gt;&lt;u class=&quot;show9&quot; style=&quot;color: maroon; cursor: pointer; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-weight: 900;&quot;&gt;Answer&lt;/u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: maroon; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: 900; letter-spacing: 5px;&quot;&gt;&lt;u style=&quot;color: maroon; cursor: pointer; font-weight: 900;&quot;&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;explanation9&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; display: block;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Keyword static is used for declaring static variables in c. This modifier is used with all data types like int, float, double, array, pointer, structure, function etc.&lt;b&gt;&lt;span style=&quot;color: #008e00;&quot;&gt;Important points about static keyword:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;1. It is&amp;nbsp;&lt;b&gt;not&lt;/b&gt;&amp;nbsp;default storage class of global variables. For example, analyze the following three programs and its output.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(a)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;a;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,a);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;return&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;0;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Output: 0&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(b)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;a;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,a);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;return&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;0;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Output: 0&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(c)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;extern&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;a;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,a);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;return&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;0;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Output: Compilation error&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;At first glance if you will observe the output of above three codes you can say default storage class of global variable is static. But it is not true. Why? Read extern storage class.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;2. Default initial value of static integral type variables are zero otherwise null. For example:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;char&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;c;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;i;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;float&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;f;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;char&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;*str;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d %d %f %s&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,c,i,f,str);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;return&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;0;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Output: 0 0 0.000000 (null)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;3. A same static variable can be declared many times but we can initialize at only one time. For example:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(a)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;i;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//Declaring the variable i.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;i=25;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//Initializing the variable.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;i;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//Again declaring the variable i.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;i;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//Again declaring the variable i.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,i);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;return&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;0;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Output: 25&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(b)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;i;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//Declaring the variable&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;i=25;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//Initializing the variable&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,i);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;return&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;0;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;i=20;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//Again initializing the variable&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Output: Compilation error: Multiple initialization variable i.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: #222222; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;4. We cannot write any assignment statement globally. For example:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;color: #222222; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;color: #222222; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;i=10;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//Initialization statement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;i=25;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//Assignment statement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,i);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;return&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;0;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&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;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Output: Compilation error&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #008e00; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Note:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;Assigning any value to the variable at the time of declaration is known as initialization while assigning any value to variable not at the time of declaration is known assignment.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(b)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;i=10;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; i=25;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//Assignment statement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,i);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;return&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;0;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Output: 25&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(5) A static variable initializes only one time in whole program. For example:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;i=10;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; i=5;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;for&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(i=0;i&amp;lt;5;i++){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;a=10;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//This statement will execute&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//only time.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,a++);&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//This statement will execute&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//five times.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;return&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;0;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Output: 10 11 12 13 14&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(6)If we declared static variable locally then its visibility will within a block where it has declared. For example:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(){&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;a=5;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,a);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//printf(&quot;%d&quot;,a);&amp;nbsp;&amp;nbsp; variable a is not visible here.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;return&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Output: 5&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;7. If declared a static variable or function globally then its visibility will only the file in which it has declared not in the other files. For example:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(a)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;float&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;a=144.0f;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//global to all function&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,a);&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//variable a is visible here.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//printf(&quot;%d&quot;,b); variable b is not visible here.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,a);&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//variable a is visible here.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//printf(&quot;%d&quot;,b);&amp;nbsp;&amp;nbsp;&amp;nbsp; variable b is not visible here.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;return&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;0;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;b=5;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//Global to only calculation function&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;calculation&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,a);&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//variable a is visible here.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,b);&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//variable b is visible here.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(b) Consider a c program which has written in two files named as one.c and two.c:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//one.c&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;lt;conio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;i=25;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;j=5;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; clrscr();&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum();&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; getch();&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//two.c&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;extern&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;i;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//Declaration of variable i.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;extern&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;j;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//Declaration of variable j.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;/**&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Above two lines will search the initialization statement of variable i and j either in two.c (if initialized variable is static or extern) or one.c (if initialized variable is extern)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;*/&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;extern&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;sum&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;s;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; s=i+j;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,s);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Compile and execute above two file one.c and two.c at the same time:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #008e00; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;In Turbo c compiler&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Step 1: Write above two codes in the file named as one.c and two.c (You can give any name as you like) and save it.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Step 2: In Turbo c++ IDE click on&amp;nbsp;&lt;b&gt;Project -&amp;gt; Open project&lt;/b&gt;menu as shown in following screen dump.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: large;&quot;&gt;&lt;span style=&quot;font-size: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #222222; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7KDUeUTbsUm6ZAJlHeVeNKRnB3d3_UWErRKZRQTMXBzx5NUKW9JM0FGQz2CCb7X9PDbxww5HfPM1sc_HhadzjIXONohj5MWfEXhDZ0llD0IgLgysCcsgxRCn3jBSSoQ_Qd1EszH6LIJYk/s1600-h/e1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;color: #2288bb; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7KDUeUTbsUm6ZAJlHeVeNKRnB3d3_UWErRKZRQTMXBzx5NUKW9JM0FGQz2CCb7X9PDbxww5HfPM1sc_HhadzjIXONohj5MWfEXhDZ0llD0IgLgysCcsgxRCn3jBSSoQ_Qd1EszH6LIJYk/s400/e1.JPG&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(238, 238, 238); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(238, 238, 238); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(238, 238, 238); border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; position: relative;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: large;&quot;&gt;&lt;span style=&quot;font-size: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: large;&quot;&gt;&lt;span style=&quot;font-size: 19px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: large;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: large;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: large;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: large;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Step 3: After Clicking on open project you will get following screen:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #222222; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3LwxEObR_ltwTmAVfyc2vst1HqvzD7d_xeDXEmzZZoir45ZwyPOfrcy7r4tUwTpvgw0_ToPjvDej7LUOw7K2hidE0VQiWSn93EN59F9O0Hmb2LARC2Wt47kAXsivLmCsETjYGBaannl_6/s1600-h/e2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;color: #2288bb; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3LwxEObR_ltwTmAVfyc2vst1HqvzD7d_xeDXEmzZZoir45ZwyPOfrcy7r4tUwTpvgw0_ToPjvDej7LUOw7K2hidE0VQiWSn93EN59F9O0Hmb2LARC2Wt47kAXsivLmCsETjYGBaannl_6/s400/e2.JPG&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(238, 238, 238); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(238, 238, 238); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(238, 238, 238); border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; position: relative;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;In Open project File text field write any project name with .prj extension. In this example I am writing project name as CProject.PRJ. Now press&amp;nbsp;&lt;b&gt;OK&lt;/b&gt;&amp;nbsp;button.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Step 4: After pressing OK button you will get following screen:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #222222; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMdDZZSfrpkRa5Ya_NBk3PbssZ7oqrpwa6jZ5XH9SRs29Rp0WgpHbToMSzPpe-Zwsne_8z1NtezXiI3D9US37g5k73vze1DpJu-MsQps593Nxbwrb4o_hjmIQ51Ipj6qNkdAB_56YbcwvF/s1600-h/e3.JPG&quot; imageanchor=&quot;1&quot; style=&quot;color: #2288bb; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMdDZZSfrpkRa5Ya_NBk3PbssZ7oqrpwa6jZ5XH9SRs29Rp0WgpHbToMSzPpe-Zwsne_8z1NtezXiI3D9US37g5k73vze1DpJu-MsQps593Nxbwrb4o_hjmIQ51Ipj6qNkdAB_56YbcwvF/s400/e3.JPG&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(238, 238, 238); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(238, 238, 238); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(238, 238, 238); border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; position: relative;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Now click on&amp;nbsp;&lt;b&gt;Project -&amp;gt; Add item&lt;/b&gt;&amp;nbsp;menu.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Step 5: After clicking Add item you will get following screen:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #222222; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhieFPdNE37bkatpQHvMz2qPIGea5g-x7VeDVmXPOQw52rUfE7R4PKhHeYdYASCVk3Ib6dvAZJhKQbAKa-dD2hvhyphenhyphenzb0DuVawzPAxKSl9NhdTP8TsBch6GRnYIK3Ud2R_ThcKASba12-nBF/s1600-h/e5.JPG&quot; imageanchor=&quot;1&quot; style=&quot;color: #2288bb; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhieFPdNE37bkatpQHvMz2qPIGea5g-x7VeDVmXPOQw52rUfE7R4PKhHeYdYASCVk3Ib6dvAZJhKQbAKa-dD2hvhyphenhyphenzb0DuVawzPAxKSl9NhdTP8TsBch6GRnYIK3Ud2R_ThcKASba12-nBF/s400/e5.JPG&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(238, 238, 238); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(238, 238, 238); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(238, 238, 238); border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; position: relative;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;In the name text field write down all c source code file one by one i.e. first write one.c and click on&amp;nbsp;&lt;b&gt;Add&lt;/b&gt;&amp;nbsp;button&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Then write two.c and click on Add button and so on&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #222222; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisUL9loJz9fjK5r_KkTOWdJStADGJobAd-hZIVMjPKbfS6ZEz11FDoJMwCoZNxPwLvSLFRrL4S0fCS3ZNAlUo5V3fjRak0WCQ1PJV2I-AniZqwHbzaHKhZ5h-aPFDOq2nzR4JqWJsCKWN7/s1600-h/e6.JPG&quot; imageanchor=&quot;1&quot; style=&quot;color: #2288bb; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisUL9loJz9fjK5r_KkTOWdJStADGJobAd-hZIVMjPKbfS6ZEz11FDoJMwCoZNxPwLvSLFRrL4S0fCS3ZNAlUo5V3fjRak0WCQ1PJV2I-AniZqwHbzaHKhZ5h-aPFDOq2nzR4JqWJsCKWN7/s400/e6.JPG&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(238, 238, 238); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(238, 238, 238); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(238, 238, 238); border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; position: relative;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Step 6: At the end click on&amp;nbsp;&lt;b&gt;Done&lt;/b&gt;&amp;nbsp;button. After clicking on done button you will get following screen:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #222222; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXwd0F3Ampr7kZngrZsaVfWJd4jpHKXaofCSLHiE7gouC5XgziWTvaSXBCNrY2gRFC-AMHbZCfSXlC8whvBQgLRehci0F9rddX58XdxtdXYpGNdAM5FJ310BVYcXvTHna1lKOFdek5Es5k/s1600-h/e7.JPG&quot; imageanchor=&quot;1&quot; style=&quot;color: #2288bb; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXwd0F3Ampr7kZngrZsaVfWJd4jpHKXaofCSLHiE7gouC5XgziWTvaSXBCNrY2gRFC-AMHbZCfSXlC8whvBQgLRehci0F9rddX58XdxtdXYpGNdAM5FJ310BVYcXvTHna1lKOFdek5Es5k/s400/e7.JPG&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(238, 238, 238); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(238, 238, 238); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(238, 238, 238); border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; position: relative;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;At the lower part of window you can see project name, list of files you have added etc.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Step7: To compile the two files press&amp;nbsp;&lt;b&gt;Alt+F9&lt;/b&gt;&amp;nbsp;and to run the above program press&amp;nbsp;&lt;b&gt;Ctrl+F9&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Note: To close the project click on&amp;nbsp;&lt;b&gt;Project -&amp;gt; Close&lt;/b&gt;project.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Output: Compilation error: Unknown symbol i and j.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Hence we can say variable i and j which has initialized into two.c is not visible in file one.c. This example proves visibility of globally declared static variable is file.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #008e00; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Note:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;In the above example function sum which was declared and defined in two.c has also storage class extern. So we can call from other file (one.c).If it will static then we cannot call function sum since static storage class is only visible to the file where it has declared.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(8)If we static variable has declared locally or globally its scope will always whole the program. For example:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(a) //locally declaration of static variable&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;visit&lt;/b&gt;();&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;i=0;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//Opening inner block&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;a=5;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//locally declaration&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XYZ:;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//Label of goto statement&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d&amp;nbsp; &quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,a);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a++;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i++;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//closing inner block.&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; visit();&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;/* printf(&quot;%d&quot;,a); Variable a is not visible here but&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; it is alive. */&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;if&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(i&amp;lt;5)&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&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;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;goto&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;XYZ;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;return&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;0;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;visit&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Output: 5 6 7 8 9&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Explanation: When program control will come out of inner block where variable a has declared then outside of inner block variable a is not visible but its scope is outside the program i.e. variable a hasn’t dead .If with help of goto statement control again comes inside the inner block it prints previous incremented values which was not possible in case of auto or register variables.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(b)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//Locally declarations of variable &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;There are two c source code files:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//one.c&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;lt;conio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;i;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;for&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(i=0;i&amp;lt;3;i++){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&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;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;a=5;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&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;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d\n&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,a);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&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;nbsp; a++;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; visit();&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; getch();&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;//two.c&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;visit&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;Don’t disturb, I am learning storage class&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;/* printf(&quot;%d&quot;,a); Variable a is not visible here but&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: #3f7f5f; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; It is alive. */&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Now compile and execute both files together:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Output:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;5&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;disturb, I am learning storage class&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;6&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;disturb, I am learning storage class&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;7&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;disturb, I am learning storage class&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Explanation: When control goes to another file and comes even that variable didn’t dead and it prints previous incremented value.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #008e00; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Note:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;In both examples if you will declare static variable globally you will get same output.&lt;/span&gt;&lt;br /&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-size: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;9. A static variables or functions have internal linkage. An internal linkage variables or functions are visible to the file where it has declared.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;5.&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 19px;&quot;&gt;Write a c program to modify the constant variable in c?&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;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 19px;&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;background-color: white; color: #222222; line-height: 21px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;u class=&quot;show11&quot; style=&quot;color: maroon; cursor: pointer; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; font-weight: 900;&quot;&gt;Answer&lt;/u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;; line-height: 18px;&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;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;You can modify constant variable with the help of pointers. For example:&lt;/span&gt;&lt;div class=&quot;explanation11&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; display: block; line-height: 21px;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;i=10;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;*ptr=&amp;amp;i;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *ptr=(&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;*)20;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,i);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Output: 20&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; line-height: 18px;&quot;&gt;&lt;div class=&quot;explanation9&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; display: block;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;6.&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 19px;&quot;&gt;What is the meaning of scope of a variable?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&lt;u class=&quot;show12&quot; style=&quot;color: maroon; cursor: pointer; font-weight: 900;&quot;&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #222222; line-height: 21px;&quot;&gt;&lt;u class=&quot;show12&quot; style=&quot;color: maroon; cursor: pointer; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; font-weight: 900;&quot;&gt;Answer&lt;/u&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 19px; 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;background-color: white; color: #222222; line-height: 21px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 19px; line-height: 18px;&quot;&gt;Meaning of scope is to check either variable is alive or dead. Alive means data of a variable has not destroyed from memory. Up to which part or area of the program a variable is alive, that area or part is known as scope of a variable.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #222222; font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 19px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;div class=&quot;explanation12&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; display: block; line-height: 21px;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Note: If any variable is not visible it may have scope i.e. it is alive or may not have scope. But if any variable has not scope i.e. it is dead then variable must not to be visible.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;There are four type of scope in c:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;1. Block scope.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;2. Function scope.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;3. File scope.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;3. Program scope.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;7.&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 19px;&quot;&gt;Write a c program to find size of&amp;nbsp;structure&amp;nbsp;without&amp;nbsp;using sizeof operator ?&amp;nbsp;&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;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #222222;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;u class=&quot;show14&quot; style=&quot;color: maroon; cursor: pointer; font-weight: 900;&quot;&gt;Answer&lt;/u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #222222;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: maroon;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: 900; letter-spacing: 5px;&quot;&gt;&lt;u style=&quot;color: maroon; cursor: pointer; font-weight: 900;&quot;&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;explanation14&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; display: block;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;struct&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;ABC{&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;a;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;float&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;b;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;char&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;c;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;};&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;struct&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;ABC *ptr=(&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;struct&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;ABC *)0;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ptr++;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;Size of structure is: %d&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,*ptr);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;8.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 19px;&quot;&gt;What is NULL pointer?&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&lt;u class=&quot;show15&quot; style=&quot;color: maroon; cursor: pointer; font-weight: 900;&quot;&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&lt;u class=&quot;show15&quot; style=&quot;color: maroon; cursor: pointer; font-weight: 900;&quot;&gt;Answer&lt;/u&gt;&lt;br /&gt;
&lt;u class=&quot;show15&quot; style=&quot;color: maroon; cursor: pointer; font-weight: 900;&quot;&gt;&lt;/u&gt;&lt;br /&gt;
&lt;div class=&quot;explanation15&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; display: block;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Literal meaning of NULL pointer is a pointer which is pointing to nothing. NULL pointer points the base address of segment.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Examples of NULL pointer:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;1.&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;*ptr=(&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;char&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;*)0;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;2.&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;float&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;*ptr=(&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;float&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;*)0;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;3.&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;char&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;*ptr=(&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;char&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;*)0;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;4.&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;double&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;*ptr=(&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;double&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;*)0;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;5.&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;char&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;*ptr=’\0’;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;6.&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;*ptr=NULL;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; margin-left: 0.5in; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: maroon; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(q) What is meaning of NULL?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: maroon; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Answer:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;NULL is macro constant which has been defined in the header file stdio.h, alloc.h, mem.h, stddef.h and stdlib.h as&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#define&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;NULL 0&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Examples:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: maroon; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(1)What will be output of following c program?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;stdio.h&quot;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;main(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;if&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(!NULL)&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; margin-left: 0.5in; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;I know preprocessor&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;else&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; margin-left: 0.5in; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;I don&#39;t know preprocessor&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Output:&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;I know preprocessor&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Explanation:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;!NULL = !0 = 1&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;In if condition any non zero number mean true.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: maroon; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(2)What will be output of following c program?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;stdio.h&quot;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;main(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;i;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;count;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;for&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(i=NULL;i&amp;lt;=5;){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; margin-left: 0.5in; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;count++;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; margin-left: 0.5in; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;i+=2;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,count);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Output:&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;3&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: maroon; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(3)What will be output of following c program?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;stdio.h&quot;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#ifndef&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;NULL&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#define&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;NULL 5&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#endif&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,NULL+&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;sizeof&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(NULL));&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Output:&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;2&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Explanation:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;NULL+sizeof(NULL)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;=0+sizeoof(0)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;=0+2&amp;nbsp;//size of int data type is two byte.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: maroon; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;We cannot copy any thing in the NULL pointer.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: maroon; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: maroon; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;(q)What will be output of following c program?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;string.h&quot;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;char&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;*str=NULL;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;strcpy(str,&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;c-pointer&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%s&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,str);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;Output:&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;(null)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;9.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 19px;&quot;&gt;What is size of void pointer ?&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;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 19px;&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;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&amp;nbsp;&lt;u class=&quot;show17&quot; style=&quot;color: maroon; cursor: pointer; font-weight: 900;&quot;&gt;Answer&lt;/u&gt;&lt;br /&gt;
&lt;u class=&quot;show17&quot; style=&quot;color: maroon; cursor: pointer; font-weight: 900;&quot;&gt;&lt;/u&gt;&lt;br /&gt;
&lt;div class=&quot;explanation17&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; display: block;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 19px; line-height: 21px;&quot;&gt;Size of any type of pointer in c is independent of data type which is pointer is pointing i.e. size of all type of pointer (near) in c is two byte either it is char pointer, double pointer, function pointer or null pointer.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 19px; line-height: 21px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 19px; line-height: 21px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 19px; line-height: 21px;&quot;&gt;Void pointer is not exception of this rule and size of void pointer is also two byte.&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&lt;div class=&quot;explanation15&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; display: block;&quot;&gt;&lt;div style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;10.&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;; font-size: 19px;&quot;&gt;What is difference between pass by value and pass by reference ?&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;&amp;nbsp;&lt;u class=&quot;show16&quot; style=&quot;color: maroon; cursor: pointer; font-weight: 900;&quot;&gt;Answer&lt;/u&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: maroon;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: 900; letter-spacing: 5px;&quot;&gt;&lt;u style=&quot;color: maroon; cursor: pointer; font-weight: 900;&quot;&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;explanation16&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; display: block;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt; line-height: 21px;&quot;&gt;In c we can pass the parameters in a function in two different ways.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt; line-height: 21px;&quot;&gt;(a)Pass by value: In this approach we pass copy of actual variables in function as a parameter. Hence any modification on parameters inside the function will no reflect in the actual variable. For example:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;a=5,b=10;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;swap(a,b);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;%d&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,a,b);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;swap&lt;/b&gt;(&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;a,&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;b){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;temp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;temp =a;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;a=b;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b=temp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt; line-height: 21px;&quot;&gt;Output: 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;10&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt; line-height: 21px;&quot;&gt;(b)Pass by reference: In this approach we pass memory address actual variables in function as a parameter. Hence any modification on parameters inside the function will reflect in the actual variable. For example:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;#include&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;main&lt;/b&gt;(){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;a=5,b=10;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;swap(&amp;amp;a,&amp;amp;b);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&quot;%d&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;%d&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;,a,b);&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;void&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&lt;b&gt;swap&lt;/b&gt;(&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;*a,&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;*b){&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;*temp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*temp =*a;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*a=*b;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*b=*temp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt; line-height: 21px;&quot;&gt;Output: 10 5&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt; line-height: 21px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt; line-height: 21px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt; line-height: 21px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt; line-height: 21px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 14pt; line-height: 21px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://problemssolvehere.blogspot.com/feeds/6888895109104564113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://problemssolvehere.blogspot.com/2011/10/c-c-questions-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/6888895109104564113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/6888895109104564113'/><link rel='alternate' type='text/html' href='http://problemssolvehere.blogspot.com/2011/10/c-c-questions-1.html' title=''/><author><name>Kanhaiya Lal</name><uri>http://www.blogger.com/profile/17729850042667687272</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/AVvXsEjU-r_r_zwe8uLIMUmORea9rA4wLKkIYdRiQnTqVPJvIt_qpSarPYrhtG9t2gypZaDGZ-gcTdtbarJIbRycqnfY_8Cx6a6i3yuJhvWADxeMrEJeUIGDN_LyFoUqxOqUvd5SjqCG4dmfoS4/s72-c/Concept8.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7523470230003836388.post-8023048108661084560</id><published>2011-09-29T16:24:00.000+05:30</published><updated>2011-09-29T16:26:13.972+05:30</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 class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;11 Major Differences Between C And C++&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;C++, as the name suggests is a superset of C. As a matter of fact, C++ can run most of C code while C cannot run C++ code. Here are the 10 major differences between C++ &amp;amp; C…&lt;br /&gt;
&lt;br /&gt;
1. C follows the procedural programming paradigm while C++ is a multi-paradigmlanguage(procedural as well as object oriented)&lt;br /&gt;
&lt;br /&gt;
In case of C, importance is given to the steps or procedure of the program while C++ focuses on the data rather than the process.&lt;br /&gt;
Also, it is easier to implement/edit the code in case of C++ for the same reason.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. In case of C, the data is not secured while the data is secured(hidden) in C++&lt;br /&gt;
&lt;br /&gt;
This difference is due to specific OOP features like Data Hiding which are not present in C.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. C is a low-level language while C++ is a middle-level language (Relatively, Please see the discussion at the end of the post)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;C is regarded as a low-level language(difficult interpretation &amp;amp; less user friendly) while C++ has features of both low-level(concentration on whats going on in the machine hardware) &amp;amp; high-level languages(concentration on the program itself) &amp;amp; hence is regarded as a middle-level language.&lt;br /&gt;
&lt;br /&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;4. C uses the top-down approach while C++ uses the bottom-up approach&lt;br /&gt;
&lt;br /&gt;
In case of C, the program is formulated step by step, each step is processed into detail while in C++, the base elements are first formulated which then are linked together to give rise to larger systems.&lt;br /&gt;
&lt;br /&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;5. C is function-driven while C++ is object-driven&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Functions are the building blocks of a C program while objects are building blocks of a C++ program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. C++ supports function overloading while C does not&lt;br /&gt;
&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Overloading means two functions having the same name in the same program. This can be done only in C++ with the help of Polymorphism(an OOP feature)&lt;br /&gt;
&lt;br /&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;7. We can use functions inside structures in C++ but not in C.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
In case of C++, functions can be used inside a structure while structures cannot contain functions in C.&lt;br /&gt;
&lt;br /&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;8. The NAMESPACE feature in C++ is absent in case of C&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;C++ uses NAMESPACE which avoid name collisions. For instance, two students enrolled in the same university cannot have the same roll number while two students in different universities might have the same roll number. The universities are two different namespace &amp;amp; hence contain the same roll number(identifier) but the same university(one namespace) cannot have two students with the same roll number(identifier)&lt;br /&gt;
&lt;br /&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;9. The standard input &amp;amp; output functions differ in the two languages&lt;br /&gt;
&lt;br /&gt;
C uses scanf &amp;amp; printf while C++ uses cin&amp;gt;&amp;gt; &amp;amp; cout&amp;lt;&amp;lt; as their respective input &amp;amp; output functions&lt;br /&gt;
&lt;br /&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;10. C++ allows the use of reference variables while C does not&lt;br /&gt;
&lt;br /&gt;
Reference variables allow two variable names to point to the same memory location. We cannot use these variables in C programming.&lt;/span&gt;&lt;/div&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;/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;11. C++ supports Exception Handling while C does not.&lt;br /&gt;
&lt;br /&gt;
C does not support it “formally” but it can always be implemented by other methods. Though you don’t have the framework to throw &amp;amp; catch exceptions as in C++.&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://problemssolvehere.blogspot.com/feeds/8023048108661084560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://problemssolvehere.blogspot.com/2011/09/10-major-differences-between-c-and-c-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/8023048108661084560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/8023048108661084560'/><link rel='alternate' type='text/html' href='http://problemssolvehere.blogspot.com/2011/09/10-major-differences-between-c-and-c-c.html' title=''/><author><name>Kanhaiya Lal</name><uri>http://www.blogger.com/profile/17729850042667687272</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-7523470230003836388.post-944284207176013837</id><published>2011-09-29T01:17:00.000+05:30</published><updated>2011-09-29T01:17:31.634+05:30</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 class=&quot;Apple-style-span&quot; style=&quot;color: red; font-size: x-large;&quot;&gt;&lt;b&gt;10 Reasons - Why C Should be your First Programming Language&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;In this dynamic IT world new language come every day and get obsolete, so there must be something in the C which has remained there for 3 decades and more and even today there is hardly any language which can match its strength.&lt;br /&gt;
&lt;br /&gt;
90% of the starting programmer says that C has been superseded by its predecessors such as C++, Java, and C # and so on so why learn C. I don&#39;t know why they think so but I know one thing that they will never excel the other 10% programmers who differs from this opinion. Simple reason is how could a skyscraper(&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;continuously habitable building of many stories&lt;/span&gt;) building stand against time if its foundation is not strong. &lt;br /&gt;
&lt;br /&gt;
C was the programming language developed at AT &amp;amp; T&#39;s Bell Laboratories of USA in 1972. It was written by a man name Dennis Ritchie.&lt;br /&gt;
&lt;br /&gt;
Now Let us begin to analyze reason why C should be your first programming language.&lt;br /&gt;
&lt;br /&gt;
1.I believe nobody can learn C++ or Java directly. To master these languages you need to have a strong concept of programming element such as polymorphism, classes, inheritance etc. Simple question is how you can learn such complicated concepts when you don&#39;t even know about the basic elements such as block functions. C is a language which begins from scratch and it has foundational concepts on which today concepts stand on.&lt;br /&gt;
&lt;br /&gt;
2.It is language on which C++ is based on, hence C# also derive its origin from the C. Java is also a distant cousin of C and share the same programming concept and syntax of C. These are the most dominant languages in the world and all are based on C. To rock the world through them you must get rocking with C.&lt;br /&gt;
&lt;br /&gt;
3.C++, Java, and C # make use of OOP (Object Oriented Programming). Not all programs need it even though it is a powerful tool. Such programs are still written in C.&lt;br /&gt;
&lt;br /&gt;
4. When ever it comes to performance (speed of execution), C is unbeatable.&lt;br /&gt;
&lt;br /&gt;
5.Major parts of the Windows, Unix and Linux are still written in C. So if you want program these OS or create your own you need to know C.&lt;br /&gt;
&lt;br /&gt;
6.Device drivers of new devices are always written in C. The reason is that C provides you access to the basic elements of the computer. It gives you direct access to memory of your CPU through pointers. It allows you to manipulate and play with bits and bytes.&lt;br /&gt;
&lt;br /&gt;
7.Mobiles, Palmtops, PDA&#39;s etc are gaining popularity every second. Also appliances such as T.V., Refrigerators, and Microwaves etc. are becoming an integral part of our daily needs. You may not know but they have a CPU with them which do need programming and the software&#39;s written for them are known as embedded system programs. These programs have to be fast in execution but also have a very little memory. No question why C is ideally suited for embedded system programming.&lt;br /&gt;
&lt;br /&gt;
8.You must have played games on your PC. Even today these astounding 3D games use C as their core. Why? The simple reason who will play the game when it takes a lot of time fire a bullet after you have given command from the console. The reply to the command should be damn prompt and fast. Reply in 1 Nano second is an outstanding game; Reply in 10 Nano seconds is crap. Even today there is no match for C.&lt;br /&gt;
&lt;br /&gt;
9. C is a middle level language. There are three types of language - High Level, Middle Level &amp;amp; Low Level. High level languages are user oriented, giving faster development of programs, example is BASIC. Low level languages are machine oriented; they provide faster execution of programs. C is a middle level language because it combines the best part of high level language with low level language. It is both user and machine oriented and provides infinite possibilities.&lt;br /&gt;
&lt;br /&gt;
10.Last but not least it is a block structured language. The first symbol of a modern language is that it is block structured. Each code exists in separate block and is not known to code in other block providing easy means of programming and minimizing the possibilities of undesirable side effects. C is designed from the base to top to be a block structured language. Many older languages, most popular being BASIC tried to introduce this concept but their short coming can never fulfilled as they were never built along these line. &lt;br /&gt;
&lt;br /&gt;
I think I have given all reason I know why c should be your first programming language. One thing is for sure that there no other language which more reliable, simple and easy to use.&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://problemssolvehere.blogspot.com/feeds/944284207176013837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://problemssolvehere.blogspot.com/2011/09/10-reasons-why-c-should-be-your-first.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/944284207176013837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/944284207176013837'/><link rel='alternate' type='text/html' href='http://problemssolvehere.blogspot.com/2011/09/10-reasons-why-c-should-be-your-first.html' title=''/><author><name>Kanhaiya Lal</name><uri>http://www.blogger.com/profile/17729850042667687272</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-7523470230003836388.post-2281262389809565939</id><published>2011-09-29T00:33:00.000+05:30</published><updated>2011-09-29T00:35:39.268+05:30</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 class=&quot;Apple-style-span&quot; style=&quot;color: red; font-size: x-large;&quot;&gt;&lt;b&gt;About Computer Programming:&lt;/b&gt;&lt;/span&gt;&lt;br /&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;Computer programming is at the core of any computer operation. Unlike usual electro mechanical devices, a computer requires software to carry out instructions. At the lowest level, machine code is used to control the hardware and operations of a computer. The machine language is a set of zeros and ones and rather tedious to handle. Therefore the instructions are coded in a higher level language called a computer program. The conversion of a higher level language into a machine code is carried out by assembly level languages or assemblers. The transformation is completed without any human interface.&lt;br /&gt;
&lt;br /&gt;
During the initial days when computer programs were still at a nascent stage of development, languages such as COBOL and BASIC were highly popular. As the computing power of computers increased ,the demand for more efficient programs emerged. The third generation programs had better portability and efficiency compared to the earlier generations. The need to handle enormous amount of data gave rise to specialized software called database management software or more specifically relational database management software. Companies like Oracle, IBM and Microsoft have developed their own version of RDBMS. On the processing front ,Mainframes were using COLOL for business applications and FORTRAN ( Formula Translation ) for scientific applications.&lt;br /&gt;
&lt;br /&gt;
The concept of modularity became popular when hundreds of software programmers worked simultaneously on a single large project. Object oriented programs like C++ gathered popularity. The code used in these higher level languages was reusable and the techniques could provide for better efficiency.&lt;br /&gt;
&lt;br /&gt;
Microsoft meanwhile brought out its own operating system which could be used on personal computers. In a matter of years the Windows OS became a unprecedented success. The OS2 operating system used by Apple computers was relegated to a second position. IBM has been providing other system software but none could reach the popularity levels of Windows. The only problem with Windows is the issue of security breaches. Though Microsoft has been striving hard to plug the security holes, it has not been entirely successful.&lt;br /&gt;
&lt;br /&gt;
Modern computer programs strive more and more to behave like human language. Technologists believe that a day would come when one could program a computer by given verbal instructions. Surely that&#39;s not going to happen in a hurry. Artificial intelligence, expert systems, fuzzy logic and many more state of the art technologies are changing the face of programming.&lt;br /&gt;
&lt;br /&gt;
Computers unlike any other machine require a software program to operate. It speaks in machine language which is gibberish to the human mind. Higher level languages are used to translate recognizable instructions into machine language. As we progress, the higher level languages would resemble human languages.&lt;br /&gt;
&lt;br /&gt;
At the beginning of the computer era, a single program used to execute different functions. Today, specialized programs are tailor made for different applications. Complex programs require many programmers to work simultaneously on a single project. Modular languages are well suited for such large projects. Object oriented programming has become popular due to their modularity and ease of use.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;hr /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://problemssolvehere.blogspot.com/feeds/2281262389809565939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://problemssolvehere.blogspot.com/2011/09/about-computer-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/2281262389809565939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/2281262389809565939'/><link rel='alternate' type='text/html' href='http://problemssolvehere.blogspot.com/2011/09/about-computer-programming.html' title=''/><author><name>Kanhaiya Lal</name><uri>http://www.blogger.com/profile/17729850042667687272</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-7523470230003836388.post-6503314723022747340</id><published>2011-09-28T13:47:00.000+05:30</published><updated>2011-09-28T13:47:01.518+05:30</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 class=&quot;Apple-style-span&quot; style=&quot;color: red; font-size: x-large;&quot;&gt;What is the Difference Between http and https?&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Hypertext Transfer Protocol (http) is a system for transmitting and receiving information across the Internet. Http serves as a request and response procedure that all agents on the Internet follow so that information can be rapidly, easily, and accurately disseminated between servers, which hold information, and clients, who are trying to access it. Http is commonly used to access html pages, but other resources can be utilized as well through http. In many cases, clients may be exchanging confidential information with a server, which needs to be secured in order to prevent unauthorized access. For this reason, https, or secure http, was developed by Netscape corporation to allow authorization and secured transactions.&lt;br /&gt;
&lt;br /&gt;
In many ways, https is identical to http, because it follows the same basic protocols. The http or https client, such as a Web browser, establishes a connection to a server on a standard port. When a server receives a request, it returns a status and a message, which may contain the requested information or indicate an error if part of the process malfunctioned. Both systems use the same Uniform Resource Identifier (URI) scheme, so that resources can be universally identified. Use of https in a URI scheme rather than http indicates that an encryptedconnection is desired.&lt;br /&gt;
There are some primary differences between http and https, however, beginning with the default port, which is 80 for http and 443 for https. Https works by transmitting normal http interactions through an encrypted system, so that in theory, the information cannot be accessed by any party other than the client and end server. There are two common types ofencryption layers: Transport Layer Security (TLS) and Secure Sockets Layer (SSL), both of which encode the data records being exchanged.&lt;br /&gt;
&lt;br /&gt;
When using an https connection, the server responds to the initial connection by offering a list of encryption methods it supports. In response, the client selects a connection method, and the client and server exchange certificates to authenticate their identities. After this is done, both parties exchange the encrypted information after ensuring that both are using the same key, and the connection is closed. In order to host https connections, a server must have apublic key certificate, which embeds key information with a verification of the key owner&#39;s identity. Most certificates are verified by a third party so that clients are assured that the key is secure.&lt;br /&gt;
&lt;br /&gt;
Https is used in many situations, such as log-in pages for banking, forms, corporate log ons, and other applications in which data needs to be secure. However, if not implemented properly, https is not infallible, and therefore it is extremely important for end users to be wary about accepting questionable certificates and cautious with their personal information while using the Internet.&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://problemssolvehere.blogspot.com/feeds/6503314723022747340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://problemssolvehere.blogspot.com/2011/09/what-is-difference-between-http-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/6503314723022747340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/6503314723022747340'/><link rel='alternate' type='text/html' href='http://problemssolvehere.blogspot.com/2011/09/what-is-difference-between-http-and.html' title=''/><author><name>Kanhaiya Lal</name><uri>http://www.blogger.com/profile/17729850042667687272</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-7523470230003836388.post-4686252802576468841</id><published>2011-09-23T00:03:00.000+05:30</published><updated>2011-09-24T21:50:24.905+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="JAVA QUESTIONS"/><title type='text'>JAVA 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;background-color: white; color: #333333; font-family: Verdana; font-size: 12px;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;10&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;font-family: Verdana; font-size: 9pt;&quot;&gt;&lt;table bgcolor=&quot;#E6F2FF&quot; border=&quot;0&quot; cellpadding=&quot;5&quot; cellspacing=&quot;1&quot;&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; font-size: 11px; line-height: 14px;&quot;&gt;‎&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;u&gt;Java is not 100% pure object oriented programming language&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;1 It use primitive data type like int,char,float etc.&lt;br /&gt;
2 Here in this program no object use:&lt;br /&gt;
class Test&lt;br /&gt;
{&lt;br /&gt;
static&lt;br /&gt;
{&lt;br /&gt;
System.out.println(&quot;Hi!!!&quot;);&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The above code does not use any object to show the output, so that java is not 100% Object Oriented Language because it is not using any object...!!!&lt;br /&gt;
&lt;br /&gt;
but we can say it almost pure OOP language.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
Java is not pure object oriented language, because in &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000;&quot;&gt;object oriented concept&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt; every method is called throw its objects&lt;/span&gt;.In java &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;main()is also a method&lt;/span&gt;, but &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;without creating object we accessing main method&lt;/span&gt;...&quot;General think&quot;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;By using the key word static&lt;/span&gt; we can &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;access any method without creating object&lt;/span&gt;...so java its not pure object oriented language.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&amp;nbsp;&quot;Primitive data types can&#39;t be referenced as memory addresses.&lt;br /&gt;
&amp;nbsp;That&#39;s why we need wrappers which serve as placeholders for primitive values&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;hr /&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;br /&gt;
&lt;br /&gt;
&lt;br /&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; &lt;b&gt;&lt;br /&gt;
Q .How will you convert a String array to an ArrayList object?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
String[] stringArray = new String[] {&quot;x&quot;, &quot;y&quot;, &quot;Z&quot;};&lt;br /&gt;
List list = Arrays.asList(stringArray);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Q.What&#39;s the difference between a queue and a stack?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Stacks works by last-in-first-out rule (LIFO), while queues use the FIFO rule.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Q.You are planning to do an indexed search in a list of objects. Which of the two Java collections should you use: ArrayList or LinkedList?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
ArrayList.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Q.How do you know if an explicit object casting is needed?&lt;/b&gt;&lt;br /&gt;
In order to assign a superclass object to a variable of a subclass,one needs to do explicit casting. For example:&lt;br /&gt;
&lt;br /&gt;
Person person;&lt;br /&gt;
Man man;&lt;br /&gt;
man = (Man)person;&lt;br /&gt;
&lt;br /&gt;
While automatic casting happens when you typecast a subclass object as parent class object.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Q.What&#39;s the difference between the methods sleep() and wait() ?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp;The code sleep(1000); puts thread aside for exactly one second. The code wait(1000), causes a wait of up to one second. A thread could stop waiting earlier if it receives the notify() or notifyAll() call. The method wait() is defined in the class Object and the method sleep() is defined in the class Thread.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://problemssolvehere.blogspot.com/feeds/4686252802576468841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://problemssolvehere.blogspot.com/2011/09/java-questions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/4686252802576468841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/4686252802576468841'/><link rel='alternate' type='text/html' href='http://problemssolvehere.blogspot.com/2011/09/java-questions.html' title='JAVA QUESTIONS'/><author><name>Kanhaiya Lal</name><uri>http://www.blogger.com/profile/17729850042667687272</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-7523470230003836388.post-5140826390131516877</id><published>2011-09-21T13:38:00.000+05:30</published><updated>2011-09-21T13:41:09.938+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="VHDL (VHSIC hardware description language)"/><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;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;VHDL&lt;/span&gt;&amp;nbsp;&lt;/u&gt;&lt;/b&gt;&lt;/span&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;color: red;&quot;&gt;(VHSIC hardware description language) &lt;/span&gt;is a hardware description language used in electronic design automation to describe digital and mixed-signal systems such as field-programmable gate arrays and integrated circuits.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-size: large;&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;Note: VHSIC stands for very-high-speed integrated circuits.&lt;/span&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Design&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;VHDL is commonly used to write text models that describe a logic circuit. Such a model is processed by a synthesis program, only if it is part of the logic design. A simulation program is used to test the logic design using simulation models to represent the logic circuits that interface to the design. This collection of simulation models is commonly called a testbench.&lt;br /&gt;
&lt;br /&gt;
VHDL has constructs to handle the parallelism inherent in hardware designs, but these constructs (processes) differ in syntax from the parallel constructs in Ada (tasks). Like Ada, VHDL is strongly typed and is not case sensitive. In order to directly represent operations which are common in hardware, there are many features of VHDL which are not found in Ada, such as an extended set of Boolean operators including nand and nor. VHDL also allows arrays to be indexed in either ascending or descending direction; both conventions are used in hardware, whereas in Ada and most programming languages only ascending indexing is available.&lt;br /&gt;
&lt;br /&gt;
VHDL has file input and output capabilities, and can be used as a general-purpose language for text processing, but files are more commonly used by a simulation testbench for stimulus or verification data. There are some VHDL compilers which build executable binaries. In this case, it might be possible to use VHDL to write a testbench to verify the functionality of the design using files on the host computer to define stimuli, to interact with the user, and to compare results with those expected.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://problemssolvehere.blogspot.com/feeds/5140826390131516877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://problemssolvehere.blogspot.com/2011/09/vhdl-vhsic-hardware-description.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/5140826390131516877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/5140826390131516877'/><link rel='alternate' type='text/html' href='http://problemssolvehere.blogspot.com/2011/09/vhdl-vhsic-hardware-description.html' title=''/><author><name>Kanhaiya Lal</name><uri>http://www.blogger.com/profile/17729850042667687272</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-7523470230003836388.post-846543529529086288</id><published>2011-09-20T01:51:00.000+05:30</published><updated>2011-09-21T13:44:15.459+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Frist Post"/><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;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-size: x-large;&quot;&gt;&lt;u&gt;&lt;b&gt;Some Concept&#39;s Keep In you Mind&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-size: large;&quot;&gt;&lt;b&gt;&lt;u&gt;The main() Function in C/C++&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The main function in a C++ program can have either of the following signatures:&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;return-type main()&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;return-type main(int argc, char *argv[])&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The return-type can be any valid type or void indicating that the function does not return any value. The argument list can be empty, or can contain the arguments shown to support the use of command-line arguments.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The argument int argc is used by the operating system to pass an integer value specifying the number of command-line arguments entered by the user.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The argument char *argv[] passes a pointer to an array of pointers of type char. Each of the pointers in the array points to a null-terminated string in memory, which is an argument, entered at the command line. The pointer with an index of 0 points to a string containing the name of the program (or garbage with some systems). The pointer with an index of 1 points to the first true command-line argument.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The names of the arguments shown are traditional, but not required.&lt;/div&gt;&lt;br /&gt;
&lt;hr /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-size: large;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-size: large;&quot;&gt;&lt;b&gt;&lt;u&gt;Java Coding standerd follow by the sun:(Noman cleture)&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Package name ,it should be in lower case.&lt;br /&gt;
&lt;br /&gt;
Class name ,Interface name should have first latter in upper case and every word start with Upper case latter.&lt;br /&gt;
&lt;br /&gt;
Variable name &amp;amp; Method name should begin with lower case but after first latter of every word is upper case.&lt;br /&gt;
&lt;br /&gt;
Class constant is in upper case.&lt;br /&gt;
&lt;br /&gt;
When passing variable in a method then variable name should start with a &quot;a&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;hr /&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://problemssolvehere.blogspot.com/feeds/846543529529086288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://problemssolvehere.blogspot.com/2011/09/if-you-have-problem-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/846543529529086288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7523470230003836388/posts/default/846543529529086288'/><link rel='alternate' type='text/html' href='http://problemssolvehere.blogspot.com/2011/09/if-you-have-problem-in.html' title=''/><author><name>Kanhaiya Lal</name><uri>http://www.blogger.com/profile/17729850042667687272</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></feed>