<?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-3324930162204842723</id><updated>2024-09-09T03:45:52.142-07:00</updated><title type='text'>Jagadesha NH</title><subtitle type='html'>Hello,&#xa;&#xa;My name is Jagadesha H, Studying M.Sc in Computer Science from South Asian University, New Delhi. I am a programmer, web designer and developer having a good knowledge of HTML, HTML5, CSS3, PHP, JavaScript, Ajax, JQuery, MySQL, MySQL and also i have a good knowledge of C, C++, Java and am learning MAT-LAB.&#xa;&#xa;following are the links to the websites i have developed,&#xa;http://www.tesseractconsulting.in&#xa;http://www.propertycaretakersindia.com&#xa;&#xa;My email ID: jagadeshanh@gmail.com</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jagadeshanh.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324930162204842723/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://jagadeshanh.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12227603325656875081</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>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3324930162204842723.post-8485297603040367928</id><published>2013-09-02T03:43:00.002-07:00</published><updated>2013-09-02T03:44:23.035-07:00</updated><title type='text'>Storing Student Records Using Array In &#39;C&#39;</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;pre&gt;&lt;stdio .h=&quot;&quot;&gt;&lt;conio .h=&quot;&quot;&gt;&lt;string .h=&quot;&quot;&gt;&lt;num 3rd=&quot;&quot; 40=&quot;&quot; acceptdetails=&quot;&quot; ames=&quot;&quot; c=&quot;&quot; class:=&quot;&quot; count=&quot;=9){&quot; d=&quot;&quot; details=&quot;&quot; displayclasswise=&quot;&quot; enter=&quot;&quot; f=&quot;&quot; fail:=&quot;&quot; float=&quot;&quot; for=&quot;&quot; getchar=&quot;&quot; i1=&quot;&quot; i2=&quot;&quot; i3=&quot;&quot; i4=&quot;&quot; i=&quot;&quot; id=&quot;&quot; if=&quot;&quot; int1:=&quot;&quot; int2:=&quot;&quot; int3:=&quot;&quot; int4:=&quot;&quot; int=&quot;&quot; j=&quot;&quot; k=&quot;&quot; n=&quot;&quot; name:=&quot;&quot; name=&quot;&quot; num=&quot;&quot; of=&quot;&quot; per=&quot;&quot; percentage=&quot;&quot; printdetails=&quot;&quot; printf=&quot;&quot; printthisstudent=&quot;&quot; return=&quot;&quot; s1=&quot;&quot; s2=&quot;&quot; s3=&quot;&quot; s4=&quot;&quot; s=&quot;&quot; scanf=&quot;&quot; setname=&quot;&quot; student=&quot;&quot; sub1:=&quot;&quot; sub2:=&quot;&quot; sub3:=&quot;&quot; sub4:=&quot;&quot; sum=&quot;&quot; t=&quot;&quot; tot=&quot;&quot; totalmarks=&quot;&quot; tudent=&quot;&quot; um=&quot;&quot; void=&quot;&quot; while=&quot;&quot;&gt;&lt;num i=&quot;&quot; if=&quot;&quot; percentage=&quot;&quot;&gt;&lt;num i=&quot;&quot; if=&quot;&quot; percentage=&quot;&quot;&gt;&lt;num i=&quot;&quot; if=&quot;&quot; percentage=&quot;&quot;&gt;&lt;span style=&quot;background-color: white; color: #666666; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;#include &lt;stdio .h=&quot;&quot;&gt;&lt;/stdio&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;#include &lt;conio .h=&quot;&quot;&gt;&lt;/conio&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;#include &lt;string .h=&quot;&quot;&gt;&lt;/string&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;#define N 50&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;
&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;int Student[N][10];&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;char Names[N][N];&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;
&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;void setName(int ID);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;void acceptDetails(int ID);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;void printDetails(int Num);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;int totalMarks(int id);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;float percentage(int id);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;void printThisStudent(int id);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;void displayClasswise(int Num);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;
&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;int main(){&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int i=0;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int j=0;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int Num=0;&lt;/b&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;\n Enter number of students:&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;Num);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;\n Enter ID&#39;s for each student&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;for(i=0;i&lt;num b=&quot;&quot; i=&quot;&quot;&gt;&lt;/num&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;Student[i][0]);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;for(i=0;i&lt;num b=&quot;&quot; i=&quot;&quot;&gt;&lt;/num&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;setName(i);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;acceptDetails(i);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printDetails(Num);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;displayClasswise(Num);&lt;/b&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt;  &lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;
&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;void acceptDetails(int ID){&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int k;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;\n Enter details of %d&quot;,Student[ID][0]);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;k=1;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;printf(&quot;\n Sub1:&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;Student[ID][k]);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;k++;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;printf(&quot;\n Sub2:&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;Student[ID][k]);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;k++;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;printf(&quot;\n Sub3:&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;Student[ID][k]);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;k++;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;printf(&quot;\n Sub4:&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;Student[ID][k]);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;k++;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;printf(&quot;\n Int1:&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;Student[ID][k]);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;k++;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;printf(&quot;\n Int2:&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;Student[ID][k]);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;k++;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;printf(&quot;\n Int3:&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;Student[ID][k]);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;k++;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;printf(&quot;\n Int4:&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;Student[ID][k]);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;
&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;void printDetails(int Num){&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int i=0,j=0,k=0;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int count = 0;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;\n ID \t name \t s1 \t s2 \t s3 \t s4 \t i1 \t i2 \t i3 \t i4 \t tot \t per &quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;for(i=0;i&lt;num b=&quot;&quot; i=&quot;&quot;&gt;&lt;/num&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;printf(&quot;\n&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;count=0;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;for(j=0;j&lt;9 b=&quot;&quot; j=&quot;&quot;&gt;&lt;!--9--&gt;&lt;/9&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;printf(&quot;%d&quot;,Student[i][j]);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;printf(&quot;\t&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;count++;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;if(count==1){&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;while(Names[i][k] != &#39;\0&#39;){&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;printf(&quot;%c&quot;,Names[i][k]);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;k++;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;printf(&quot;\t&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;if(count==9){&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;printf(&quot;%d&quot;,totalMarks(i));&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;printf(&quot;\t&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;printf(&quot;%.02f&quot;,percentage(i));&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;printf(&quot;\n&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;
&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;int totalMarks(int id){&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int i=0,j=0;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int sum=0;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;for(j=1;j&lt;9 b=&quot;&quot; j=&quot;&quot;&gt;&lt;!--9--&gt;&lt;/9&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;sum = sum + Student[id][j];&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return sum;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;
&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;float percentage(int id){&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;float per = 0;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;per = ((totalMarks(id))/8);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return per;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;
&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;void setName(int id){&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;\n Enter name:&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;scanf(&quot;%s&quot;,Names[id]);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;getchar();&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;
&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;void displayClasswise(int Num){&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int i=0;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;\n Fail:&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;for(i=0;i&lt;num b=&quot;&quot; i=&quot;&quot;&gt;&lt;/num&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if(percentage(i) &amp;lt; 40){&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;printThisStudent(i);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;\n 3rd Class:&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;for(i=0;i&lt;num b=&quot;&quot; i=&quot;&quot;&gt;&lt;/num&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if(percentage(i) &amp;gt;40 &amp;amp;&amp;amp; percentage(i) &amp;lt; 50){&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;printThisStudent(i);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;\n 2nd Class:&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;for(i=0;i&lt;num b=&quot;&quot; i=&quot;&quot;&gt;&lt;/num&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if(percentage(i) &amp;gt;50 &amp;amp;&amp;amp; percentage(i) &amp;lt; 60){&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;printThisStudent(i);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;\n 1st Class:&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;for(i=0;i&lt;num b=&quot;&quot; i=&quot;&quot;&gt;&lt;/num&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if(percentage(i) &amp;gt;60 &amp;amp;&amp;amp; percentage(i) &amp;lt; 70){&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;printThisStudent(i);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;\n Distinction:&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;for(i=0;i&lt;num b=&quot;&quot; i=&quot;&quot;&gt;&lt;/num&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if(percentage(i) &amp;gt; 70){&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;printThisStudent(i);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;
&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;void printThisStudent(int id){&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int count = 0;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int j=0;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int k=0;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;\n ID \t name \t s1 \t s2 \t s3 \t s4 \t i1 \t i2 \t i3 \t i4 \t tot \t per &quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;count=0;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;for(j=0;j&lt;9 b=&quot;&quot; j=&quot;&quot;&gt;&lt;!--9--&gt;&lt;/9&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;printf(&quot;%d&quot;,Student[id][j]);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;printf(&quot;\t&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;count++;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;if(count==1){&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;while(Names[id][k] != &#39;\0&#39;){&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;printf(&quot;%c&quot;,Names[id][k]);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;k++;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;printf(&quot;\t&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;if(count==9){&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;printf(&quot;%d&quot;,totalMarks(id));&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;printf(&quot;\t&quot;);&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;printf(&quot;%.02f&quot;,percentage(id));&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18px; white-space: normal;&quot;&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;!--9--&gt;&lt;!--9--&gt;&lt;/num&gt;&lt;/num&gt;&lt;/num&gt;&lt;/num&gt;&lt;/string&gt;&lt;/conio&gt;&lt;/stdio&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://jagadeshanh.blogspot.com/feeds/8485297603040367928/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jagadeshanh.blogspot.com/2013/09/storing-student-records-using-array-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324930162204842723/posts/default/8485297603040367928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324930162204842723/posts/default/8485297603040367928'/><link rel='alternate' type='text/html' href='http://jagadeshanh.blogspot.com/2013/09/storing-student-records-using-array-in-c.html' title='Storing Student Records Using Array In &#39;C&#39;'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12227603325656875081</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-3324930162204842723.post-211250815707904298</id><published>2013-08-31T10:29:00.000-07:00</published><updated>2013-08-31T10:29:30.449-07:00</updated><title type='text'>MAT-LAB Image Processing, Basic Image Operations</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;i&gt;MAT-LAB&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;i&gt;&amp;nbsp;BASIC IMAGE OPERATIONS&lt;/i&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;color: purple;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;Image Addition&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: purple; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;%Adding constant to image, using inbuilt function&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;img = imread(&#39;face.tif&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;img1 = imadd(img,128);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;subplot(2,3,1), imshow(img);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;title(&#39;Original&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;subplot(2,3,2), imshow(img1);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;title(&#39;Inbuilt function added 128&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;%Manually&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;img2 = img;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;for i=1:size(img)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;for j=1:size(img)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;img2(i,j) = img(i,j)+64;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;end&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;end&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;subplot(2,3,3), imshow(img2);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;title(&#39;Manually added 64&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;%Adding two images of same size 300x300&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;img3 = rgb2ind(imread(&#39;pattern.tiff&#39;),0);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;img4 = uint8(zeros(300,300));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;for i=1:size(img)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;for j=1:size(img)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;img4(i,j) = img(i,j)+img3(i,j);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;end&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;end&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;%img4 = img+img3; even this works&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;subplot(2,3,4), imshow(img);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;title(&#39;Original image1&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;subplot(2,3,5), imshow(img3);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;title(&#39;Original image2&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;subplot(2,3,6), imshow(img4);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;title(&#39;Effect of adding image1 and image2&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitwjHTAKnqi4x94mlAMT5Pui3gG2gj_TRBtoMoE2hOyvYtXPnnir07GQ17_qNX9TN1A626gITHSJv0vO0-SJNyvUkYFSjT3V4fftOPolskPJDWN1XUC7P4n_XJIf9XSKzNxh3j22mX7G4/s1600/Image-Add-Result.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitwjHTAKnqi4x94mlAMT5Pui3gG2gj_TRBtoMoE2hOyvYtXPnnir07GQ17_qNX9TN1A626gITHSJv0vO0-SJNyvUkYFSjT3V4fftOPolskPJDWN1XUC7P4n_XJIf9XSKzNxh3j22mX7G4/s1600/Image-Add-Result.jpg&quot; height=&quot;180&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;Image Subtraction&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;%Subtracting constant to image, using inbuilt function&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;img = imread(&#39;face.tif&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;img1 = imsubtract(img,128);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;subplot(2,3,1), imshow(img);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;title(&#39;Original&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;subplot(2,3,2), imshow(img1);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;title(&#39;Inbuilt function subtracted 128&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;%Manually&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;img2 = img;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;for i=1:size(img)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;for j=1:size(img)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;img2(i,j) = img(i,j)-64;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;end&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;end&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;subplot(2,3,3), imshow(img2);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;title(&#39;Manually subtracted 64&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;%Subtracting two images of same size 300x300&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;img3 = imread(&#39;pattern4.tif&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;img4 = uint8(zeros(300,300));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;for i=1:size(img)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;for j=1:size(img)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;img4(i,j) = img(i,j)-img3(i,j);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;end&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;end&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;%img4 = img3 - img;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;subplot(2,3,4), imshow(img);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;title(&#39;Original image1&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;subplot(2,3,5), imshow(img3);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;title(&#39;Original image2&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;subplot(2,3,6), imshow(img4);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;title(&#39;Effect of subtracting image 1 and 2&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV_1V5vkw7Ma6LhVBMzeSjQN7MQNuBk2fxv50AzUUmIgPjAcd4JzGlsqRYVRQwMKV-k1VnIdfrkQEItOsE56-aRisOCSBSIZMFMdE6_WOjPjp0VK5_Bn78jamfKjabYWHjBFm0zvMob1U/s1600/Image-Sub-Result.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV_1V5vkw7Ma6LhVBMzeSjQN7MQNuBk2fxv50AzUUmIgPjAcd4JzGlsqRYVRQwMKV-k1VnIdfrkQEItOsE56-aRisOCSBSIZMFMdE6_WOjPjp0VK5_Bn78jamfKjabYWHjBFm0zvMob1U/s1600/Image-Sub-Result.jpg&quot; height=&quot;179&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;Image Division&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;div&gt;
%Divide image by 128, using inbuilt function&lt;/div&gt;
&lt;div&gt;
img = imread(&#39;face.tif&#39;);&lt;/div&gt;
&lt;div&gt;
img1 = imdivide(img,2);&lt;/div&gt;
&lt;div&gt;
subplot(2,3,1), imshow(img);&lt;/div&gt;
&lt;div&gt;
title(&#39;Original&#39;);&lt;/div&gt;
&lt;div&gt;
subplot(2,3,2), imshow(img1);&lt;/div&gt;
&lt;div&gt;
title(&#39;Inbuilt function divided by 2&#39;);&lt;/div&gt;
&lt;div&gt;
%Manually&lt;/div&gt;
&lt;div&gt;
img2 = zeros(300,300);&lt;/div&gt;
&lt;div&gt;
for i=1:size(img)&lt;/div&gt;
&lt;div&gt;
for j=1:size(img)&lt;/div&gt;
&lt;div&gt;
img2(i,j) = img(i,j)/128;&lt;/div&gt;
&lt;div&gt;
end&lt;/div&gt;
&lt;div&gt;
end&lt;/div&gt;
&lt;div&gt;
subplot(2,3,3), imshow(img2);&lt;/div&gt;
&lt;div&gt;
title(&#39;Manually divided by 128&#39;);&lt;/div&gt;
&lt;div&gt;
%Dividing two images of same size 300x300&lt;/div&gt;
&lt;div&gt;
img3 = imread(&#39;pattern3.tif&#39;);&lt;/div&gt;
&lt;div&gt;
img4 = zeros(300,300);&lt;/div&gt;
&lt;div&gt;
for i=1:size(img)&lt;/div&gt;
&lt;div&gt;
for j=1:size(img)&lt;/div&gt;
&lt;div&gt;
img4(i,j) = img(i,j)/img3(i,j);&lt;/div&gt;
&lt;div&gt;
end&lt;/div&gt;
&lt;div&gt;
end&lt;/div&gt;
&lt;div&gt;
%img4 = img3 - img;&lt;/div&gt;
&lt;div&gt;
subplot(2,3,4), imshow(img);&lt;/div&gt;
&lt;div&gt;
title(&#39;Original image1&#39;);&lt;/div&gt;
&lt;div&gt;
subplot(2,3,5), imshow(img3);&lt;/div&gt;
&lt;div&gt;
title(&#39;Original image2&#39;);&lt;/div&gt;
&lt;div&gt;
subplot(2,3,6), imshow(img4);&lt;/div&gt;
&lt;div&gt;
title(&#39;Effect of dividing image1 by image2&#39;);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxa2jEemLUU3mz2OnhEr0-mrYI-Uriiq-K5_fXPfrnI_HR3OCp_2hwuSxxjG-5l1Yw9Yf5WH41CL8X_VtUeLcVM9ttf8vfMZ0fDOjwJbQJHZqueAOd-IER0DOmmnIC4T5BJoX0r7TwfM0/s1600/Image-Div-Result.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxa2jEemLUU3mz2OnhEr0-mrYI-Uriiq-K5_fXPfrnI_HR3OCp_2hwuSxxjG-5l1Yw9Yf5WH41CL8X_VtUeLcVM9ttf8vfMZ0fDOjwJbQJHZqueAOd-IER0DOmmnIC4T5BJoX0r7TwfM0/s1600/Image-Div-Result.jpg&quot; height=&quot;178&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Image Multiplication&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
%Multiply image by 8, using inbuilt function&lt;/div&gt;
&lt;div&gt;
img = imread(&#39;face.tif&#39;);&lt;/div&gt;
&lt;div&gt;
img1 = immultiply(img,4);&lt;/div&gt;
&lt;div&gt;
subplot(2,3,1), imshow(img);&lt;/div&gt;
&lt;div&gt;
title(&#39;Original&#39;);&lt;/div&gt;
&lt;div&gt;
subplot(2,3,2), imshow(img1);&lt;/div&gt;
&lt;div&gt;
title(&#39;Inbuilt function multiplied by 4&#39;);&lt;/div&gt;
&lt;div&gt;
%Manually&lt;/div&gt;
&lt;div&gt;
img2 = uint8(zeros(300,300));&lt;/div&gt;
&lt;div&gt;
for i=1:size(img)&lt;/div&gt;
&lt;div&gt;
for j=1:size(img)&lt;/div&gt;
&lt;div&gt;
img2(i,j) = img(i,j)*0.5;&lt;/div&gt;
&lt;div&gt;
end&lt;/div&gt;
&lt;div&gt;
end&lt;/div&gt;
&lt;div&gt;
subplot(2,3,3), imshow(img2);&lt;/div&gt;
&lt;div&gt;
title(&#39;Manually multiplied by 0.5&#39;);&lt;/div&gt;
&lt;div&gt;
%Multiplying two images of same size 300x300&lt;/div&gt;
&lt;div&gt;
img3 = uint8(ones(300,300));&lt;/div&gt;
&lt;div&gt;
for i=1:300&lt;/div&gt;
&lt;div&gt;
for j=1:300&lt;/div&gt;
&lt;div&gt;
img3(i+(i-1),j+(j-1))=2;&lt;/div&gt;
&lt;div&gt;
end&lt;/div&gt;
&lt;div&gt;
end&lt;/div&gt;
&lt;div&gt;
img4 = uint8(zeros(300,300));&lt;/div&gt;
&lt;div&gt;
for i=1:size(img)&lt;/div&gt;
&lt;div&gt;
for j=1:size(img)&lt;/div&gt;
&lt;div&gt;
img4(i,j) = img(i,j)*img3(i,j);&lt;/div&gt;
&lt;div&gt;
end&lt;/div&gt;
&lt;div&gt;
end&lt;/div&gt;
&lt;div&gt;
%img4 = img3 - img;&lt;/div&gt;
&lt;div&gt;
subplot(2,3,4), imshow(img);&lt;/div&gt;
&lt;div&gt;
title(&#39;Original image1&#39;);&lt;/div&gt;
&lt;div&gt;
subplot(2,3,5), imshow(img3);&lt;/div&gt;
&lt;div&gt;
title(&#39;Original image2&#39;);&lt;/div&gt;
&lt;div&gt;
subplot(2,3,6), imshow(img4);&lt;/div&gt;
&lt;div&gt;
title(&#39;Effect of multiplying image1 and image2&#39;);&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7yIUnoS9xArqrJB6Egywv8Lznrz2RMf00Rnx6vl230E1S0Ypp2W9GGjHM0gq8g4iRI3ilMjeW8tXJKES2IBvF5vSipVG1ohMo2wFmQZDb_H9DdE7LJU5uQcBdnrCbdpVTTuupfTJoNt0/s1600/Image-Mul-Result.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7yIUnoS9xArqrJB6Egywv8Lznrz2RMf00Rnx6vl230E1S0Ypp2W9GGjHM0gq8g4iRI3ilMjeW8tXJKES2IBvF5vSipVG1ohMo2wFmQZDb_H9DdE7LJU5uQcBdnrCbdpVTTuupfTJoNt0/s1600/Image-Mul-Result.jpg&quot; height=&quot;179&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Logical AND&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
%Logical AND operation&lt;/div&gt;
&lt;div&gt;
A = imread(&#39;logical1.tif&#39;);&lt;/div&gt;
&lt;div&gt;
A = logical(A);&lt;/div&gt;
&lt;div&gt;
B = imread(&#39;logical2.tif&#39;);&lt;/div&gt;
&lt;div&gt;
B = logical(B);&lt;/div&gt;
&lt;div&gt;
C = A &amp;amp; B;&lt;/div&gt;
&lt;div&gt;
subplot(2,3,1), imshow(A);&lt;/div&gt;
&lt;div&gt;
title(&#39;Original Image 1&#39;);&lt;/div&gt;
&lt;div&gt;
subplot(2,3,2), imshow(B);&lt;/div&gt;
&lt;div&gt;
title(&#39;Original Image 2&#39;);&lt;/div&gt;
&lt;div&gt;
subplot(2,3,3), imshow(C);&lt;/div&gt;
&lt;div&gt;
title(&#39;Effect of Logical AND&#39;);&lt;/div&gt;
&lt;div&gt;
D = logical(imread(&#39;logical3.tif&#39;));&lt;/div&gt;
&lt;div&gt;
E = A &amp;amp; D;&lt;/div&gt;
&lt;div&gt;
subplot(2,3,4), imshow(A);&lt;/div&gt;
&lt;div&gt;
title(&#39;Original Image 1&#39;);&lt;/div&gt;
&lt;div&gt;
subplot(2,3,5), imshow(D);&lt;/div&gt;
&lt;div&gt;
title(&#39;Original Image 3&#39;);&lt;/div&gt;
&lt;div&gt;
subplot(2,3,6), imshow(E);&lt;/div&gt;
&lt;div&gt;
title(&#39;Effect of Logical AND&#39;);&lt;/div&gt;
&lt;div&gt;
%***********************************************&lt;/div&gt;
&lt;div&gt;
%Applications are in Object movement detection&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4sAPElV9EpsxyP_bwpBqoLDTWNCtTIMfJA-wIk3tBI3CuZv_4Kq3izVsFPj7ehImPfbuu7prqwbZCjFEsMls7_ywY4IzSpYGkZqTehSfDDnAdg8U90KAuhvzqygFWxxNlmykFTcv1mJU/s1600/Image-Logical-AND-Result.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4sAPElV9EpsxyP_bwpBqoLDTWNCtTIMfJA-wIk3tBI3CuZv_4Kq3izVsFPj7ehImPfbuu7prqwbZCjFEsMls7_ywY4IzSpYGkZqTehSfDDnAdg8U90KAuhvzqygFWxxNlmykFTcv1mJU/s1600/Image-Logical-AND-Result.jpg&quot; height=&quot;181&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Logical OR&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
% Image Logical OR&lt;/div&gt;
&lt;div&gt;
A = imread(&#39;logical4.tif&#39;);&lt;/div&gt;
&lt;div&gt;
A = logical(A);&lt;/div&gt;
&lt;div&gt;
B = imread(&#39;logical5.tif&#39;);&lt;/div&gt;
&lt;div&gt;
B = logical(B);&lt;/div&gt;
&lt;div&gt;
C = A | B;&lt;/div&gt;
&lt;div&gt;
subplot(2,3,1), imshow(A);&lt;/div&gt;
&lt;div&gt;
title(&#39;Original Image 1&#39;);&lt;/div&gt;
&lt;div&gt;
subplot(2,3,2), imshow(B);&lt;/div&gt;
&lt;div&gt;
title(&#39;Original Image 2&#39;);&lt;/div&gt;
&lt;div&gt;
subplot(2,3,3), imshow(C);&lt;/div&gt;
&lt;div&gt;
title(&#39;Effect of Logical OR&#39;);&lt;/div&gt;
&lt;div&gt;
D = logical(imread(&#39;logical6.tif&#39;));&lt;/div&gt;
&lt;div&gt;
E = logical(imread(&#39;logical7.tif&#39;));&lt;/div&gt;
&lt;div&gt;
F = D | E;&lt;/div&gt;
&lt;div&gt;
subplot(2,3,4), imshow(D);&lt;/div&gt;
&lt;div&gt;
title(&#39;Original Image 3&#39;);&lt;/div&gt;
&lt;div&gt;
subplot(2,3,5), imshow(E);&lt;/div&gt;
&lt;div&gt;
title(&#39;Original Image 4&#39;);&lt;/div&gt;
&lt;div&gt;
subplot(2,3,6), imshow(F);&lt;/div&gt;
&lt;div&gt;
title(&#39;Effect of Logical OR&#39;);&lt;/div&gt;
&lt;div&gt;
%Pattern analysis&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWnp9h1fRqlUpxUdjPPW42XFST2Uei1shrK-1UoeLEth3TbBReHZZfNYQ94KLdxsbsjwFY3B2rlXYKcdlt-12d0E9HH8_LwmwW128rFbur5TXQn7P1UHEPpCdTRaBAXovZ0Kgh-jYBAFo/s1600/Image-Logical-OR-Result.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWnp9h1fRqlUpxUdjPPW42XFST2Uei1shrK-1UoeLEth3TbBReHZZfNYQ94KLdxsbsjwFY3B2rlXYKcdlt-12d0E9HH8_LwmwW128rFbur5TXQn7P1UHEPpCdTRaBAXovZ0Kgh-jYBAFo/s1600/Image-Logical-OR-Result.jpg&quot; height=&quot;179&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://jagadeshanh.blogspot.com/feeds/211250815707904298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jagadeshanh.blogspot.com/2013/08/mat-lab-image-processing-basic-image.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324930162204842723/posts/default/211250815707904298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324930162204842723/posts/default/211250815707904298'/><link rel='alternate' type='text/html' href='http://jagadeshanh.blogspot.com/2013/08/mat-lab-image-processing-basic-image.html' title='MAT-LAB Image Processing, Basic Image Operations'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12227603325656875081</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/AVvXsEitwjHTAKnqi4x94mlAMT5Pui3gG2gj_TRBtoMoE2hOyvYtXPnnir07GQ17_qNX9TN1A626gITHSJv0vO0-SJNyvUkYFSjT3V4fftOPolskPJDWN1XUC7P4n_XJIf9XSKzNxh3j22mX7G4/s72-c/Image-Add-Result.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324930162204842723.post-2941994466537058107</id><published>2013-05-22T19:17:00.002-07:00</published><updated>2013-05-22T19:17:30.050-07:00</updated><title type='text'></title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;Self explaining bubble sort code in c.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;#include&lt;stdlib .h=&quot;&quot;&gt;&lt;/stdlib&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;#include&lt;stdio .h=&quot;&quot;&gt;&lt;/stdio&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;void getData(void);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;void bubbleSort(int [],int);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;void printArray(int [],int);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;int main(){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;getData();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;void getData(){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int* Array;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int Size,index;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;\n How many numbers you would like to sort?&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;Size);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Array = (int *)malloc(Size*sizeof(int));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;for(index=0; index &amp;lt; Size; index++){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;printf(&quot;\n Enter number %d:&quot;,(index+1));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;Array[index]);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;\n Array entered is:&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printArray(Array,Size);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;bubbleSort(Array,Size);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;void bubbleSort(int Array[],int Size){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int index1,index2,temp,count=0;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;for(index1=0;index1&amp;lt;=Size;index1++){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;for(index2=index1+1;index2&amp;lt;=Size-1;index2++){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;printf(&quot;\n Comparing %d with %d.&quot;,Array[index1],Array[index2]);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;count++;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;_sleep(1000);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;if(Array[index1]&amp;gt;Array[index2]){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;printf(&quot;\n Number %d is greater than %d.&quot;,Array[index1],Array[index2]);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;printf(&quot;\n Swapping elements %d and %d&quot;,Array[index1],Array[index2]);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;_sleep(1000);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;temp = Array[index1];&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;Array[index1]=Array[index2];&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;Array[index2]=temp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;printf(&quot;\n Array elements after modification are:&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;printArray(Array,Size);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;else if(Array[index1]==Array[index2]){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;printf(&quot;\n Number are equal&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;else{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;printf(&quot;\n Number %d is less than %d.&quot;,Array[index1],Array[index2]);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;\n Total compares : %d \n\n\n&quot;,count);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;void printArray(int Array[],int Size){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int index;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;for(index=0; index &amp;lt; Size; index++){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;printf(&quot;\t %d&quot;,Array[index]);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;printf(&quot;\n\n\n&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://jagadeshanh.blogspot.com/feeds/2941994466537058107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jagadeshanh.blogspot.com/2013/05/self-explaining-bubble-sort-code-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324930162204842723/posts/default/2941994466537058107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324930162204842723/posts/default/2941994466537058107'/><link rel='alternate' type='text/html' href='http://jagadeshanh.blogspot.com/2013/05/self-explaining-bubble-sort-code-in-c.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12227603325656875081</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>