<?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-8657465464897069103</id><updated>2024-11-01T13:27:10.515+05:30</updated><category term="Python Programming Unit 1"/><category term="Python Programming Unit 4"/><category term="Python Programming Unit 2"/><category term="Computer Network Unit 1"/><category term="Python Programming Quizes"/><category term="Python Programming Unit 3"/><category term="Python Programming Unit 5"/><category term="Computer System Security unit 1"/><category term="Computer Network Unit 2"/><title type='text'>technical guptaji</title><subtitle type='html'>Tutorials, Free Online Tutorials, &quot;technical guptaji&quot; provides tutorials and quiz&#39;s of all computer science technology like python tutorial,computer network, Computer System Security, Java , C language etc. for beginners and professionals.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>93</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-6765811764919245510</id><published>2023-07-24T15:56:00.000+05:30</published><updated>2023-07-24T15:56:31.931+05:30</updated><title type='text'>Operators in C </title><content type='html'>&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;&amp;nbsp;Operators&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;An operator is a symbol that tells the compiler to perform specific mathematical or logical operations, based on the value provided. C language is rich in built-in operators and provides various operators which are given below:&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana;&quot;&gt;1. Arithmetic Operators&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;An arithmetic operator is used to perform mathematical calculations or operations such as Addition, subtraction, multiplication, division etc. on numerical values. The following arithmetic operators are:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;+&lt;/b&gt;(&lt;span style=&quot;color: #2b00fe;&quot;&gt;Addition&lt;/span&gt;) is used to add two operands.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;-&lt;/b&gt;(&lt;span style=&quot;color: #2b00fe;&quot;&gt;Subtraction&lt;/span&gt;) is used to subtract second operand from the first operand.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;*&lt;/b&gt;(&lt;span style=&quot;color: #2b00fe;&quot;&gt;Multiplication&lt;/span&gt;) is used to multiple two/both operands.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;/&lt;/b&gt;(&lt;span style=&quot;color: #2b00fe;&quot;&gt;Division&lt;/span&gt;) is used to divides the numerator by denominator.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;%&lt;/b&gt;(&lt;span style=&quot;color: #2b00fe;&quot;&gt;Modular&lt;/span&gt;) is used to give remainder of after an integer division.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: verdana; font-size: medium;&quot;&gt;2. Relational Op&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;erators&lt;/span&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Relational operators are used to describe the relation between two operands. or you can say that relational operators are used to compare&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;two operands. These are also known as Conditional operators. The following Relational operators are:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;==&lt;/b&gt; (&lt;span style=&quot;color: #2b00fe;&quot;&gt;double equal to&lt;/span&gt;) is used to checks if the values of two operands are equal or not. If yes, then the condition becomes true.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;!=&lt;/b&gt; (&lt;span style=&quot;color: #2b00fe;&quot;&gt;not equal to&lt;/span&gt;) is used to checks if the values of two operands are not equal. If the values are not equal,&amp;nbsp;then the condition becomes true.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&amp;gt;&lt;/b&gt; (&lt;span style=&quot;color: #2b00fe;&quot;&gt;Greater than&lt;/span&gt;) is used to checks if the value of left operand greater than the value of right operand. If yes,&amp;nbsp;the condition becomes true.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&amp;lt;&lt;/b&gt; (&lt;span style=&quot;color: #2b00fe;&quot;&gt;Less than&lt;/span&gt;) is used to checks if the value of left operand less than the value of right operand. If yes, the condition becomes true.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&amp;gt;=&lt;/b&gt; (&lt;span style=&quot;color: #2b00fe;&quot;&gt;Greater than equal to&lt;/span&gt;) is used to checks if the value of left operand greater than or equal to the value of right operand. If yes, the condition becomes true.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;lt;= (&lt;span style=&quot;color: #2b00fe;&quot;&gt;Less than equal to&lt;/span&gt;) is used to check if the value of right operand less than or equal to the value of right operand. If yes, the condition becomes true.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;&lt;span style=&quot;color: #800180; font-family: verdana;&quot;&gt;3. Logical Operators&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Logical operators are used to perform the logical operations. or whenever we want to check multiple conditions then we can use logical operators as well. The following logical operators are:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&amp;amp;&amp;amp;&lt;/b&gt; (&lt;span style=&quot;color: #2b00fe;&quot;&gt;Logical AND&lt;/span&gt;) if both the operands are non-zero then the condition becomes true.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;||&lt;/b&gt; (&lt;span style=&quot;color: #2b00fe;&quot;&gt;Logical OR&lt;/span&gt;) if any of the two operands is non-zero then the condition becomes true.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;!&lt;/b&gt; (&lt;span style=&quot;color: #2b00fe;&quot;&gt;Logical NOT&lt;/span&gt;) is used to reverse the logical state of its operand. If a condition is True than logical not operator will make it False.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/6765811764919245510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2023/07/operators-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/6765811764919245510'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/6765811764919245510'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2023/07/operators-in-c.html' title='Operators in C '/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-8675392797878739592</id><published>2023-01-09T15:11:00.003+05:30</published><updated>2023-01-25T15:22:02.602+05:30</updated><title type='text'>File Operation-Writing</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;Writing to the File&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;In C programming there are &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;three functions&lt;/span&gt;&lt;/b&gt; used to write data into a file. If we want to write something into the file then we can use one of the function from the following functions:- &lt;b&gt;fprintf()&lt;/b&gt;, &lt;b&gt;fputs()&lt;/b&gt; and &lt;b&gt;fputc()&lt;/b&gt; functions.&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;All the above functions are used to write the contents to a file.Let us discuss each of them one by one :-&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;1. fprintf() Function&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The &lt;b&gt;fprintf()&lt;/b&gt; function is used to write data to a file. It writes a set of character into a file.We can write other types of values like &lt;b&gt;int&lt;/b&gt;, &lt;b&gt;float&lt;/b&gt; etc. into a file by using this method.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;Syntax&lt;/span&gt;&amp;nbsp;&lt;/h4&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;int &lt;b&gt;fprintf&lt;/b&gt;(FILE &lt;b&gt;&lt;span style=&quot;color: #800180;&quot;&gt;*fp&lt;/span&gt;&lt;/b&gt;, char &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;string[]&lt;/b&gt;&lt;/span&gt;)&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 &lt;b&gt;fprintf()&lt;/b&gt; function accepts &lt;span style=&quot;color: #2b00fe;&quot;&gt;two arguments&lt;/span&gt; or parameters. The first one is &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;file pointer&lt;/span&gt;&lt;/b&gt; which in indicating to the file and the second one is &lt;span style=&quot;color: #2b00fe;&quot;&gt;sequence of characters&lt;/span&gt; or you can say that array of character means a &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;string&lt;/span&gt;&lt;/b&gt;.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;Program Example&amp;nbsp;&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;#include&amp;lt;&lt;b&gt;stdio.h&lt;/b&gt;&amp;gt;&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;int main()&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; FILE &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;*fp&lt;/span&gt;&lt;/b&gt;;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; if(fp=&lt;b&gt;fopen&lt;/b&gt;(&quot;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;hello.txt&lt;/span&gt;&lt;/b&gt;&quot;, &quot;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;w&lt;/span&gt;&lt;/b&gt;&quot;))&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; if(&lt;b&gt;fprintf&lt;/b&gt;(&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;fp&lt;/b&gt;&lt;/span&gt;,&quot;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;c programming&lt;/span&gt;&lt;/b&gt;&quot;)&amp;gt;=0)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; printf(&quot;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;write operation successful by using the &lt;/span&gt;fprintf&lt;span style=&quot;color: #2b00fe;&quot;&gt; function&lt;/span&gt;&lt;/b&gt;&quot;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;b&gt; fclose&lt;/b&gt;(&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;fp&lt;/span&gt;&lt;/b&gt;);&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; return 0;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;2. fputs() Function&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: verdana; letter-spacing: 0.162px; text-align: left;&quot;&gt;The&lt;span style=&quot;color: #273239;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;fputs()&lt;/b&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana; letter-spacing: 0.162px; text-align: left;&quot;&gt;function is used to write a single line of characters into a file. It is &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana; letter-spacing: 0.162px; text-align: left;&quot;&gt;used to write a line (&lt;b&gt;Character line&lt;/b&gt;) to the file.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; color: #273239; font-family: verdana; letter-spacing: 0.162px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: justify;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;background-color: white; color: #800180; font-family: verdana; font-size: medium; letter-spacing: 0.162px; text-align: left;&quot;&gt;Syntax&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: verdana; letter-spacing: 0.162px; text-align: left;&quot;&gt;int &lt;b&gt;fputs&lt;/b&gt;(char&lt;span style=&quot;color: #273239;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;String[]&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #273239;&quot;&gt;, FILE &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;*fp&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #273239;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;background-color: white; color: #273239; font-family: verdana; letter-spacing: 0.162px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: verdana; letter-spacing: 0.162px; text-align: left;&quot;&gt;It&amp;nbsp; takes &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;2 arguments&lt;/span&gt;&lt;/b&gt;. The &lt;b&gt;first argument&lt;/b&gt; is a&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana; letter-spacing: 0.162px; text-align: left;&quot;&gt;&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;s&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;tring&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana; letter-spacing: 0.162px; text-align: left;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;which is to be written&amp;nbsp; into the file and the &lt;b&gt;second argument&lt;/b&gt; is the &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;pointer of the file&lt;/b&gt;&lt;/span&gt; means a file pointer in which the string is to be written.&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana; letter-spacing: 0.162px; text-align: left;&quot;&gt;&amp;nbsp;It returns &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;1&lt;/span&gt;&lt;/b&gt; if the write operation was &lt;b&gt;successful&lt;/b&gt;, otherwise, it returns &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;0&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: verdana; letter-spacing: 0.162px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4&gt;&lt;span style=&quot;background-color: white; color: #800180; font-family: verdana; font-size: medium; letter-spacing: 0.162px; text-align: left;&quot;&gt;Program Example&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;#include&amp;lt;&lt;b&gt;stdio.h&lt;/b&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;int &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;main&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; FILE &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;*fp&lt;/span&gt;&lt;/b&gt;;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; if(fp=&lt;b&gt;fopen&lt;/b&gt;(&quot;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;hello.txt&lt;/span&gt;&lt;/b&gt;&quot;,&quot;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;w&lt;/span&gt;&lt;/b&gt;&quot;))&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; if(&lt;b&gt;fputs&lt;/b&gt;(&quot;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;C Programming&lt;/span&gt;&lt;/b&gt;&quot;, &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;fp&lt;/span&gt;&lt;/b&gt;)&amp;gt;=0)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;b&gt;printf&lt;/b&gt;(&quot;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;String written to the file successful&lt;/span&gt;&lt;/b&gt;&quot;);&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;b&gt;fclose&lt;/b&gt;(&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;fp&lt;/span&gt;&lt;/b&gt;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; return 0;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4&gt;&lt;span style=&quot;color: #800180;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;3. fputc() Function&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;fputc()&lt;/span&gt;&lt;/b&gt; function is used to write a single character to the file.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Syntax&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;int &lt;b&gt;fputc&lt;/b&gt;(char &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;Character&lt;/span&gt;&lt;/b&gt;, FILE &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;*fp&lt;/span&gt;&lt;/b&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: verdana; letter-spacing: 0.162px; text-align: left;&quot;&gt;It also takes 2 arguments. The &lt;b&gt;first argument&lt;/b&gt; is a&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana; letter-spacing: 0.162px; text-align: left;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;Character&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana; letter-spacing: 0.162px; text-align: left;&quot;&gt;&amp;nbsp;which is to be written in the file and the &lt;b&gt;second argument &lt;/b&gt;is the&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt; pointer of the file&lt;/b&gt;&lt;/span&gt; means a file pointer in which the string is to be written.&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana; letter-spacing: 0.162px; text-align: left;&quot;&gt;&amp;nbsp;It returns 1 if the write operation was successful, otherwise, it returns 0.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: verdana; letter-spacing: 0.162px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4&gt;&lt;span style=&quot;background-color: white; color: #800180; font-family: verdana; font-size: medium; letter-spacing: 0.162px; text-align: left;&quot;&gt;Program Example&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: verdana; font-size: medium; letter-spacing: 0.162px; text-align: left;&quot;&gt;&lt;div style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;#include&amp;lt;&lt;b&gt;stdio.h&lt;/b&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;int&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;main&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; FILE&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;*fp&lt;/span&gt;&lt;/b&gt;;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; if(fp=&lt;b&gt;fopen&lt;/b&gt;(&quot;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;hello.txt&lt;/span&gt;&lt;/b&gt;&quot;,&quot;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;w&lt;/span&gt;&lt;/b&gt;&quot;))&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;b style=&quot;color: black;&quot;&gt;fputc&lt;/b&gt;(&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;C&#39;&lt;/span&gt;&lt;/b&gt;,&amp;nbsp;&lt;b style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;fp&lt;/span&gt;&lt;/b&gt;)&amp;gt;=0)&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;b&gt;fclose&lt;/b&gt;(&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;fp&lt;/span&gt;&lt;/b&gt;);&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; return 0;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;letter-spacing: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Output&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;color: #ff00fe; font-family: verdana; font-size: medium;&quot;&gt;C will be written to the file.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; letter-spacing: normal; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #800180; font-family: verdana; font-size: medium; letter-spacing: 0.162px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #273239; font-family: verdana; letter-spacing: 0.162px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/8675392797878739592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2023/01/file-operation-writing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/8675392797878739592'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/8675392797878739592'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2023/01/file-operation-writing.html' title='File Operation-Writing'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-1017787048577109533</id><published>2023-01-09T10:10:00.005+05:30</published><updated>2023-01-09T14:12:22.836+05:30</updated><title type='text'>File operations- Reading</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: large;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: verdana;&quot;&gt;Reading from the File&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In C programming we can read content of a file by using&lt;b&gt; fscanf()&lt;/b&gt;,&amp;nbsp; &lt;b&gt;fgets()&lt;/b&gt; and &lt;b&gt;fgetc()&lt;/b&gt; functions. All these functions are used to read the contents of a file. Let us discuss about those functions one by one :-&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;1. fscanf() Function&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The &lt;b&gt;fscanf()&lt;/b&gt; function is used to read character set means strings from the file. It returns &lt;b&gt;EOF&lt;/b&gt; (&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;End Of File&lt;/b&gt;&lt;/span&gt;), when all the content of the file are read by it. IT does not read spaces.&lt;/span&gt;&lt;/p&gt;&lt;h4 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;Syntax&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/h4&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;fscanf&lt;/b&gt;(FILE &lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;*fp&lt;/b&gt;&lt;/span&gt;, const char &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;string[]&lt;/span&gt;&lt;/b&gt;)&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The &lt;b&gt;fscanf()&lt;/b&gt; method accepts two arguments or parameters. first one is a pointer of FILE type which is a &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;file pointer&lt;/span&gt;&lt;/b&gt; and the other one is the &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;string of character&lt;/span&gt;&lt;/b&gt; in which the characters are stored after reading from the file.&lt;/span&gt;&lt;/p&gt;&lt;h4 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Program Example&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;#include&amp;lt;&lt;b&gt;stdio.h&lt;/b&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;int main()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;b&gt;FILE&lt;/b&gt; &lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;*fp&lt;/b&gt;&lt;/span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; char &lt;span style=&quot;color: #2b00fe;&quot;&gt;str[100]&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; fp=&lt;b&gt;fopen&lt;/b&gt;(&quot;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;hello.txt&lt;/span&gt;&lt;/b&gt;&quot;, &quot;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;r&lt;/span&gt;&lt;/b&gt;&quot;);&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; while(&lt;b&gt;fscanf&lt;/b&gt;(&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;fp&lt;/span&gt;&lt;/b&gt;,&quot;%s&quot;,str)!=EOF)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; printf(&quot;%s&quot;,&lt;b&gt;str&lt;/b&gt;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;b&gt;fclose&lt;/b&gt;(&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;fp&lt;/span&gt;&lt;/b&gt;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; return 0;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;2. fgets() Function&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana; text-align: justify;&quot;&gt;The &lt;/span&gt;&lt;b style=&quot;font-family: verdana; text-align: justify;&quot;&gt;fgets()&lt;/b&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; function in C is used to &lt;span style=&quot;color: #2b00fe;&quot;&gt;read string from the stream&lt;/span&gt;. We can specify the number of characters which we want to read from the file by the &lt;/span&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;fgets()&lt;/b&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; function. Means we can read a string to a particular&amp;nbsp;range of characters by using &lt;/span&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;fgets()&lt;/b&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; function. This method can read the &lt;span style=&quot;color: #2b00fe;&quot;&gt;spaces also.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Syntax&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;fgets&lt;/b&gt;(&lt;b&gt;char &lt;span style=&quot;color: #2b00fe;&quot;&gt;*string&lt;/span&gt;&lt;/b&gt;, &lt;b&gt;int&lt;/b&gt; &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;length&lt;/span&gt;&lt;/b&gt;, &lt;b&gt;FILE &lt;/b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;*fp&lt;/b&gt;&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The &lt;b&gt;fgets()&lt;/b&gt; function accepts &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;three&lt;/span&gt;&lt;/b&gt; parameters or arguments which are given below:-&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;char string&lt;/span&gt; &lt;/b&gt;: It is a string which will store the data after reading from the file.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;int length&lt;/span&gt;&lt;/b&gt; : It is an integer which gives the length of string to be considered.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;FILE *fp&lt;/span&gt; &lt;/b&gt;: It is the pointer to be opened file or you can say that a file pointer.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Program Example&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;#include&amp;lt;&lt;b&gt;stdio.h&lt;/b&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;int main()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &lt;b&gt;&amp;nbsp; FILE&lt;/b&gt; &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;*fp&lt;/span&gt;&lt;/b&gt;;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; char &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;str[100]&lt;/b&gt;&lt;/span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; if(fp=&lt;b&gt;fopen&lt;/b&gt;(&quot;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;hello.txt&lt;/b&gt;&lt;/span&gt;&quot;,&quot;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;r&lt;/b&gt;&lt;/span&gt;&quot;))&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; printf(&quot;%s&quot;, &lt;b&gt;fgets&lt;/b&gt;(&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;str&lt;/span&gt;&lt;/b&gt;, &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;50&lt;/span&gt;&lt;/b&gt;, &lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;file&lt;/b&gt;&lt;/span&gt;));&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;b&gt;fclose&lt;/b&gt;(&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;fp&lt;/b&gt;&lt;/span&gt;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; return 0;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;3. fgetc() Function&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The &lt;b&gt;fgetc()&lt;/b&gt; function in C is used to return &lt;span style=&quot;color: #2b00fe;&quot;&gt;a single character&lt;/span&gt; from the file. IT gets a character from the file and return &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;EOF&lt;/span&gt;&lt;/b&gt; at the end of the file. If we want to read only a single character from the file then we can use &lt;b&gt;fgetc()&lt;/b&gt; function.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;Syntax&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;fgetc&lt;/b&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;FILE&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; &lt;/span&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;*fp&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The &lt;b&gt;fgetc()&lt;/b&gt; function accepts only a&lt;span style=&quot;color: #2b00fe;&quot;&gt; single parameter or argument&lt;/span&gt; that is a &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;file pointer.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;Program Example&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;#include&amp;lt;&lt;b&gt;stdio.h&lt;/b&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;int main()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;b&gt;FILE&lt;/b&gt; &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;*fp&lt;/span&gt;&lt;/b&gt;;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; char &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;str;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; if(fp=&lt;b&gt;fopen&lt;/b&gt;(&quot;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;hello.txt&lt;/span&gt;&lt;/b&gt;&quot;,&quot;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;r&lt;/span&gt;&lt;/b&gt;&quot;))&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; while((str=&lt;b&gt;fgetc&lt;/b&gt;(&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;fp&lt;/span&gt;&lt;/b&gt;))!=&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;EOF&lt;/span&gt;&lt;/b&gt;)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;{&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&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; printf(&quot;%c&quot;,&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;str&lt;/span&gt;&lt;/b&gt;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;b&gt;fclose&lt;/b&gt;(&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;fp&lt;/span&gt;&lt;/b&gt;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; return 0;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/1017787048577109533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2023/01/file-operations.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/1017787048577109533'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/1017787048577109533'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2023/01/file-operations.html' title='File operations- Reading'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-333254373696497105</id><published>2023-01-07T10:30:00.006+05:30</published><updated>2023-01-09T09:50:48.934+05:30</updated><title type='text'>File Handling In C</title><content type='html'>&lt;h2 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;&amp;nbsp;File&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;A File represents a &lt;b&gt;sequence of bites &lt;/b&gt;on the disk where the group of related data is stored.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;File is a place on storage disk where a group of related data is stored.Files provides a way to store large volume of data that can be used whenever needed.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;Types of File&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;C programming language supports &lt;b&gt;two types&lt;/b&gt; of files and they are as follows :-&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;1. Text Files&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The file that contains &lt;b&gt;ASCII codes&lt;/b&gt; of data like &lt;span style=&quot;color: #2b00fe;&quot;&gt;digits&lt;/span&gt;, &lt;span style=&quot;color: #2b00fe;&quot;&gt;alphabets&amp;nbsp;&lt;/span&gt;and &lt;span style=&quot;color: #2b00fe;&quot;&gt;symbol&lt;/span&gt; is called &lt;b&gt;text file &lt;/b&gt;or &lt;b&gt;ASCII file&lt;/b&gt; like&lt;span style=&quot;color: red;&quot;&gt; txt file&lt;/span&gt;, &lt;span style=&quot;color: red;&quot;&gt;doc file&lt;/span&gt; etc.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;2. Binary Files&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The file that contains data in the form of &lt;b&gt;bytes&lt;/b&gt; (&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;0&#39;s and 1&#39;s&lt;/b&gt;&lt;/span&gt;) is called as &lt;b&gt;binary file&lt;/b&gt;. Generally, the binary files are compiled version of text files. like &lt;span style=&quot;color: red;&quot;&gt;bin file&lt;/span&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: large;&quot;&gt;File Handling&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The process of file handling refers to the method of storing data on the disk in the C program in the form of and output or input that might have been generated while running a C program.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;File handling &lt;/b&gt;in C enables us to &lt;b&gt;create&lt;/b&gt;, &lt;b&gt;update&lt;/b&gt;, &lt;b&gt;read &lt;/b&gt;and &lt;b&gt;delete&lt;/b&gt; the files stored on the local file system through our C program. The operations can be performed on a file are given below :-&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;1. Creation of the new file /&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Opening an existing file.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;2. Reading from the file.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;3. Writing to the file.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;4. Closing a file/Deleting the file.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Let us discuss one by one:-&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;1. Creation of the new file/ Opening and existing file&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;A file can be created or an existing file can be opened by using &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;fopen()&lt;/span&gt;&lt;/b&gt; function. It is a predefined function which is defined in the &lt;b&gt;stdio.h&lt;/b&gt; headerfiles.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;firstly, the&amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;fopen()&lt;/span&gt;&lt;/b&gt; function searches the file to be opened.If the file does not exist, it will be created newly in the location where the program is stored with the &lt;b&gt;filename&lt;/b&gt;. Then it loads the file from the disk and place it into the buffer. The buffer is used to provide efficiency for the read operation. and sets up a character pointer which points to the first character of the file.&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;Syntax&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;FILE &lt;b&gt;fopen&lt;/b&gt;(const char&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;filename&lt;/span&gt;&lt;/b&gt;, const char &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;mode&lt;/span&gt;&lt;/b&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The&lt;b&gt; fopen&lt;/b&gt; function takes two arguments or parameters.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b style=&quot;font-size: large;&quot;&gt;1. The filename (string) :&lt;/b&gt;&lt;span style=&quot;font-size: large;&quot;&gt; &lt;/span&gt;If&amp;nbsp;the file is stored at some specific location, then we must mention the full path at which the file is stored. For example : A file name can be like &quot;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;C:folder/subfolder/filename.ext&lt;/span&gt;&lt;/b&gt;&quot;.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;2. The mode (string) :&lt;/b&gt;&lt;/span&gt;&amp;nbsp;The mode in which the file is to be opened. In C programming various modes are available which can be used with the &lt;b&gt;fopen() &lt;/b&gt;function on the basis of what operation we wants to do on the file.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Example&amp;nbsp;&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;FILE &lt;b&gt;*fp&lt;/b&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;fp=&lt;b&gt;fopen&lt;/b&gt;(&quot;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;student.txt&lt;/b&gt;&lt;/span&gt;&quot;, &quot;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;w&lt;/b&gt;&lt;/span&gt;&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In the above example, if the file &quot;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;student.txt&lt;/b&gt;&lt;/span&gt;&quot; does not exist, it will be created newly in the location where the program is stored because there is no path if given. If the file is already exists then contents will be deleted and opened as an empty file. Reading operation is not allowed on that file because the file is opened in &quot;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;w&lt;/span&gt;&lt;/b&gt;&quot; mode.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;If we want to perform reading operation also on that file , then the file should be opened in &quot;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;w+&lt;/span&gt;&lt;/b&gt;&quot; mode like&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;fp=&lt;b&gt;fopen&lt;/b&gt;(&quot;&lt;span style=&quot;color: #2b00fe;&quot;&gt;student.txt&lt;/span&gt;&quot;, &quot;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;w+&lt;/span&gt;&lt;/b&gt;&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Program Example&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;#include&amp;lt;&lt;b&gt;stdio.h&lt;/b&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;int main()&lt;br /&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;b&gt;FILE&lt;/b&gt; *&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;fp&lt;/b&gt;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; if(&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;fp&lt;/b&gt;&lt;/span&gt;=&lt;b&gt;fopen&lt;/b&gt;(&quot;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;student.txt&lt;/span&gt;&lt;/b&gt;&quot;, &quot;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;r&lt;/span&gt;&lt;/b&gt;&quot;))&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; printf(&quot;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;file opened successfully in read mode&lt;/span&gt;&lt;/b&gt;&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; else&lt;br /&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; printf(&quot;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;The file is not exist with that name&lt;/span&gt;&lt;/b&gt;&quot;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;b&gt;fclose&lt;/b&gt;(&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;fp&lt;/b&gt;&lt;/span&gt;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; return 0;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;We can open the file one of the following modes by using&amp;nbsp;&lt;b&gt;fopen()&lt;/b&gt; function :-&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b style=&quot;font-size: large;&quot;&gt;&quot;w&quot; mode : &lt;/b&gt;Open a&lt;b&gt; text file&lt;/b&gt; in &lt;b&gt;write mode&lt;/b&gt;. If the file exists, its contents are&lt;span style=&quot;color: red;&quot;&gt; overwritten&lt;/span&gt; and if the file does not exist, it will be &lt;span style=&quot;color: red;&quot;&gt;created&lt;/span&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b style=&quot;font-size: large;&quot;&gt;&quot;r&quot; Mode : &lt;/b&gt;Opens a &lt;b&gt;text file&lt;/b&gt; in &lt;b&gt;read mode&lt;/b&gt;. If the file does not exist, &lt;b&gt;fopen()&lt;/b&gt; returns&lt;span style=&quot;color: red;&quot;&gt; NULL&lt;/span&gt;. If the file exists, it can be &lt;span style=&quot;color: red;&quot;&gt;read&lt;/span&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;&quot;a&quot; Mode :&lt;/b&gt;&lt;/span&gt;&amp;nbsp;Opens a &lt;b&gt;text file&lt;/b&gt; in &lt;b&gt;append mode&lt;/b&gt;. If the file does not exist, it will be &lt;span style=&quot;color: red;&quot;&gt;created&lt;/span&gt;. If the file exists, contents can be &lt;span style=&quot;color: #2b00fe;&quot;&gt;added&amp;nbsp;to the end of the file&lt;/span&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b style=&quot;font-size: large;&quot;&gt;&quot;w+&quot; Mode : &lt;/b&gt;Open for both &lt;b&gt;reading &lt;/b&gt;and &lt;b&gt;writing&lt;/b&gt;. If the file exists, its contents are &lt;span style=&quot;color: red;&quot;&gt;overwritten&lt;/span&gt;, if the file does not exist, it will be&lt;span style=&quot;color: red;&quot;&gt; created&lt;/span&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b style=&quot;font-size: large;&quot;&gt;&quot;r+&quot; Mode :&amp;nbsp;&lt;/b&gt;Open for both &lt;b&gt;reading &lt;/b&gt;and&lt;b&gt; writing&lt;/b&gt;. If the file does not exists,&amp;nbsp;&lt;b&gt; fopen() &lt;/b&gt;returns &lt;span style=&quot;color: red;&quot;&gt;NULL&lt;/span&gt;, if the file exist, the contents can be &lt;span style=&quot;color: red;&quot;&gt;read.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;&quot;a+&quot; Mode :&lt;/b&gt;&lt;/span&gt;&amp;nbsp;Open for both &lt;b&gt;reading &lt;/b&gt;and &lt;b&gt;appending&lt;/b&gt;. If the file does not exist, it will be &lt;span style=&quot;color: red;&quot;&gt;created&lt;/span&gt;. If the file exists, the contents can be &lt;span style=&quot;color: #2b00fe;&quot;&gt;added&amp;nbsp;to the&lt;/span&gt; &lt;span style=&quot;color: #2b00fe;&quot;&gt;end of the file.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;&quot;rb&quot; Mode :&lt;/b&gt;&lt;/span&gt;&amp;nbsp;Opens a &lt;b&gt;binary file &lt;/b&gt;in &lt;b&gt;read mode&lt;/b&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;&quot;wb&quot; Mode :&lt;/b&gt;&lt;/span&gt;&amp;nbsp;Opens a &lt;b&gt;binary file &lt;/b&gt;in &lt;b&gt;write mode&lt;/b&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;&quot;ab&quot; Mode :&lt;/b&gt;&lt;/span&gt;&amp;nbsp;Opens a &lt;b&gt;binary file&lt;/b&gt; in &lt;b&gt;append mode&lt;/b&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;Closing&amp;nbsp; a File&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Whenever we want to close the file we can use &lt;b&gt;fclose()&lt;/b&gt; function. The &lt;b&gt;fclose()&lt;/b&gt; function is used to close a file. The file must be closed after all the operations on it.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4&gt;&lt;span style=&quot;color: #800180; font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Syntax&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;fclose&lt;/b&gt;(FILE &lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;*fp&lt;/b&gt;&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/333254373696497105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2023/01/file-handling-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/333254373696497105'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/333254373696497105'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2023/01/file-handling-in-c.html' title='File Handling In C'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-2041271457507464852</id><published>2023-01-04T15:49:00.010+05:30</published><updated>2023-01-06T12:24:20.124+05:30</updated><title type='text'>Dynamic Memory Allocation in C</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;&amp;nbsp;Dynamic Memory Allocation&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;Dynamic Memory Allocation&lt;/span&gt;&lt;/b&gt; means Memory allocated at runtime.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Dynamic Memory Allocation &lt;/b&gt;can be defined as a procedure in which the size of data structure (like array)is changed during the runtime.&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;C programming provides some functions to achieve the &lt;b&gt;Dynamic Memory allocation.&lt;/b&gt;&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;There are 4 library functions provided by C defined under the &amp;lt;&lt;span style=&quot;color: red;&quot;&gt;stdlib.h&lt;/span&gt;&amp;gt; header file.The functions are:&amp;nbsp;&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;&lt;b&gt;1&lt;/b&gt;.&lt;b&gt; malloc()&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;2. calloc()&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;3. realloc()&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;4. free()&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-size: large; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;font-size: large; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;1. malloc() function&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The &lt;b&gt;malloc&lt;/b&gt; means &lt;b&gt;memory allocation&lt;/b&gt; method in C is used to allocate a single large block of memory dynamically with the specified size in bytes. &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;malloc()&lt;/span&gt;&lt;/b&gt; functions returns a generic void pointer which can be cast into a pointer of any form.&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;It has initialized each block with the default garbage value initially.The memory will initialize in the Heap section.&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;Generally we use malloc function to locate the memory for structures.&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;&lt;b&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;Syntax&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&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;ptr= (&lt;span style=&quot;color: #800180;&quot;&gt;cast-type*)&lt;/span&gt; &lt;b&gt;malloc&lt;/b&gt; (&lt;span style=&quot;color: red;&quot;&gt;byte-size&lt;/span&gt;);&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;Example&amp;nbsp;&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;ptr= (&lt;span style=&quot;color: #800180;&quot;&gt;int*&lt;/span&gt;) &lt;b&gt;malloc&lt;/b&gt; (20*&lt;span style=&quot;color: #2b00fe;&quot;&gt;sizeof(int)&lt;/span&gt;);&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;This statement will allocate &lt;b&gt;80 bytes&lt;/b&gt; ( since the size of int is 4 bytes) of memory.and the pointer &lt;b&gt;ptr&lt;/b&gt; holds the address of the first byte in allocated memory&amp;nbsp; (base address).&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;It returns NULL if memory is not allocated or not sufficient.&lt;/div&gt;&lt;h4 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Program Example&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;#include&amp;lt;stdlib.h&amp;gt;&lt;/div&gt;&lt;div&gt;#include&amp;lt;stdio.h&amp;gt;&lt;/div&gt;&lt;div&gt;int main()&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; int n,i,*ptr,sum=0;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; printf(&quot;&lt;span style=&quot;color: red;&quot;&gt;Enter number of elements:&lt;/span&gt;&quot;);&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; scanf(&quot;%d&quot;,&amp;amp;n);&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; ptr=(&lt;span style=&quot;color: #2b00fe;&quot;&gt;int*&lt;/span&gt;) &lt;b&gt;malloc &lt;/b&gt;(n*&lt;b&gt;&lt;span style=&quot;color: #ff00fe;&quot;&gt;sizeof(int)&lt;/span&gt;&lt;/b&gt;);&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; if(&lt;span style=&quot;color: #800180;&quot;&gt;ptr==NULL&lt;/span&gt;)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp; &lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; printf(&quot;&lt;span style=&quot;color: red;&quot;&gt;Sorry unable to allocate memory&lt;/span&gt;&quot;);&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; exit(0);&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; printf(&quot;&lt;span style=&quot;color: red;&quot;&gt;enter elements of array:&lt;/span&gt;&quot;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; for(i=0;i&amp;lt;n;i++)&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; scanf(&quot;%d&quot;, ptr+i);&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; sum+= *(&lt;span style=&quot;color: #800180;&quot;&gt;ptr+i&lt;/span&gt;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; printf(&quot;sum=%d&quot;, &lt;b&gt;sum&lt;/b&gt;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;free(&lt;b&gt;ptr&lt;/b&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;return 0;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ff00fe; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;Output&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;color: #ff00fe;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ff00fe; font-family: verdana;&quot;&gt;Enter number of elements : &lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;3&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #ff00fe; font-family: verdana;&quot;&gt;Enter elements of array : 10 11 12&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;sum=33&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #ff00fe; font-family: verdana;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;2. calloc() function&lt;/b&gt;&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;calloc &lt;/b&gt;means &lt;b&gt;contiguous allocation&lt;/b&gt; method in C is used to dynamically allocate the specified number of blocks of memory of the specified type.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;this method is very much similar to &lt;span style=&quot;color: red;&quot;&gt;malloc() &lt;/span&gt;but has some differences are given below :-&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It has two parameters or arguments as compare to malloc() function which has only one parameter.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;calloc() method allocate the&amp;nbsp; multiple blocks of specified size.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It initializes each block with a default value &#39;0&#39;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Syntax&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;ptr=(&lt;span style=&quot;color: #2b00fe;&quot;&gt;cast-type*&lt;/span&gt;) &lt;b&gt;calloc(&lt;/b&gt;n, element-size);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Here, n is the number of elements and element-size is the size of each block.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Example&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;ptr=(&lt;span style=&quot;color: #2b00fe;&quot;&gt;float*&lt;/span&gt;)&lt;b&gt;calloc(&lt;/b&gt;25,sizeof(&lt;span style=&quot;color: #2b00fe;&quot;&gt;float&lt;/span&gt;));&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;This statement allocates contiguous blocks in memory for 25 elements each with the size of the float.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;If space is insufficient, allocation fails and returns a &lt;b&gt;NULL&lt;/b&gt; pointer.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Program Example&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;# include&amp;lt;&lt;b&gt;stdio.h&lt;/b&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;#include&amp;lt;&lt;b&gt;stdlib.h&lt;/b&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;int main()&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; int *ptr, n, i;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; printf(&quot;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;Enter the number of elements in the array:&lt;/b&gt;&lt;/span&gt;&quot;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; sacnf(&quot;%d&quot;, &amp;amp;n);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; ptr=(int*)&lt;b&gt;calloc&lt;/b&gt;(n,sizeof(int));&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; if(&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;ptr==NULL&lt;/b&gt;&lt;/span&gt;)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; printf(&quot;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;memory is not allocated:&lt;/b&gt;&lt;/span&gt;\n&quot;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; exit(0);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;}&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; else&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; printf(&quot;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;Memory successfully allocated using calloc:&lt;/b&gt;&lt;/span&gt;\n&quot;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; for(i=0;i&amp;lt;n;++i)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; ptr[i]=i+1;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;printf(&quot;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;The elements of the array are:&lt;/b&gt;&lt;/span&gt;&quot;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;for(i=0;i&amp;lt;n;++i)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;{&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; printf(&quot;%d&quot;,ptr[i]);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;return 0;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Output&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #ff00fe;&quot;&gt;Enter the number of elements in the array :&lt;/span&gt;&lt;b&gt; 5&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ff00fe; font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ff00fe; font-family: verdana;&quot;&gt;Memory successfully allocated using calloc&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ff00fe; font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #ff00fe;&quot;&gt;The elements of the array are : &lt;/span&gt;&lt;b&gt;2 5 4 6 8&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;3. realloc() function&lt;/span&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;realloc &lt;/b&gt;means &lt;b&gt;Re-allocation &lt;/b&gt;method in C is used to dynamically change the memory allocation of a previously allocated memory. We can say if the memory previously allocated with the help of &lt;span style=&quot;color: #2b00fe;&quot;&gt;malloc()&lt;/span&gt; or &lt;span style=&quot;color: #2b00fe;&quot;&gt;calloc() &lt;/span&gt;function is insufficient, &lt;b&gt;realloc()&lt;/b&gt; function can be used to re-allocated the memory dynamically.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;re-allocation of memory maintains the already present value and new blocks will be initialized with the default value.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;Syntax&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;ptr=&lt;b&gt;realloc&lt;/b&gt;(ptr, &lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;newsize&lt;/b&gt;&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;where ptr is reallocated with the new size &quot;&lt;b&gt;newsize&lt;/b&gt;&quot;.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;Example&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;int &lt;b&gt;*ptr&lt;/b&gt;=(int*)&lt;b&gt;malloc&lt;/b&gt;(&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;5*sizeof(int)&lt;/b&gt;&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;This statement will allocate a single memory block of &lt;b&gt;20 bytes&lt;/b&gt;(if the integer size will be 4 bytes) and allocated to ptr.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;If we want to change the memory allocated to ptr then we can use &lt;b&gt;realloc() &lt;/b&gt;function to change the allocated memory dynamically.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;ptr&lt;/b&gt;=&lt;b&gt;realloc&lt;/b&gt;(ptr, &lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;10*sizeof(int)&lt;/b&gt;&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;By using this statement the size of ptr is changed from 20 bytes to &lt;b&gt;40 bytes &lt;/b&gt;dynamically and allocated to ptr.&lt;/span&gt;&lt;/div&gt;&lt;h4&gt;&lt;span style=&quot;color: #800180;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Program Example&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;#include&amp;lt;&lt;b&gt;stdio.h&lt;/b&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;#include&amp;lt;&lt;b&gt;stdlib.h&lt;/b&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;int main()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; int *ptr, n, i;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; printf(&quot;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;Enter the number of elements in the array:&lt;/b&gt;&lt;/span&gt;&quot;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; scanf(&quot;%d&quot;, &amp;amp;n);&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; ptr=(&lt;span style=&quot;color: red;&quot;&gt;int*&lt;/span&gt;)&lt;b&gt;calloc&lt;/b&gt;(n,&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;sizeof(int)&lt;/span&gt;&lt;/b&gt;);&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; if(&lt;b&gt;ptr==NULL&lt;/b&gt;)&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; printf(&quot;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Memory not allocated\n&lt;/span&gt;&lt;/b&gt;&quot;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; exit(0);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; else&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; printf(&quot;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;Memory successfully allocated\n&lt;/b&gt;&lt;/span&gt;&quot;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; for(i=0;i&amp;lt;n;++i)&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; ptr[i]=i+1;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; printf(&quot;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;The elements of the array are:&lt;/b&gt;&lt;/span&gt;&quot;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; for(i=0;i&amp;lt;n;++i);&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; printf(&quot;%d&quot;,ptr[i]);&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; printf(&quot;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;Enter the new size :&lt;/b&gt;&lt;/span&gt;&quot;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; scanf(&quot;%d&quot;, &amp;amp;n);&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; ptr=realloc(ptr, n*sizeof(int));&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; printf(&quot;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;Memory successfully re=allocated\n&lt;/b&gt;&lt;/span&gt;&quot;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; for(i=0;i&amp;lt;n;++i)&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; ptr[i]=-i+1;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; printf(&quot;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;The elements of the new array are:&lt;/b&gt;&lt;/span&gt;&quot;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; for(i=0;i&amp;lt;n;++i)&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; printf(&quot;%d&quot;, ptr[i]);&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; free(ptr);&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&amp;nbsp;return 0;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;4. free() function&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The &lt;b&gt;free()&lt;/b&gt; method in C programming is used to dynamically de-allocate the memory which is allocated by the &lt;b&gt;calloc()&lt;/b&gt; or &lt;b&gt;malloc()&lt;/b&gt; method. It helps to reduce the wastage of memory.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The memory occupied by &lt;b&gt;malloc()&lt;/b&gt; or &lt;b&gt;calloc()&lt;/b&gt; functions must be released by calling &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;free()&lt;/span&gt;&lt;/b&gt; function. If we do not free the memory which is already allocated than it will consume memory until program exit.&lt;/span&gt;&lt;/div&gt;&lt;h4&gt;&lt;span style=&quot;color: #800180;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;Syntax&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;free(&lt;b&gt;ptr&lt;/b&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;Note :&lt;/span&gt;&amp;nbsp; &lt;span style=&quot;font-weight: normal;&quot;&gt;If we will try to access the memory location which has been de-allocated by using &lt;/span&gt;free()&lt;span style=&quot;font-weight: normal;&quot;&gt; function then it will show you an undefined behavior.&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ff00fe; font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #ff00fe;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&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;&lt;br /&gt;&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;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/2041271457507464852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2023/01/dynamic-memory-allocation-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/2041271457507464852'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/2041271457507464852'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2023/01/dynamic-memory-allocation-in-c.html' title='Dynamic Memory Allocation in C'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-5961620931416804362</id><published>2022-12-03T10:06:00.003+05:30</published><updated>2022-12-03T10:06:34.326+05:30</updated><title type='text'>Array In C Programming</title><content type='html'>&lt;p&gt;&amp;nbsp;Array&lt;/p&gt;&lt;p&gt;An Array is defined as the collection of similar types of data item stored at contiguous memory locations.&lt;/p&gt;&lt;p&gt;Array are the derived data types in C programming language which can store the basic data types such as int, char, float, double etc.&lt;/p&gt;&lt;p&gt;An array can be One Dimensional, Two Dimensional or Multi Dimensional. The C language places no limits on the number of dimensions in an array. A one dimensional array is like a list and a two dimensional array is just like a matrix in the form of rows and columns.&lt;/p&gt;&lt;p&gt;All array elements consist of contiguous memory locations. The lowest address corresponds to the first element and the highest address corresponds to the last address.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/5961620931416804362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2022/12/array-in-c-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/5961620931416804362'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/5961620931416804362'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2022/12/array-in-c-programming.html' title='Array In C Programming'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-5102437865491322331</id><published>2022-05-31T15:38:00.004+05:30</published><updated>2022-07-16T09:55:25.858+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python Programming Unit 1"/><title type='text'>Python IDE</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;IDE&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;IDE stands for &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;Integrated Development Environment&lt;/span&gt;&lt;/b&gt; is defined as a coding tool that helps to automate the process of editing, compiling, testing etc. in an SDLC and provides ease to developer to run, write and debug the code.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It is specially designed for software development that consists of several tools which is used for developing and testing the software.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;There are some Python IDE&#39;s which are as follows :&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;PyCharm&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Spyder&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;PyDev&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Wing&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Thonny&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Jupyter Notebook&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Microsoft Visual Studio&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Eric&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;PYCHARM&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;PyCharm was developed by the &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;Jet Brains&lt;/span&gt;&lt;/b&gt;, and it is a cross-platform integrated&amp;nbsp;development environment specially designed for python. it is the most widely used IDE and available in both paid version and free open source as well. It saves ample time by taking care of routine tasks.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It is a complete python IDE that is loaded with a rich set of features like auto code completion, quick project navigation, fast error checking and correction, remote development support., database accessibility&amp;nbsp;etc.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&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/AVvXsEjwSLcAGepRTXt-ZcAtJ8cRO7dr3_Da_OiTHXEBwPgCkiIuMae2pgJfgZFqy4PVd-nDyCRdbNkf7RPG59SQh60kB2JnW8AoQXCLhLDjDC_AbIytha8KNEMYxyhodFmRrnIRcLU-VLGB2reMYFRBrExUF4JR-oaCAWhS_eUtC_ihRkeue7SzkOBKWLzK/s225/pycharm.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;225&quot; data-original-width=&quot;225&quot; height=&quot;169&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwSLcAGepRTXt-ZcAtJ8cRO7dr3_Da_OiTHXEBwPgCkiIuMae2pgJfgZFqy4PVd-nDyCRdbNkf7RPG59SQh60kB2JnW8AoQXCLhLDjDC_AbIytha8KNEMYxyhodFmRrnIRcLU-VLGB2reMYFRBrExUF4JR-oaCAWhS_eUtC_ihRkeue7SzkOBKWLzK/w225-h169/pycharm.jpg&quot; width=&quot;225&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Features&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Smart code navigation&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Errors Highlighting.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Powerful Debugger&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Supports python web development frameworks, i.e., Angular JS, Java Script.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;SPYDER&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Spyder is an open source that has high recognition in the IDE market and most suitable for data science. The full name of Spyder is Scientific Python Development Environment. It supports all the significant platforms like Linux, Windows, and MacOS, Etc.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It provides a set of features like localized code editor, document viewer, variable explorer, integrated console etc. and supports number of scientific modules like NumPy, SciPy etc.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&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/AVvXsEi1AvEE8QpsemTl642-nQJGKG1jPaKVxximBRa9lvFFjhAKPqECVw3wDTy9mVdJyN-2dwaIHou-Wyb2Ofkm_-qeBqxo1V6cQ2GHTNYHBv_EiT47sKJltES_qRv8JkScMD7sPDIGvH-betjxPl_ObQHjXbju-wnNpx6hi3OA17QE-ZX7nGg5tToCWbHb/s227/spyder.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;227&quot; data-original-width=&quot;222&quot; height=&quot;158&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1AvEE8QpsemTl642-nQJGKG1jPaKVxximBRa9lvFFjhAKPqECVw3wDTy9mVdJyN-2dwaIHou-Wyb2Ofkm_-qeBqxo1V6cQ2GHTNYHBv_EiT47sKJltES_qRv8JkScMD7sPDIGvH-betjxPl_ObQHjXbju-wnNpx6hi3OA17QE-ZX7nGg5tToCWbHb/w222-h158/spyder.jpg&quot; width=&quot;222&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Features&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Proper syntax highlighting and auto code completion&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Integrates strongly with IPython console.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;performs well in multi-language editor and auto code completion mode.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;PYDEV&lt;/span&gt;&lt;/h2&gt;&lt;/div&gt;&lt;blockquote style=&quot;border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;blockquote style=&quot;border: none; margin: 0px 0px 0px 40px; padding: 0px;&quot;&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;PyDev is defined as one of the commonly used Python IDE, which is an external plugin for Eclipse. It is a natural choice of the Python Developers that are coming from the Java background and very popular in the market as Python interpreter.&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&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/AVvXsEhsTVzvj9pgHKmS5JCYfinQQIukHk32xfqx_q7f56uGZpwczVRuwz8HwX5F-kYhfbwbYeLz-IufW_xrFfOXrxTFmhYLRj_duT7cU3nKBxLf_SHNpbC1KkQSYj_ymaD8USuuHRo9Y13OxvSam4UNSC9r8Qy-M0B8Ds_EihBfUZcQLzx4ttuXTqkccLkE/s230/pydev.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;230&quot; data-original-width=&quot;230&quot; height=&quot;161&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsTVzvj9pgHKmS5JCYfinQQIukHk32xfqx_q7f56uGZpwczVRuwz8HwX5F-kYhfbwbYeLz-IufW_xrFfOXrxTFmhYLRj_duT7cU3nKBxLf_SHNpbC1KkQSYj_ymaD8USuuHRo9Y13OxvSam4UNSC9r8Qy-M0B8Ds_EihBfUZcQLzx4ttuXTqkccLkE/w230-h161/pydev.png&quot; width=&quot;230&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Features&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Strong parameters&amp;nbsp;like refactoring, debugging, code analysis and code coverage function.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It supports virtual environments, MyPy, and block formatter.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Also supports PyLint integration, remote debugger, Unit test integration, etc.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;WING&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It is defined as a cross-platform IDE that is packed with necessary&amp;nbsp;features and with decent development support. Its personal edition&amp;nbsp;is free of cost. The pro version comes with a 30 days trial for the developers to try it out.&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It has several features that include auto-completion, syntax highlighting, indents, and debugging.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&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/AVvXsEgpCc9VterN5N0RX0Yw6YEi286JzOKRgp-5e2e7pJx-85VoRMMkust9m4GGcFltz1Nb6yGHeWgyFEkBPss2TATOsh-lUlYkuB4L8uH7qPWUhLNcEOXR2ly-da9uv2LFEbClSeFWXJGLgRCZ7Snh12sCBx0bUvc508-PuL9tDSaXEOmfkEs4ZpORGzJM/s225/wing.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;225&quot; data-original-width=&quot;225&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpCc9VterN5N0RX0Yw6YEi286JzOKRgp-5e2e7pJx-85VoRMMkust9m4GGcFltz1Nb6yGHeWgyFEkBPss2TATOsh-lUlYkuB4L8uH7qPWUhLNcEOXR2ly-da9uv2LFEbClSeFWXJGLgRCZ7Snh12sCBx0bUvc508-PuL9tDSaXEOmfkEs4ZpORGzJM/s1600/wing.jpg&quot; width=&quot;225&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Features&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Customized and can have extensions as well.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Supports remote development, test-driven development along with the unit test.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;THONNY&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Thonny is another IDE which is best suited for learning and teaching programming. it is a software developed at the University of Tartu and supports code completion and highlight syntax errors.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&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/AVvXsEhLzIK3IJPjoXWyruCGsyXN7sOwkiMQ3spgAA4wdgrtpSM31bmQ_OhIyZugIL93uPrH6u-XK2PdA09g1wxJbYljJevnn9-g8Ea2GGWUpKSx1_DmG0mdjDazUgak8aLPEfs3-AWt2C-GalvTUkPWMDjJcZspfJ5PjwmjjKwPTKSi7OOu5BrYoHWSmxJk/s225/thonny.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;225&quot; data-original-width=&quot;225&quot; height=&quot;144&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLzIK3IJPjoXWyruCGsyXN7sOwkiMQ3spgAA4wdgrtpSM31bmQ_OhIyZugIL93uPrH6u-XK2PdA09g1wxJbYljJevnn9-g8Ea2GGWUpKSx1_DmG0mdjDazUgak8aLPEfs3-AWt2C-GalvTUkPWMDjJcZspfJ5PjwmjjKwPTKSi7OOu5BrYoHWSmxJk/w225-h144/thonny.png&quot; width=&quot;225&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Features&lt;/span&gt;&lt;/h2&gt;&lt;div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;simple debugger&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;supports highlighting errors and auto code&amp;nbsp;completion&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;JUPYTER NOTEBOOK&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Jupyter is one of the most used Python notebook editors hat is used across the data science industry. It is a web application that is based on the server-client structure and allows you to create and manipulate notebook documents. It makes the best use of the fact that Python is an interpreted language.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&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/AVvXsEhoOOss5BrIRENTZ6EVyIz8HQuC_I8plC3owI-5RBqHfddexpWKR87jlpgOtvjJCtU0hrRKia9ZxDDj7i7BUxwcVFd72nykzLKr_a5Zy3EfE7IlBEnU4wPPNIvaZlRmmpmNxDKsrPr57EtoBL5YUiZmK8SYrLjzorXM9JA70qFNPTTtHBbZp-TcXOqN/s1023/jupyter.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1023&quot; data-original-width=&quot;883&quot; height=&quot;203&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoOOss5BrIRENTZ6EVyIz8HQuC_I8plC3owI-5RBqHfddexpWKR87jlpgOtvjJCtU0hrRKia9ZxDDj7i7BUxwcVFd72nykzLKr_a5Zy3EfE7IlBEnU4wPPNIvaZlRmmpmNxDKsrPr57EtoBL5YUiZmK8SYrLjzorXM9JA70qFNPTTtHBbZp-TcXOqN/w276-h203/jupyter.png&quot; width=&quot;276&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana;&quot;&gt;Features&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Support markdowns&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Easy creation and editing of codes&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Ideal for beginners in data science&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;MICROSOFT VISUAL STUDIO&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Microsoft Visual Studio is an open source code editor which was best suited for development and debugging of latest web and cloud product. It has its own marketplace for extensions.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8jNw4OA-GIilaLpmNSjuJnEMqNE2f5yM8rqN1tNHk6B_-vKeZ74N1rkRivqvuMY18ctQ8iX9APQ6_vUmGhwNdBNan3KXk5BXhhIVz1rBwN_WtnLbyUmnTaIjvz-aIS5H6wIxV2f8iLMehd4afmKKus_ZIG2ajIOSqTdax-80p6lVOY-MUeJELEfAH/s900/visual%20studio.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;900&quot; data-original-width=&quot;900&quot; height=&quot;210&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8jNw4OA-GIilaLpmNSjuJnEMqNE2f5yM8rqN1tNHk6B_-vKeZ74N1rkRivqvuMY18ctQ8iX9APQ6_vUmGhwNdBNan3KXk5BXhhIVz1rBwN_WtnLbyUmnTaIjvz-aIS5H6wIxV2f8iLMehd4afmKKus_ZIG2ajIOSqTdax-80p6lVOY-MUeJELEfAH/w320-h210/visual%20studio.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Features&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Supports Python coding in Visual Studio&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Available both paid and free version&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;ERIC PYTHON&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The Eric Python is an editor which is developed in Python itself and can be used for both professional and non-professional work.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&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/AVvXsEjmmQt-UTX4iX3AztCQIh0V5zsv5VGp8umKxjNT6jcAAeg_QyFvgWa-BOIHjbwll6yFJdFHnm2NTICKJSKRej9VTtOtMGGNUi5CIk90iy0TRu5jy9ZlZObvJuOBwkfzzOXNB25Wf13WN038D3fbcvmk5y2kWZG-j5W-BHKow_oRyhTYN6o7XFEbpvQA/s225/eric.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;225&quot; data-original-width=&quot;225&quot; height=&quot;163&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmmQt-UTX4iX3AztCQIh0V5zsv5VGp8umKxjNT6jcAAeg_QyFvgWa-BOIHjbwll6yFJdFHnm2NTICKJSKRej9VTtOtMGGNUi5CIk90iy0TRu5jy9ZlZObvJuOBwkfzzOXNB25Wf13WN038D3fbcvmk5y2kWZG-j5W-BHKow_oRyhTYN6o7XFEbpvQA/w225-h163/eric.jpg&quot; width=&quot;225&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Features&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Advanced project management capability, version control&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In-built debugger and task management support.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Offers configurable window layout, editors, source code folding.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/5102437865491322331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2022/05/python-ide.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/5102437865491322331'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/5102437865491322331'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2022/05/python-ide.html' title='Python IDE'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwSLcAGepRTXt-ZcAtJ8cRO7dr3_Da_OiTHXEBwPgCkiIuMae2pgJfgZFqy4PVd-nDyCRdbNkf7RPG59SQh60kB2JnW8AoQXCLhLDjDC_AbIytha8KNEMYxyhodFmRrnIRcLU-VLGB2reMYFRBrExUF4JR-oaCAWhS_eUtC_ihRkeue7SzkOBKWLzK/s72-w225-h169-c/pycharm.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-2534881538835422731</id><published>2021-12-15T09:59:00.006+05:30</published><updated>2021-12-22T10:03:47.106+05:30</updated><title type='text'>Variable in C Programming</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;&amp;nbsp;Variable&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;A variable is a name of memory location. It is used to store data. Value can be changed, and it can be reused many times.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It is way to represent memory location through symbol so that it can be easily identified.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #800180;&quot;&gt;Syntax :&lt;/span&gt;&lt;/b&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;Data-Type Variable-Name&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #800180;&quot;&gt;Example &lt;/span&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;color: #274e13; font-family: verdana;&quot;&gt;&lt;b&gt;int a;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;color: #274e13; font-family: verdana;&quot;&gt;&lt;b&gt;float b;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;char c;&amp;nbsp; &amp;nbsp; &lt;/span&gt;Here a,b,c are variables.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #800180;&quot;&gt;Note :&lt;/span&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt; We can also provide values while declaring the variables.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #800180;&quot;&gt;Example&lt;/span&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;color: #274e13; font-family: verdana;&quot;&gt;&lt;b&gt;int a=10, b=20;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;color: #274e13; font-family: verdana;&quot;&gt;&lt;b&gt;float f=20.2;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;color: #274e13; font-family: verdana;&quot;&gt;&lt;b&gt;char c=&#39;B&#39;;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;&lt;b&gt;Types of variables&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;There are various types of variables are available in C programming language. which are discussed below :&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;1. Local Variable&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;A variable that is declared inside the function or block is called a local variable.It must be declared at the start of the block.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;You must have to initialize the local variable before its first used.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;The scope of local variable is always local. Means we can access from only inside the function.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Example&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #38761d; font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;void function()&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #38761d; font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; int x=10;&amp;nbsp; // &lt;/span&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Local Variable&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #38761d; font-family: verdana; font-size: medium;&quot;&gt;&lt;span&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;&lt;b&gt;2. Global Variable&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;A variable that is declared outside the function or block is called a global variable. Any function can change the value of a global variable.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;It must be declared outside of the block.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;The scope of global variable is always global means we can access from anywhere through out the program.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;Example&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;int value=10;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; // &lt;/span&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Global variable&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #274e13; font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;void function()&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #274e13; font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; int x=30;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; // &lt;/span&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Local variable&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #274e13; font-family: verdana; font-size: medium;&quot;&gt;&lt;span&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: large;&quot;&gt;&lt;b&gt;3. Static Variable&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;A variable that is declared with the static keyword is known as Static Variable. It retains its value between function calls.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;Static variable can be defined inside or outside the function.The default value of static variable is &lt;b&gt;zero&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #274e13; font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;void function1()&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #274e13; font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; int x=10;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; //&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&amp;nbsp;Local Variable&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; static int y=15;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp;// &lt;/span&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Static Variable&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #274e13; font-family: verdana; font-size: medium;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;x=x+1;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #274e13; font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; y=y+1;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #274e13; font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; printf(&quot;%d,%d&quot;,x,y);&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #274e13; font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;&lt;span&gt;}&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;In the above example if you call the function many times, the &lt;b&gt;local variable&lt;/b&gt; will print same value for each function but the &lt;b&gt;static variable&lt;/b&gt; will print the incremented value in each function call.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;4. Automatic Variable&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;All variables in C that are declared inside the block, are automatic variables by default. But if we want to explicitly declare a variable as an automatic variable then we can do with the help of &lt;b&gt;auto&lt;/b&gt; keyword.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;Automatic variables are similar as local variables.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Example&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;void main()&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; int x=10;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; //&lt;/span&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt; Local Variable&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; auto int y=15;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&amp;nbsp; &amp;nbsp; // &lt;/span&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Automatic Variable&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;They both are automatic variables but the difference&amp;nbsp;is that the &lt;b&gt;y is explicitly declared &lt;/b&gt;as an automatic variable with the help of &lt;b&gt;auto&lt;/b&gt; keyword.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;5. External Variable&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;These variables&amp;nbsp;are defined outside the function. We can share a external variable between multiple C files.&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Arial, Verdana, Tahoma; font-size: 16px;&quot;&gt;External variables can be declared number of times but defined only once.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;We can declare external variable with the help of&lt;b&gt; extern&lt;/b&gt; keyword.Default value of external variable&amp;nbsp;is &lt;b&gt;zero&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/2534881538835422731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/12/variable-in-c-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/2534881538835422731'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/2534881538835422731'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/12/variable-in-c-programming.html' title='Variable in C Programming'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-6694529580976699337</id><published>2021-12-08T10:04:00.004+05:30</published><updated>2021-12-09T15:53:06.573+05:30</updated><title type='text'>Switching  Techniques in Computer Network</title><content type='html'>&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;&amp;nbsp;Switching&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;In large networks, there may be more than one paths exist for transmitting data from&amp;nbsp;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;sender&lt;/span&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&amp;nbsp;to receiver.The process of selecting a best path for sending the data from sender to receiver is known as Switching. Switching in a computer network is achieved by using a small hardware device that is called switch which is used to join multiple computers together with one Local Area Network.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: center;&quot;&gt;The process of moving the data packets towards their destination by forwarding them from one port to the other port is called as&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; box-sizing: inherit; text-align: center;&quot;&gt;switching.&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; text-align: center;&quot;&gt;To reduce the collision between packets we use switching. Packet Collision in minimum as it directly communicates between source to destination.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; text-align: center;&quot;&gt;It increases the overall performance of the network by reducing the traffic on the network.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: large;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; text-align: center;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;Switching Techniques&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; text-align: center;&quot;&gt;Switching technique is used to connect the systems for making one-to&amp;nbsp; one communication. There are various following techniques are available which are given below :&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; text-align: center;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEijzas5fM5b5p98e_0wKe_OJGK1b_aIWOdUcyMzNUdsEIcLf1ircnNGWQ6arPpo5ydORHj6I55JT5WGBmIKktPtDQb3sKvr4Bhexu2mcLLr7ymCMKP6h0NFK5aiXVIEJUp-cOrB8WgSlc3VN-XalBhlfFDFeIERveh1vvRMbhS2Yyo3sCI8isvSMf7g=s624&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;330&quot; data-original-width=&quot;624&quot; height=&quot;311&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEijzas5fM5b5p98e_0wKe_OJGK1b_aIWOdUcyMzNUdsEIcLf1ircnNGWQ6arPpo5ydORHj6I55JT5WGBmIKktPtDQb3sKvr4Bhexu2mcLLr7ymCMKP6h0NFK5aiXVIEJUp-cOrB8WgSlc3VN-XalBhlfFDFeIERveh1vvRMbhS2Yyo3sCI8isvSMf7g=w497-h311&quot; width=&quot;497&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: large;&quot;&gt;Circuit Switching&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Circuit switching is a method of implementing a telecommunication network in which two network nodes establish a dedicated path.In Circuit switching a complete end-to-end path must exist before the communication takes place.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In Circuit switching technique a dedicated path is established between sender and receiver before starting the transmission of packets. and that dedicated path will remain to exist until the connection is terminated.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: transparent; text-align: left;&quot;&gt;When any user wants to send the data it may be in the form of voice, video, etc. then it sends a request signal if the path is exist then receiver sends back an acknowledgement to the sender to ensure the availability of the dedicated path. After receiving the acknowledgment, dedicated path transfers the data.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: transparent; text-align: left;&quot;&gt;Circuit switching technique is used in public telephone network. It is used for voice transmission.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgph8gd5hG06k6et1fprhU-pOgUD032a0VQdI6gCJfLijKgTPWVFgM1PTYGw3bGzFE0okoxecHdH0T-miqQA9Ta2BOp_p7JuflZv1L_xptHGZ6bxMe2_gsywE5g6G7yuSVRCFsNKVPnxF56yrGls6z2P6RR-bcXKVCeqzrf33vL-YypX3ELtEk2J4ef=s527&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;182&quot; data-original-width=&quot;527&quot; height=&quot;202&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgph8gd5hG06k6et1fprhU-pOgUD032a0VQdI6gCJfLijKgTPWVFgM1PTYGw3bGzFE0okoxecHdH0T-miqQA9Ta2BOp_p7JuflZv1L_xptHGZ6bxMe2_gsywE5g6G7yuSVRCFsNKVPnxF56yrGls6z2P6RR-bcXKVCeqzrf33vL-YypX3ELtEk2J4ef=w402-h202&quot; width=&quot;402&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: transparent; text-align: left;&quot;&gt;Communication by using circuit switching has 3 phases :&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&gt;&lt;ul&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: transparent; text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;&lt;b&gt;Connection Establishment (Circuit Establishment) :&lt;/b&gt;&lt;/span&gt; In this phase a &lt;b&gt;circuit (Path)&lt;/b&gt; is established between one node to another node. Circuit provides a full dedicated path to travel the data from source to destination.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: transparent; text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;&lt;b&gt;Data Transfer :&lt;/b&gt;&lt;/span&gt; After the connection establishment the entire data are sent through dedicated &lt;b&gt;path (circuit)&lt;/b&gt;from source to destination.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: transparent; text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;&lt;b&gt;Connection Termination :&lt;/b&gt;&lt;/span&gt; After the completion the process of sending data the circuit is disconnected means the connection between two nodes has terminated.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;p style=&quot;border: none; box-sizing: inherit; list-style: none; margin: 4px 0px 12px; padding: 0px; text-align: center; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;color: red; font-family: verdana;&quot;&gt;Total time taken to transmit a message in circuit switched network&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;border: none; box-sizing: inherit; list-style: none; margin: 4px 0px 12px; padding: 0px; text-align: center; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;= Connection set up time + Transmission Time + Propagation Time + Tear down time&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;border: none; box-sizing: inherit; list-style: none; margin: 4px 0px 12px; padding: 0px; text-align: center; vertical-align: baseline;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 style=&quot;border: none; box-sizing: inherit; list-style: none; margin: 4px 0px 12px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Advantages&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; border: none; box-sizing: inherit; list-style: none; margin: 4px 0px 8px; padding: 0px 0px 0px 20px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: none; box-sizing: inherit; list-style: outside disc; margin: 4px 0px 4px 15px; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Before transmit the data a full dedicated path is established to travel the data.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;background-color: white; border: none; box-sizing: inherit; list-style: none; margin: 4px 0px 8px; padding: 0px 0px 0px 20px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: none; box-sizing: inherit; list-style: outside disc; margin: 4px 0px 4px 15px; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Data is transmitted without any delay because there is no waiting time at any switch.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;background-color: white; border: none; box-sizing: inherit; list-style: none; margin: 4px 0px 8px; padding: 0px 0px 0px 20px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: none; box-sizing: inherit; list-style: outside disc; margin: 4px 0px 4px 15px; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Receiver always receives&amp;nbsp;the data in the order. in order.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;background-color: white; border: none; box-sizing: inherit; list-style: none; margin: 4px 0px 8px; padding: 0px 0px 0px 20px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: none; box-sizing: inherit; list-style: outside disc; margin: 4px 0px 4px 15px; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;No re ordering is required.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Disadvantages&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; border: none; box-sizing: inherit; list-style: none; margin: 4px 0px 8px; padding: 0px 0px 0px 20px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: none; box-sizing: inherit; list-style: outside disc; margin: 4px 0px 4px 15px; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The set up required time ( for connection establishment) is too long.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;background-color: white; border: none; box-sizing: inherit; list-style: none; margin: 4px 0px 8px; padding: 0px 0px 0px 20px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: none; box-sizing: inherit; list-style: outside disc; margin: 4px 0px 4px 15px; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Dedicated channels require more bandwidth.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;background-color: white; border: none; box-sizing: inherit; list-style: none; margin: 4px 0px 8px; padding: 0px 0px 0px 20px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: none; box-sizing: inherit; list-style: outside disc; margin: 4px 0px 4px 15px; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It is more expensive than other switching techniques.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;background-color: white; border: none; box-sizing: inherit; list-style: none; margin: 4px 0px 8px; padding: 0px 0px 0px 20px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: none; box-sizing: inherit; list-style: outside disc; margin: 4px 0px 4px 15px; padding: 0px; text-align: justify; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Routing decisions (The path between two nodes) can not be changed once the circuit is established.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;Circuit Switching&lt;/b&gt; can use two types of technologies which are :-&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Space Division Switches :&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In &lt;b&gt;space division switching&lt;/b&gt;, a dedicated path is established between the source and destination for the entire period of transmission.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;Space Division Switching&lt;/b&gt; can be achieved by using &lt;span style=&quot;color: #38761d;&quot;&gt;&lt;b&gt;crossbar switch&lt;/b&gt;&lt;/span&gt;. A crossbar switch is a metallic crosspoint or semiconductor gate that can be enabled or disabled by a control unit. This requires separate physical path for each signal connection.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Time Division Switches&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The incoming and outgoing signals when received and re-transmitted in a different time slot, is know as &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Time Division Switching&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In the &lt;b&gt;Time Division switching&lt;/b&gt;, sampled values of speech signals are transferred&amp;nbsp;at fixed intervals.The &lt;b&gt;Time Division Switching&lt;/b&gt; may be analog or digital.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;Time Division Switching&lt;/b&gt; uses &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;time-division multiplexing&lt;/span&gt;&lt;/b&gt; to achieve switching means different ongoing connections can use same switching path but in different time interval.There are two popular methods for &lt;b&gt;Time Division Switching&lt;/b&gt; namely &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Time Slot Interchange&lt;/span&gt; &lt;/b&gt;(&lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;TSI&lt;/span&gt;&lt;/b&gt;) and the &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;TDM bus&lt;/span&gt;&lt;/b&gt;.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ul class=&quot;points&quot; style=&quot;background-color: white; line-height: 24px; list-style: circle; text-align: justify;&quot;&gt;&lt;/ul&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; text-align: center;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: large;&quot;&gt;&lt;span style=&quot;background-color: white; box-sizing: inherit; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/6694529580976699337/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/12/switching.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/6694529580976699337'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/6694529580976699337'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/12/switching.html' title='Switching  Techniques in Computer Network'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEijzas5fM5b5p98e_0wKe_OJGK1b_aIWOdUcyMzNUdsEIcLf1ircnNGWQ6arPpo5ydORHj6I55JT5WGBmIKktPtDQb3sKvr4Bhexu2mcLLr7ymCMKP6h0NFK5aiXVIEJUp-cOrB8WgSlc3VN-XalBhlfFDFeIERveh1vvRMbhS2Yyo3sCI8isvSMf7g=s72-w497-h311-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-8219352576495268999</id><published>2021-12-03T13:04:00.005+05:30</published><updated>2021-12-09T14:31:16.040+05:30</updated><title type='text'>Channelization Protocols</title><content type='html'>&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;Channelization Protocols&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Channelization or some times called &lt;b&gt;channel Partition&lt;/b&gt;(&lt;b&gt;Division&lt;/b&gt;) is a multiple access method in which the available bandwidth of a link is shared in respect with the &lt;b&gt;time&lt;/b&gt; , &lt;b&gt;frequency &lt;/b&gt;or through &lt;b&gt;codes&lt;/b&gt;.&amp;nbsp;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;It is a channelization protocol that allows the total usable bandwidth in a shared channel to be shared across multiple stations based on their time, distance and codes. It can access all the stations at the same time to send the data frames to the channel. There are three channelization protocols which are as follows&amp;nbsp;: FDMA, TDMA and CDMA.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;FDMA (Frequency Division Multiple Access)&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;This method is used to divide the available bandwidth into equal &lt;b&gt;frequency bands&lt;/b&gt; by which multiple users can send data through a different frequency to the subchannel. Each station is allocated a band to send its data.In other words, each frequency bands is reserved for a specific station. Each station also uses a band pass filter to confine the transmitter frequencies. To prevent station interference, the allocated bands, are separated from one another by using a &lt;b&gt;small guard bands&lt;/b&gt;. Small guard can reduce the cross talk only not remove it.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgj1ugrr-ggsrPW4iNB0XFeitS_6174UcMtxJ60HBH5mp6kaqKQYLFtIhlp7smGEUiyoCXfORzQnJb84Xn4yGC1oxohc3UVvWG0onlobLrn5etI0jwmlt24qkza6s3_A4SPI7HnMGwpKtPktMGUPSMn3dfoAe2WBwYlYRfMHYBllHoZWXEHXLUkdNvh=s1868&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1368&quot; data-original-width=&quot;1868&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgj1ugrr-ggsrPW4iNB0XFeitS_6174UcMtxJ60HBH5mp6kaqKQYLFtIhlp7smGEUiyoCXfORzQnJb84Xn4yGC1oxohc3UVvWG0onlobLrn5etI0jwmlt24qkza6s3_A4SPI7HnMGwpKtPktMGUPSMn3dfoAe2WBwYlYRfMHYBllHoZWXEHXLUkdNvh=w434-h300&quot; width=&quot;434&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;TDMA (Time Division Multiple Access)&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In &lt;b&gt;Time division Multiple Access&lt;/b&gt; method, the stations share the bandwidth of the channel in time. Each station is allocated a time slot during which it can send the data. Each station transmits its data in its assigned time slot.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;No &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Guard Band &lt;/span&gt;&lt;/b&gt;are required in the &lt;b&gt;Time Division Multiple Access&lt;/b&gt;.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&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/a/AVvXsEh0fce1zUoVS6N6wAOPE7H3DnMQ1SL_ySiGrhrCiOb-mE-kKxMRsVthxMgfsAmUTNJZTZgbTmReNAvQOLoM6gnWbIyPlHAE1cS73gulxswfgzghDddBZB89TzB4HUexZBJbrpp6rcgTfLm78Bmt1igHE4aL5ZIBU_PDBN1dcVGwDThnq-TBSMwJXuJT=s1164&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;788&quot; data-original-width=&quot;1164&quot; height=&quot;262&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh0fce1zUoVS6N6wAOPE7H3DnMQ1SL_ySiGrhrCiOb-mE-kKxMRsVthxMgfsAmUTNJZTZgbTmReNAvQOLoM6gnWbIyPlHAE1cS73gulxswfgzghDddBZB89TzB4HUexZBJbrpp6rcgTfLm78Bmt1igHE4aL5ZIBU_PDBN1dcVGwDThnq-TBSMwJXuJT=w434-h262&quot; width=&quot;434&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;CDMA (Code Division Multiple Access)&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;CDMA&lt;/span&gt;&lt;/b&gt;, all stations can simultaneously send the data over the same channel. It means that it allows each station to transmit the data frames with full frequency on the shared channel at all times. It does not require the division of bandwidth on a shared channel based on time slots. If multiple stations send data to a channel simultaneously, their data frames are separated by a &lt;b&gt;unique code sequence&lt;/b&gt;. Each station has a different &lt;b&gt;unique code&lt;/b&gt; for transmitting the data over a shared channel. For&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt; example&lt;/span&gt;&lt;/b&gt;, there are multiple users in a room that are continuously speaking. Data is received by the users if only two-person interact with each other using the same language. Similarly, in the network, if different stations communicate with each other simultaneously with different code language.&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/8219352576495268999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/12/channelization-protocols.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/8219352576495268999'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/8219352576495268999'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/12/channelization-protocols.html' title='Channelization Protocols'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEgj1ugrr-ggsrPW4iNB0XFeitS_6174UcMtxJ60HBH5mp6kaqKQYLFtIhlp7smGEUiyoCXfORzQnJb84Xn4yGC1oxohc3UVvWG0onlobLrn5etI0jwmlt24qkza6s3_A4SPI7HnMGwpKtPktMGUPSMn3dfoAe2WBwYlYRfMHYBllHoZWXEHXLUkdNvh=s72-w434-h300-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-7723521228970917703</id><published>2021-12-01T10:24:00.005+05:30</published><updated>2021-12-03T12:09:58.630+05:30</updated><title type='text'>Multiple Access Control in data link layer</title><content type='html'>&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;Multiple Access Control&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;When multiple nodes or stations are connected together by using a common&amp;nbsp;link to transmit data packets or frames. Every node or station are free to transmit the data frame at one time.In that case, multiple stations can access the channel and simultaneously transmits the data over the channel. It may create collision Hence, the &lt;b&gt;multiple access protocol&lt;/b&gt; is required to &lt;b&gt;reduce the collision&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;For &lt;b&gt;example&lt;/b&gt;,Let us assume that there is a classroom full of students.When a teacher asks a question to the students then all the students available in that class start answering the question at the same time. Because all the students respond at the same time so here is very high chances that&amp;nbsp;the data will be &lt;b&gt;overlap&lt;/b&gt; or &lt;b&gt;data lost&lt;/b&gt;.Therefore it is the responsibility of a teacher which will be act as &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;multiple access protocol&lt;/span&gt;&lt;/b&gt; to manage the students and make them one student can answer at a time.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;To reduce the &lt;b&gt;problem of collision&lt;/b&gt;&amp;nbsp;we use the various&lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt; Multiple Access Protocols&lt;/span&gt;&lt;/b&gt; :&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;/p&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/a/AVvXsEiLGzG1-d7WiNIIcXEtzauJZu_taDwcNs_1AanpaZXfv5JKSKpSxC9jXXp_iReiaL5-RoyaNJ2rkxT0bwUVCmJEU-nyGFfzRN2nBRHnw3IBCXnHVZQCFbrB4oSzpyWWQnKz8A-3IjTEIx5PE83GIe2-ZfROl4boYLBlD4INyoL8x5cKtPobzcTJbYOc=s550&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;303&quot; data-original-width=&quot;550&quot; height=&quot;243&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiLGzG1-d7WiNIIcXEtzauJZu_taDwcNs_1AanpaZXfv5JKSKpSxC9jXXp_iReiaL5-RoyaNJ2rkxT0bwUVCmJEU-nyGFfzRN2nBRHnw3IBCXnHVZQCFbrB4oSzpyWWQnKz8A-3IjTEIx5PE83GIe2-ZfROl4boYLBlD4INyoL8x5cKtPobzcTJbYOc=w477-h243&quot; width=&quot;477&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;Random Access Protocols&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In &lt;b&gt;random access protocol&lt;/b&gt;, no station is superior&amp;nbsp;to another station and none is assigned control over another.This decision depends on the state of the medium (Idle or Busy).&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;This method gives us two features:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The &lt;b&gt;First&lt;/b&gt; is there is no schedule time for station to transmit the data. Transmission is &lt;b&gt;random&lt;/b&gt; among the stations that is why it is called &lt;b&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;Random Access&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The &lt;b&gt;Second&lt;/b&gt; is, no rules specify which station should send next. Station compete one another to access the medium. That is why these methods are also called &lt;b&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;Contention methods&lt;/span&gt;&lt;/b&gt;. In &lt;b&gt;random access&lt;/b&gt; method,each station has right to the medium&amp;nbsp; without being controlled&amp;nbsp;by any other station. However. if more than one station tries&amp;nbsp;to send, there is an &lt;b&gt;access conflict-collision&lt;/b&gt;&amp;nbsp;and the frames will be either &lt;b&gt;destroyed &lt;/b&gt;or &lt;b&gt;modified&lt;/b&gt;(&lt;b&gt;Corrupted&lt;/b&gt;).&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;There are various methods for &lt;b&gt;random access protocols &lt;/b&gt;which are given below :&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;ALOHA&lt;/span&gt; &lt;/b&gt;(&lt;b&gt;Pure ALOHA&lt;/b&gt; and &lt;b&gt;Slotted ALOHA&lt;/b&gt;)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;color: #2b00fe; font-family: verdana;&quot;&gt;&lt;b&gt;CSMA&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;color: #800180; font-family: verdana;&quot;&gt;&lt;b&gt;CSMA/CD&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;color: #38761d; font-family: verdana;&quot;&gt;&lt;b&gt;CSMA/CA&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;ALOHA&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;ALOHA&lt;/span&gt;, the earliest &lt;b&gt;random access&lt;/b&gt; method was developed at the &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;University of Hawaii&lt;/span&gt;&lt;/b&gt; in &lt;b&gt;1970&lt;/b&gt;. It was designed for a &lt;b&gt;&lt;span style=&quot;color: #800180;&quot;&gt;radio&lt;/span&gt;&lt;/b&gt;(&lt;b&gt;wireless&lt;/b&gt;) &lt;b&gt;LAN&lt;/b&gt;, but it can be used on any shared medium. The medium is shared between the stations. When a station sends a data, another station may attempt to do so at the same time. The data from the stations &lt;b&gt;collide&lt;/b&gt; and become garbled.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In this Any station can transmit data to a channel at any time. It does not require any &lt;b&gt;carrier sensing&lt;/b&gt;. It require transmission of data after some random amount of time.It can be of &lt;b&gt;two types&lt;/b&gt; :&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Pure ALOHA&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The original &lt;b&gt;ALOHA&lt;/b&gt; protocol is called pure &lt;b&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;ALOHA&lt;/span&gt;&lt;/b&gt;. This is a simple but elegant protocol.However, since there is only one channel to share, there is the possibility of collision between frames from different station.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; list-style-image: url(&amp;quot;/w/skins/Vector/resources/common/images/bullet-icon.svg?d4515&amp;quot;); margin: 0.3em 0px 0px 1.6em; padding: 0px;&quot;&gt;&lt;li style=&quot;margin-bottom: 0.1em; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;If you have data to send, send the data.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;background-color: white; list-style-image: url(&amp;quot;/w/skins/Vector/resources/common/images/bullet-icon.svg?d4515&amp;quot;); margin: 0.3em 0px 0px 1.6em; padding: 0px;&quot;&gt;&lt;li style=&quot;margin-bottom: 0.1em; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;If, while you are transmitting data, you receive any data from another station, there has been a &lt;b&gt;message collision&lt;/b&gt;. All transmitting stations will need to try resending &quot;later&quot;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; list-style-image: url(&amp;quot;/w/skins/Vector/resources/common/images/bullet-icon.svg?d4515&amp;quot;); margin: 0.3em 0px 0px 1.6em; padding: 0px; text-align: left;&quot;&gt;&lt;li style=&quot;margin-bottom: 0.1em; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In pure ALOHA, each station transmits data to a channel without checking whether the channel is &lt;b&gt;idle or not&lt;/b&gt;, the chances of collision may occur, and the data frame can be lost.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; list-style-image: url(&amp;quot;/w/skins/Vector/resources/common/images/bullet-icon.svg?d4515&amp;quot;); margin: 0.3em 0px 0px 1.6em; padding: 0px; text-align: left;&quot;&gt;&lt;li style=&quot;margin-bottom: 0.1em; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;When any station transmits the data frame to a channel, the pure Aloha waits for the receiver&#39;s acknowledgment. If it does not acknowledge the receiver end within the specified time, the station waits for a random amount of time, called the&lt;b&gt; backoff time&lt;/b&gt;. And the station may assume the frame has been lost or destroyed. Therefore, it retransmits the frame until all the data are successfully transmitted to the receiver.&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Below figure shows an example of frame collision in pure &lt;b&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;ALOHA&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEihbaclW3H5fwOg0r_HBeyHXPh4f5u6noJ9h0rGATShDLu6WKePnmEAx8ajwwDfWImdaCrAz6SAtziFn-2c8I1hwBxRbqmzoMZqv6HeYWzhEaorC12zYx_NeTpGaDmolcA5YbYHCUIcK9arXuYvuLKV4Q5JhdMpEv6A4aAG_AX0sRuAd1sxatGbyYhM=s2523&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1247&quot; data-original-width=&quot;2523&quot; height=&quot;313&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEihbaclW3H5fwOg0r_HBeyHXPh4f5u6noJ9h0rGATShDLu6WKePnmEAx8ajwwDfWImdaCrAz6SAtziFn-2c8I1hwBxRbqmzoMZqv6HeYWzhEaorC12zYx_NeTpGaDmolcA5YbYHCUIcK9arXuYvuLKV4Q5JhdMpEv6A4aAG_AX0sRuAd1sxatGbyYhM=w471-h313&quot; width=&quot;471&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;There are &lt;b&gt;four stations&lt;/b&gt; that contend with one another for access to the shared channel. In this figure each stations sends &lt;b&gt;two frames&lt;/b&gt;, there are total of &lt;b&gt;eight frames &lt;/b&gt;on the shared medium.Some of these frames &lt;b&gt;collide&lt;/b&gt; because multiple frames are in &lt;b&gt;contention&lt;/b&gt; for the shared channel. Only two frames survive: one frame from &lt;b&gt;station 1&lt;/b&gt; and one frame from &lt;b&gt;station 3&lt;/b&gt;.we need to resend the frames that have been destroyed during transmission.If all these stations try to resend their frames after the time-out the frames will &lt;b&gt;collide again&lt;/b&gt;.&lt;b&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;Pure ALOHA&lt;/span&gt;&lt;/b&gt; dictates that when the time-out period passes, each station waits a random amount of time before resending its frame. The randomness will help to avoid more collision. We call this time the &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;back off time&lt;/span&gt;&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Slotted ALOHA&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;Slotted ALOHA &lt;/b&gt;was invented to improve the efficiency of &lt;b&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;Pure ALOHA&lt;/span&gt;&lt;/b&gt;. In &lt;b&gt;slotted ALOHA&lt;/b&gt; we divide the time into equal time intervals called &lt;b&gt;slots&lt;/b&gt; and forces the station to transmit the data only at the beginning of the time slot and only one frame is allowed to be sent to each slot.&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;And if the stations are unable to send data at the beginning of the slot, the station will have to wait until the beginning of the slot for the next time.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;However, the possibility of a collision remains when trying to send a frame at the beginning of two or more station time slot.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana;&quot;&gt;Below figure shows an example of frame collision in &lt;/span&gt;&lt;b style=&quot;background-color: white; font-family: verdana;&quot;&gt;slotted ALOHA.&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&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/a/AVvXsEh1TOvEYXDchLeAzlQNm3_JVCM1FUtk7INmfOxBzTz0ybRfRkbcZ9g7O5wtNSp4QV_v6TXUASqPkQFokwuf92OiGsx5AQxmjz_Ny2zkmxlAcsMNdpdnrQ0Hh2Zs9tnEHgJ2SrEm5h3yuhB3Q5mZMGI9XLh9lXaVYpg9URwSz9kEi18Sg5uUC6rdKMdF=s2048&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1205&quot; data-original-width=&quot;2048&quot; height=&quot;328&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh1TOvEYXDchLeAzlQNm3_JVCM1FUtk7INmfOxBzTz0ybRfRkbcZ9g7O5wtNSp4QV_v6TXUASqPkQFokwuf92OiGsx5AQxmjz_Ny2zkmxlAcsMNdpdnrQ0Hh2Zs9tnEHgJ2SrEm5h3yuhB3Q5mZMGI9XLh9lXaVYpg9URwSz9kEi18Sg5uUC6rdKMdF=w472-h328&quot; width=&quot;472&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Because a station is allowed to send only at the beginning of the time slot. If a station misses this moment it must wait until the beginning of the next time slot. This means that the station in which started at the beginning of this slot has already finished sending its frame. There is still the possibility of collision if two stations are try to send at the beginning of the same time slot.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;CSMA (&lt;/span&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;Carrier Sense Multiple Access&lt;/span&gt;&lt;span style=&quot;color: #800180;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;To minimize the chance of collision and therefor increase the performance, the CSMA method was developed. The chance of collision&amp;nbsp;can be reduced if a station senses the medium&amp;nbsp;before trying to use it. CSMA method requires that each station check the state &lt;b&gt;(Idle or Busy&lt;/b&gt;) of the medium before sending the frame.&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It means that if the channel is idle, the station can send data to the channel. Otherwise, it must wait until the channel becomes idle. Hence, it reduces the chances of a collision on a transmission medium.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;In other words, CSMA is based on the principle&amp;nbsp;&quot;&lt;b&gt;&lt;span style=&quot;color: #800180;&quot;&gt;Sense before transmit&lt;/span&gt;&lt;/b&gt;&quot;. &lt;b&gt;CSMA&lt;/b&gt; may reduce the possibility of collision.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The possibility&amp;nbsp;of collision still exists because of &lt;b&gt;propagation&amp;nbsp;delay&lt;/b&gt; : when a station sends a frame, it still takes time for the first bit to reach every station and for every station to sense it. In other words, a station may sense the medium and find it &lt;b&gt;idle,&lt;/b&gt; only because the first bit sent by another station has not yet been received.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;There are &lt;b&gt;three methods&lt;/b&gt; proposed for &lt;b&gt;CSMA&lt;/b&gt; which tells us that what should a station do if the channel is &lt;b&gt;&lt;span style=&quot;color: #800180;&quot;&gt;Busy or Idle &lt;/span&gt;&lt;/b&gt;which are given below.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;&lt;b&gt;I-Persistent :&lt;/b&gt;&lt;/span&gt; The &lt;b&gt;I-Persistent&lt;/b&gt; method is very simple. In this method, a station continuously sense and after the station finds the line idle.It sends its frame immediately. This method has the highest chance of collision because two or more stations may find the line idle and send their frames immediately at the same time.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;&lt;b&gt;Non Persistent :&lt;/b&gt;&lt;/span&gt; In this method, a station that has a frame to send sense, if the line is idle, it sends immediately. but if the line is busy, it waits a random amount of time and sense the line again.The Non Persistent method reduces the chance of collision because it is unlikely that two or more stations will wait the same amount of time and retry to send on the same time.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;&lt;b&gt;P-Persistent :&lt;/b&gt;&lt;/span&gt; The P-Persistent method is used if the channel has the time slot duration equal to or greater than the maximum propagation time.This&amp;nbsp; method is the combination of two other persistent methods.It reduces the chance of collision and improves efficiency.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;CSMA/CD&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;It is a&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-weight: 700;&quot;&gt;carrier sense multiple access/ collision detection&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;network protocol to transmit data frames.The &lt;b&gt;CSMA&lt;/b&gt; method does not specify the procedure following a collision. &lt;b&gt;CSMA/CD&lt;/b&gt; augments the algorithms to handle the collision. In this methods the station monitors the medium after it sends a frame to see if the transmission was successful. If so the station has finished , if there is a collision , the frame is sent again.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;It first senses the shared channel before broadcasting the frames, and if the channel is idle, it transmits a frame to check whether the transmission was successful. If the frame is successfully received, the station sends another frame. If any collision is detected in the &lt;b&gt;CSMA/CD&lt;/b&gt;, the station sends a &lt;b&gt;jam/ stop&lt;/b&gt; signal to the shared channel to terminate data transmission. After that, it waits for a random time before sending a frame to a channel.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;CSMA/CA&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;It is a &lt;b&gt;C&lt;/b&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b&gt;arrier Sense Multiple Access/Collision Avoidance&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;network protocol for carrier transmission of data frames. It was invented for &lt;b&gt;wireless network&lt;/b&gt;.It receives an acknowledgment when a data frame is sent to check whether the channel is clear or not. If the station receives only a single (own) acknowledgments, that means the data frame has been successfully transmitted to the receiver. But if it gets two signals (its own and one more in which the collision of frames), a collision of the frame occurs in the shared channel. Detects the collision of the frame when a sender receives an acknowledgment signal.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;There are three strategies to avoid the collision which are given below :&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;h3 style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;&lt;span style=&quot;font-weight: 700;&quot;&gt;Inter Frame Space(IFS)&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In this method, the station waits for the channel to become idle, and if it gets the channel is idle, it does not immediately send the data. Instead of this, it waits for some time, and this time period is called the&amp;nbsp;&lt;span style=&quot;font-weight: 700;&quot;&gt;Inter Frame&lt;/span&gt;&amp;nbsp;&lt;b&gt;Space&lt;/b&gt; or &lt;b&gt;IFS&lt;/b&gt;. However, the &lt;b&gt;IFS&lt;/b&gt; time is often used to define the priority of the station.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;&lt;span style=&quot;font-weight: 700;&quot;&gt;Contention window&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In the &lt;b&gt;Contention window&lt;/b&gt;, the total time is divided into different slots. When the station/ sender is ready to transmit the data frame, it chooses a random slot number of slots as&amp;nbsp;&lt;span style=&quot;font-weight: 700;&quot;&gt;wait time&lt;/span&gt;. If the channel is still busy, it does not restart the entire process, except that it restarts the timer only to send data packets when the channel is inactive.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;&lt;span style=&quot;font-weight: 700;&quot;&gt;Acknowledgment&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In the acknowledgment method, the sender station sends the data frame to the shared channel if the acknowledgment is not received ahead of time.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;div style=&quot;font-family: verdana; font-weight: 700; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/7723521228970917703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/12/access-control-in-data-link-layer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/7723521228970917703'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/7723521228970917703'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/12/access-control-in-data-link-layer.html' title='Multiple Access Control in data link layer'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEiLGzG1-d7WiNIIcXEtzauJZu_taDwcNs_1AanpaZXfv5JKSKpSxC9jXXp_iReiaL5-RoyaNJ2rkxT0bwUVCmJEU-nyGFfzRN2nBRHnw3IBCXnHVZQCFbrB4oSzpyWWQnKz8A-3IjTEIx5PE83GIe2-ZfROl4boYLBlD4INyoL8x5cKtPobzcTJbYOc=s72-w477-h243-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-893027979089586620</id><published>2021-11-25T23:23:00.009+05:30</published><updated>2021-12-08T11:49:28.881+05:30</updated><title type='text'>Flow Control in Data Link Layer</title><content type='html'>&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;Flow Control&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;Data Link&lt;/b&gt; layer provides a functionality to &lt;b&gt;control the flow of the data&lt;/b&gt;&amp;nbsp; between two nodes is called &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Flow Control&lt;/span&gt;&lt;/b&gt;. &lt;b&gt;Flow control&lt;/b&gt; in the data link layer is a technique that allows two stations working at different speeds to communicate with each other.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: verdana;&quot;&gt;If the sender is on a fast and powerful computer as compared to the receiver then the receiver may get overwhelmed by the frames transmitted by the sender.&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana;&quot;&gt;In such a scenario even if there is no error in the transmission of the frame the receiver may lose some of the frames as it is unable to process the frame with the speed at which the sender is transmitting the frame.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In the &lt;b&gt;data link layer&lt;/b&gt;, &lt;b&gt;flow control&lt;/b&gt; restricts the number of frames that sender can send before it waits for an acknowledgement from the receiver.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It is a set of measures taken to regulate the amount of data that a sender sends so that a fast sender does not overwhelm a slow receiver.&lt;/span&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: start;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;If there is no &lt;b&gt;flow control&lt;/b&gt; mechanism present then after some time the data buffer at the receiver end may get full and overflow as the data link&amp;nbsp;at the receiver may be busy in processing the old received data. In this process, the receiver may lose some frames or data transmitted from the sender. To fix this problem there are &lt;b&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;two approaches &lt;/span&gt;&lt;/b&gt;to &lt;b&gt;flow control&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b&gt;1. Feedback-based Flow Control&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b&gt;2. Rate-based Flow Control&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: verdana;&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;span style=&quot;font-family: verdana;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhOYs-oz1nGY26kNeAU-DgYeZ90vllBTZEPC7XSEVgtiF5DjFcetpKQYEhEOTtqFNWNXckm53sxhie5GxqE6JbnqUhE0Tf8jyoyMlKWscBBRx_B9GvjHgOyg_X6GHmOH-cG2LnAbfDRKpJs7apOKLHocPEx-jNMEV4xQtqUD7hLOVjj-KsEeqsRM5Eq=s612&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;237&quot; data-original-width=&quot;612&quot; height=&quot;154&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhOYs-oz1nGY26kNeAU-DgYeZ90vllBTZEPC7XSEVgtiF5DjFcetpKQYEhEOTtqFNWNXckm53sxhie5GxqE6JbnqUhE0Tf8jyoyMlKWscBBRx_B9GvjHgOyg_X6GHmOH-cG2LnAbfDRKpJs7apOKLHocPEx-jNMEV4xQtqUD7hLOVjj-KsEeqsRM5Eq=w519-h154&quot; width=&quot;519&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;1. Feedback-based Flow Control&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In these protocol, the sender sends frames after it has received acknowledgement for the previous sent frame from the receiver. This is used in &lt;b&gt;Data Link Layer&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;2. Rate-based Flow Control&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;These protocols have built in mechanisms to restrict the rate of transmission of the data without requiring acknowledgement from the receiver. This is used in the &lt;b&gt;Network Layer&lt;/b&gt; and &lt;b&gt;Transport Layer.&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;Flow Control techniques in Data Link Layer&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;Data link layer &lt;/b&gt;uses &lt;b&gt;feedback based flow control&lt;/b&gt; mechanisms. There are basically &lt;b&gt;two types of techniques&lt;/b&gt; to control the flow of data:-&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&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/a/AVvXsEiVHgSfcYUs63DiAZPhQc5rRR8-ChFHDbyKueiOWLnfUVn16T9_bC0bZ_KdcjAOywE95p6Ser4aZzWqxn9aHUpt7CaYxSS1QsUqzzxnj4eaR5n-yfpO-r7dCZ6FJMwaT2sOZQ_5bkBKoNMfXqTX9Hfe3paIB5ujFzbDWCFz1pktflUB0kZeFjF_ghfp=s612&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;237&quot; data-original-width=&quot;612&quot; height=&quot;189&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiVHgSfcYUs63DiAZPhQc5rRR8-ChFHDbyKueiOWLnfUVn16T9_bC0bZ_KdcjAOywE95p6Ser4aZzWqxn9aHUpt7CaYxSS1QsUqzzxnj4eaR5n-yfpO-r7dCZ6FJMwaT2sOZQ_5bkBKoNMfXqTX9Hfe3paIB5ujFzbDWCFz1pktflUB0kZeFjF_ghfp=w470-h189&quot; width=&quot;470&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Stop and Wait Flow Control&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;This method is&amp;nbsp; easiest and simple form of flow control.In this method&lt;span style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;the following transitions are involved −&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ul class=&quot;list&quot; style=&quot;margin-bottom: 0rem; margin-top: 0px; text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span color=&quot;rgba(0, 0, 0, 0.870588235294118)&quot;&gt;The sender sends a frame and stop transmitting until the acknowledgement of the sent data-frame is received.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #a00029; font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul class=&quot;list&quot; style=&quot;margin-bottom: 0rem; margin-top: 0px; text-align: left;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span color=&quot;rgba(0, 0, 0, 0.870588235294118)&quot;&gt;Once the receiver receives the frame, it sends an acknowledgement&amp;nbsp;back to the sender.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #a00029; font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul class=&quot;list&quot; style=&quot;margin-bottom: 0rem; margin-top: 0px; text-align: left;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span color=&quot;rgba(0, 0, 0, 0.870588235294118)&quot;&gt;On receiving the acknowledgement, the sender understands that the receiver is ready to accept the next frame. So it send another frame after receiving the&amp;nbsp; acknowledgement from the receiver.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjhz53thAzmDHxf3RrqsoG6Ww4nxKN2HkweKPWj2AUtIPj37dOIRveiJymUSRjf7FvQJGAnzSnbdf1hDbwmXIoudnc1NzGUQEUk84-3obHmrjC1Emv_oxYBRqtJIYFzM14ri41JmCixqsvcIcVomQMLJoh68gbb6F9NeqHBUONdttTGO68FTlxkxK6G=s339&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;339&quot; data-original-width=&quot;322&quot; height=&quot;348&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjhz53thAzmDHxf3RrqsoG6Ww4nxKN2HkweKPWj2AUtIPj37dOIRveiJymUSRjf7FvQJGAnzSnbdf1hDbwmXIoudnc1NzGUQEUk84-3obHmrjC1Emv_oxYBRqtJIYFzM14ri41JmCixqsvcIcVomQMLJoh68gbb6F9NeqHBUONdttTGO68FTlxkxK6G=w368-h348&quot; width=&quot;368&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;h3 style=&quot;background-color: white; border: 0px; box-sizing: border-box; letter-spacing: 0.162px; margin: 0px 0px 10px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana;&quot;&gt;Advantages –&lt;/span&gt;&lt;/strong&gt;&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; border: 0px; box-sizing: border-box; display: flex; flex-direction: column; letter-spacing: 0.162px; list-style-image: initial; list-style-position: outside; margin: 0px 0px 24px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;This method is very &lt;span style=&quot;color: #38761d;&quot;&gt;easy and simple &lt;/span&gt;and very accurate.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Each of the frames is checked and acknowledged well.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span color=&quot;var(--color-black)&quot; style=&quot;font-family: verdana; letter-spacing: 0.162px;&quot;&gt;It can also be used for &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;noisy channels&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #800180;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;h3&gt;&lt;ul style=&quot;background-color: white; border: 0px; box-sizing: border-box; display: flex; flex-direction: column; letter-spacing: 0.162px; list-style-image: initial; list-style-position: outside; margin: 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;li&gt;&lt;strong style=&quot;background-color: transparent; border: 0px; box-sizing: border-box; letter-spacing: 0.162px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana;&quot;&gt;Disadvantages –&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; border: 0px; box-sizing: border-box; display: flex; flex-direction: column; letter-spacing: 0.162px; list-style-image: initial; list-style-position: outside; margin: 0px 0px 24px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;This method is very slow in compare to other techniques.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In this method, only one frame can be sent at once.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;border: 0px; box-sizing: border-box; color: var(--color-black); line-height: 1.58; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It is very inefficient and makes the transmission process very slow.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;letter-spacing: 0.162px;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;&lt;b&gt;Case 1 :&lt;/b&gt;&lt;/span&gt; &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Data frame is lost&lt;/span&gt;&lt;span style=&quot;color: #800180;&quot;&gt; &lt;/span&gt;during transmission between sender to receiver.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;letter-spacing: 0.162px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;letter-spacing: 0.162px;&quot;&gt;Sender will think that &lt;b&gt;receiver&amp;nbsp;is busy&lt;/b&gt; to accept the fame but actually&amp;nbsp;&lt;b&gt;data is lost&lt;/b&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;letter-spacing: 0.162px;&quot;&gt;Receiver will assume &lt;b&gt;no packet has been sent&lt;/b&gt; by the sender.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;letter-spacing: 0.162px;&quot;&gt;Both will be waiting for each other(sender waits for the acknowledgement and the receiver waits for the data frame) and there will be&lt;b&gt; a deadlock.&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;letter-spacing: 0.162px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Solution :&lt;/span&gt; &lt;/b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;A timer is applied between sender and the receiver and the receiver will wait till timeout timer for the data after that it will confirm that data has been lost.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; border: 0px; box-sizing: border-box; display: flex; flex-direction: column; letter-spacing: 0.162px; list-style-image: initial; list-style-position: outside; margin: 0px 0px 24px; padding: 0px; text-align: left; vertical-align: baseline;&quot;&gt;&lt;li&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;Case 2 :&lt;/b&gt;&lt;/span&gt;&amp;nbsp; &lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Acknowledgement lost&lt;/span&gt; during transmission between receiver to sender.&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;letter-spacing: 0.162px;&quot;&gt;After timeout timer expires, sender will assume that &lt;b&gt;the data is lost&lt;/b&gt; but actually the &lt;/span&gt;&lt;span style=&quot;letter-spacing: 0.162px;&quot;&gt;&lt;b&gt;acknowledgement&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;letter-spacing: 0.162px;&quot;&gt;&lt;b&gt;&amp;nbsp;is lost&lt;/b&gt;. By assuming this it will send the data frame again to the receiver receiver will think that, it is a new frame, hence it will send acknowledgement again so that will be have duplicate data packet.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;letter-spacing: 0.162px;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;&lt;b&gt;Solution :&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;font-size: small;&quot;&gt;To remove duplicate data packet problem a method is introduced that is called &quot;&lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;sequence number&lt;/span&gt;&lt;/b&gt;&quot;. which are added to the every data frame. so using frame numbers receiver can easily determine the duplicates frames.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium; letter-spacing: 0.162px;&quot;&gt;Sliding Window Flow Control&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: verdana;&quot;&gt;The &lt;b&gt;sliding window protocol&lt;/b&gt; is&amp;nbsp; a technique to send the multiple frames at once. In this protocol sender and the receiver both are agree upon the total number of data frames after which acknowledgement is needed to be transmitted. In this method the sender can send various data frames without getting an acknowledgement.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In this method we use &lt;b&gt;sequence numbers&lt;/b&gt; for each data frame to avoid duplicate frame received at the receiver side. Each frame has sent according to there &lt;b&gt;sequence number.&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;This increases and improves network throughput. Sliding window method also known as &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Windowing&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Sliding window protocol has &lt;b&gt;two types &lt;/b&gt;:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;1. Go-Back-N ARQ(&lt;b&gt;Automatic Repeat Request&lt;/b&gt;)&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;2.&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Selective Repeat ARQ&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;1. Go-Back-N Protocol&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It is the type of &lt;b&gt;sliding window protocol &lt;/b&gt;means here sender can sent multiple frames at once. In this protocol &lt;span style=&quot;color: #38761d;&quot;&gt;&lt;b&gt;N is the size of the sender window&lt;/b&gt; &lt;/span&gt;and the &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;receiver window size is always 1&lt;/span&gt;&lt;/b&gt;. For example, &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Go-Back-8&lt;/span&gt;&lt;/b&gt;, the size of sender window &lt;b&gt;will be 8&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Sender can send multiple frames at once but the receiver can receive only one frame at once because the frame size of receiver is only 1..There is no acceptance of out of order frames.Frames are only accept in order.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;In this method a receiver does not receive a corrupted frame if receiver has a frame which is corrupted then it cancels t&lt;/span&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;o receive it&amp;nbsp; and when the timer expires, the sender sends the correct frame again.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;In this method we use &lt;b&gt;cumulative&amp;nbsp;acknowledgement&lt;/b&gt;. means receiver send the acknowledgement for the &lt;b&gt;next expected frames&lt;/b&gt; means if receiver has received &lt;b&gt;frame 1&lt;/b&gt;, &lt;b&gt;frame 2&lt;/b&gt; and &lt;b&gt;frame 3&lt;/b&gt; then it will send &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;acknowledgement&amp;nbsp;4&lt;/span&gt;&lt;/b&gt; for next expected frame.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In this method the &lt;b&gt;retransmission is very high because&lt;/b&gt; the receiver can only receive one frame at once while the sender can send multiple frames at once so if any one of the frame is lost during transmission then receiver waits for that frame and do not receive any other frame before that frame. If the acknowledgment of a frame is not received within the time period, then sender has to be send all frames from starting.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&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/a/AVvXsEihL7r6FfIbW9kZYRJuGrKpa7Rg05gvLc30-6b4UbOBQODEyXQkYv5EiCJmp-Vs4_bzunCXynds0HPwf2eX_NKkvaHnqWm4U6A1cRozgBcb7zz0xfPkwncS8wJzE9AO9ofnDjCXvHOcQLCx6IN5FmDPCprGu4LP_WCTqotP35gcT1CFIRdtW87t_ZdZ=s843&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;711&quot; data-original-width=&quot;843&quot; height=&quot;389&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEihL7r6FfIbW9kZYRJuGrKpa7Rg05gvLc30-6b4UbOBQODEyXQkYv5EiCJmp-Vs4_bzunCXynds0HPwf2eX_NKkvaHnqWm4U6A1cRozgBcb7zz0xfPkwncS8wJzE9AO9ofnDjCXvHOcQLCx6IN5FmDPCprGu4LP_WCTqotP35gcT1CFIRdtW87t_ZdZ=w365-h389&quot; width=&quot;365&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;h3 style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; color: #800180; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;2. Selective Repeat Protocol&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: medium; text-align: justify;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Selective Repeat Protocol&lt;/span&gt; &lt;/b&gt;is also a type of &lt;b&gt;sliding window protocol&lt;/b&gt; in which we can transmit the multiple number of frames at once.In this protocol, the size of the &lt;b&gt;sender window&lt;/b&gt; is always &lt;span style=&quot;color: #38761d;&quot;&gt;&lt;b&gt;same&lt;/b&gt; &lt;/span&gt;to the &lt;b&gt;receiver window&lt;/b&gt; size.means the receiver&amp;nbsp;also can receive multiple frames at once without sending a acknowledgement. It can accept out of order frames also.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;If the receiver has a corrupt frame, it does not directly cancels it. It sends a &lt;b&gt;negative acknowledgment&lt;/b&gt; to the sender. The sender sends that frame again as soon as on the receiving &lt;b&gt;negative acknowledgment&lt;/b&gt;. There is no waiting for any time-out to send that frame.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The &lt;b&gt;retransmission&lt;/b&gt; is very low in this method.It is more complex to implement because&amp;nbsp;it uses &lt;b&gt;searching&lt;/b&gt; and &lt;b&gt;sorting&lt;/b&gt; techniques.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Advantages:&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;Retransmission&lt;/b&gt; is very low compare to Go-Back-N protocol.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Disadvantages:&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;More complexity of sender and receiver.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Each frame must be &lt;b&gt;acknowledge individually&lt;/b&gt; because&amp;nbsp;there is &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;no cumulative acknowledgements&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Receive may receive frames &lt;b&gt;out of sequence&lt;/b&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&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;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/893027979089586620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/11/flow-control-in-data-link-layer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/893027979089586620'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/893027979089586620'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/11/flow-control-in-data-link-layer.html' title='Flow Control in Data Link Layer'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEhOYs-oz1nGY26kNeAU-DgYeZ90vllBTZEPC7XSEVgtiF5DjFcetpKQYEhEOTtqFNWNXckm53sxhie5GxqE6JbnqUhE0Tf8jyoyMlKWscBBRx_B9GvjHgOyg_X6GHmOH-cG2LnAbfDRKpJs7apOKLHocPEx-jNMEV4xQtqUD7hLOVjj-KsEeqsRM5Eq=s72-w519-h154-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-4686192379950038482</id><published>2021-11-24T10:53:00.009+05:30</published><updated>2021-11-24T14:56:49.227+05:30</updated><title type='text'>Error Correction Techniques</title><content type='html'>&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;Error detection techniques &lt;/b&gt;is used to find out the exact number of bits that have been corrupted and as well as their locations.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;Error correction&lt;/b&gt; can be handled in &lt;b&gt;two ways&lt;/b&gt; :&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;1.&lt;/b&gt; &lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;&lt;b&gt;Backward Error Correction (Retransmission) :&lt;/b&gt;&lt;/span&gt; If the receiver detects an error in the incoming data unit, it requests the sender to re-transmit the data frame. It is a relatively simple technique. But it can be efficiently used only where retransmitting is not expensive as in fibre optics.&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;2.&lt;/b&gt; &lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;&lt;b&gt;Forward Error Correction :&lt;/b&gt;&lt;/span&gt; If the receiver detects some error in the incoming frame, it executes error correcting code that generates the actual frame. This saves bandwidth required for retransmission.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;If there are two many errors, the frames need to be retransmitted.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;u&gt;&lt;b&gt;A single additional bit can detect the error, but cannot correct it.&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;For correcting the errors, one has to know the &lt;b&gt;exact position&lt;/b&gt; of the error. For &lt;b&gt;&lt;span style=&quot;color: #800180;&quot;&gt;example&lt;/span&gt;&lt;/b&gt;, if we want to calculate a &lt;b&gt;single bit error&lt;/b&gt;, the error correction code will determine which one of seven bits is in error. To achieve this, we have to add some additional &lt;b&gt;redundant bits&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;&lt;b&gt;Redundant bits :&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;b&gt;Redundant bits&lt;/b&gt; are extra binary bits that are generated and added to the information carrying bits of data transfer to ensure that number of bits were lost during the data transfer.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Suppose &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;r &lt;/span&gt;&lt;/b&gt;is the number of redundant bits and &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;d&lt;/span&gt;&lt;/b&gt; is the total number of data bits. The number of redundant bits&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt; r&lt;/span&gt;&lt;/b&gt; can be calculated by using the formula:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;b style=&quot;color: #333333; font-family: verdana; font-size: large;&quot;&gt;&lt;u&gt;&amp;nbsp;Number of redundant bits&amp;nbsp;&lt;/u&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;b style=&quot;font-family: verdana; font-size: large;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;2&lt;sup&gt;r&lt;/sup&gt;&amp;gt;=d+r+1&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The value of &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;r&lt;/span&gt;&lt;/b&gt; is calculated by using the above formula. For&lt;b&gt; &lt;span style=&quot;color: #800180;&quot;&gt;example&lt;/span&gt;&lt;/b&gt;, if the value of &lt;b&gt;d is 4&lt;/b&gt;, then the possible smallest value that satisfies the above relation would be &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;3&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;To determine the position of the bit which is in error, a technique developed by &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;R.W Hamming&lt;/span&gt;&lt;/b&gt; is &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Hamming code&lt;/span&gt;&lt;/b&gt; which can be applied to any length of the data unit and uses the relationship between data units and redundant units.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;Hamming Code&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;Hamming Code&lt;/b&gt; is a set of error correction code that can be used to detect and correct the errors that can occur when the data is moved from sender to the receiver.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;&lt;b&gt;Parity Bits :&lt;/b&gt;&lt;/span&gt;&amp;nbsp;A &lt;b&gt;parity bit &lt;/b&gt;is a bit appended to the data of binary bits to ensure that the total &lt;b&gt;number of 1&#39;s&lt;/b&gt; in the data is &lt;b&gt;even or odd&lt;/b&gt;. &lt;b&gt;Parity bits&lt;/b&gt; are used for &lt;b&gt;error detection&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;There are &lt;b&gt;two types&lt;/b&gt; of parity bits :&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;Even parity:&lt;/span&gt;&lt;/span&gt;&amp;nbsp;To check for &lt;b&gt;even parity&lt;/b&gt;, if the &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;total number of 1&#39;s is even&lt;/span&gt;&lt;/b&gt;, then the value of the &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;parity bit is 0&lt;/span&gt;&lt;/b&gt;. If the &lt;b&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;total number of 1&#39;s is odd&lt;/span&gt;&lt;/b&gt;, then the value of the &lt;b&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;parity bit is 1&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;Odd Parity:&lt;/span&gt;&lt;/span&gt;&amp;nbsp;To check for &lt;b&gt;odd parity&lt;/b&gt;, if the total &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;number of 1&#39;s is even&lt;/span&gt;&lt;/b&gt;, then the value of &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;parity bit is 1&lt;/span&gt;&lt;/b&gt;. If the &lt;b&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;total number of 1&#39;s is odd&lt;/span&gt;&lt;/b&gt;, then the value of &lt;b&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;parity bit is 0&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;Algorithm of Hamming Code&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;&lt;b&gt;Step 1 :&lt;/b&gt;&lt;/span&gt;&amp;nbsp;Calculate the &lt;b&gt;number of redundant bits&lt;/b&gt; by using this formula&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&amp;nbsp;&lt;span style=&quot;text-align: justify;&quot;&gt;2&lt;sup&gt;r&lt;/sup&gt;&amp;gt;=d+r+1.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;&lt;b&gt;Step 2 :&lt;/b&gt;&lt;/span&gt; Find out the &lt;b&gt;positions of redundant bits&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana; text-align: justify;&quot;&gt;The &lt;b&gt;redundant bits &lt;/b&gt;placed at bit positions of &lt;b&gt;powers of 2 &lt;/b&gt;like &lt;b&gt;1,2,4,8,16,32....&lt;/b&gt; and so on.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;&lt;b&gt;Step 3 :&lt;/b&gt;&lt;/span&gt; calculate the &lt;b&gt;values of each redundant bits&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Each redundant bit, &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;r&lt;/span&gt;&lt;/b&gt; is calculated as the parity, generally &lt;b&gt;even parity&lt;/b&gt;, based upon it&#39;s bit position.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;&lt;b&gt;Step 4 :&lt;/b&gt;&lt;/span&gt; &lt;b&gt;Placed the redundant bits&lt;/b&gt; into the positions of actual data and sent to the receiver.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;&lt;b&gt;Step 5 :&lt;/b&gt;&lt;/span&gt; At the&lt;b&gt; receiver&#39;s end&lt;/b&gt; the &lt;b&gt;parity bits are also calculated&lt;/b&gt; and if the parity bits having &lt;b&gt;non-zero values&lt;/b&gt; then the data is said to be &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;corrupted&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #800180;&quot;&gt;Step 6 :&lt;/span&gt; &lt;/b&gt;&lt;/span&gt;Find out the &lt;b&gt;position of the data&lt;/b&gt; which is corrupted and correct them by changing the &lt;b&gt;bit to 0 or 1&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;Example :&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Suppose the original data is &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;1010&lt;/span&gt;&lt;/b&gt; which is to be sent.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;At the &lt;b&gt;first step &lt;/b&gt;we calculate the &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;number of redundant bits&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span face=&quot;inter-bold, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif&quot; style=&quot;color: #333333; font-weight: 700; text-align: justify;&quot;&gt;Total number of data bits &lt;/span&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;span face=&quot;inter-bold, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif&quot; style=&quot;font-weight: 700; text-align: justify;&quot;&gt;&#39;d&#39;&lt;/span&gt;&lt;span style=&quot;text-align: justify;&quot;&gt; = 4&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span face=&quot;inter-bold, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif&quot; style=&quot;color: #333333; font-family: verdana; font-weight: 700; text-align: justify;&quot;&gt;Number of redundant bits&lt;/span&gt;&lt;span face=&quot;inter-bold, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif&quot; style=&quot;font-family: verdana; text-align: justify;&quot;&gt;&lt;b&gt; &lt;span style=&quot;color: #2b00fe;&quot;&gt;r&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span face=&quot;inter-bold, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif&quot; style=&quot;color: #2b00fe; font-family: verdana; font-weight: 700; text-align: justify;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: verdana; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-family: verdana; text-align: justify;&quot;&gt;2&lt;/span&gt;&lt;sup style=&quot;font-family: verdana; text-align: justify;&quot;&gt;r&lt;/sup&gt;&lt;span style=&quot;font-family: verdana; text-align: justify;&quot;&gt; &amp;gt;= d+r+1&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-bottom: 5px; margin-left: 10px; margin-top: 5px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;                           &lt;span style=&quot;color: #333333;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;nbsp; &lt;/span&gt;&amp;nbsp;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;b&gt;2&lt;sup&gt;r&lt;/sup&gt;&amp;gt;= 4+r+1&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-bottom: 5px; margin-left: 10px; margin-top: 5px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #333333; font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;Therefore, the value of&lt;/span&gt;&lt;b&gt; r is 3&lt;/b&gt;&lt;span style=&quot;color: #333333;&quot;&gt; that satisfies the above relation. S&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;o there we will use &lt;/span&gt;&lt;b&gt;3 redundant bits&lt;/b&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-bottom: 5px; margin-left: 10px; margin-top: 5px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #333333; font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;At the &lt;/span&gt;&lt;b style=&quot;color: #333333;&quot;&gt;second step&lt;/b&gt;&lt;span style=&quot;color: #333333;&quot;&gt; determine the &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;positions of redundant bits.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-bottom: 5px; margin-left: 10px; margin-top: 5px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; white-space: normal;&quot;&gt;The three bits are represented by &lt;b&gt;r1&lt;/b&gt;, &lt;b&gt;r2&lt;/b&gt;, &lt;b&gt;r4&lt;/b&gt;. The position of the redundant bits is calculated with corresponds to the raised &lt;b&gt;power of 2&lt;/b&gt;. Therefore, their corresponding positions are&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-weight: 700; white-space: normal;&quot;&gt;1, 2&lt;sup&gt;1&lt;/sup&gt;, 2&lt;sup&gt;2&lt;/sup&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; white-space: normal;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-bottom: 5px; margin-left: 10px; margin-top: 5px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-bottom: 5px; margin-left: 10px; margin-top: 5px; text-align: justify;&quot;&gt;&lt;span style=&quot;border: none; font-family: verdana; margin: 0px; padding: 0px;&quot;&gt;The&amp;nbsp;position&amp;nbsp;of&amp;nbsp;&lt;b&gt;r1&amp;nbsp;=&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;border: none; color: #c00000; font-family: verdana; margin: 0px; padding: 0px;&quot;&gt;&lt;b&gt;1&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;border: none; font-family: verdana; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-bottom: 5px; margin-left: 10px; margin-top: 5px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The&amp;nbsp;position&amp;nbsp;of&amp;nbsp;&lt;b&gt;r2&amp;nbsp;=&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;border: none; color: #c00000; font-family: verdana; margin: 0px; padding: 0px;&quot;&gt;&lt;b&gt;2&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;border: none; font-family: verdana; margin: 0px; padding: 0px;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-bottom: 5px; margin-left: 10px; margin-top: 5px; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: rgba(214, 189, 189, 0.3); font-family: verdana;&quot;&gt;The&amp;nbsp;position&amp;nbsp;of&amp;nbsp;&lt;b&gt;r4&amp;nbsp;=&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;number&quot; style=&quot;border: none; color: #c00000; font-family: verdana; margin: 0px; padding: 0px;&quot;&gt;&lt;b&gt;4&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;border: none; font-family: verdana; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;color: #333333; margin-bottom: 5px; margin-left: 10px; margin-top: 5px; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: verdana; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p style=&quot;color: #333333; margin-bottom: 5px; margin-left: 10px; margin-top: 5px; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Representation of Data on the addition of parity bits:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;margin-bottom: 5px; margin-left: 10px; margin-top: 5px; text-align: justify;&quot;&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #333333; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhtFTL5UFr21gd0lraWZNsHGjNJJCHmpA9mAhx7lAUGGEZApKCmZ0MYWRKCE-KF9WSfBBGUdWIx_q8ucx3AI153K09avmD3WNyLV5muCkbUkPpZHKij8_NnpJRvjO7iUZCy_0kUxYCIr2h1yFS1dS0yna8a46GmOd17tohCj07j4jeM34S4GTaINC_o=s351&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;67&quot; data-original-width=&quot;351&quot; height=&quot;77&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhtFTL5UFr21gd0lraWZNsHGjNJJCHmpA9mAhx7lAUGGEZApKCmZ0MYWRKCE-KF9WSfBBGUdWIx_q8ucx3AI153K09avmD3WNyLV5muCkbUkPpZHKij8_NnpJRvjO7iUZCy_0kUxYCIr2h1yFS1dS0yna8a46GmOd17tohCj07j4jeM34S4GTaINC_o=w333-h77&quot; width=&quot;333&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #333333; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;At the &lt;b&gt;third step&lt;/b&gt; determine the &lt;b&gt;values of each redundant(parity) bits&lt;/b&gt; so now we find the &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;values of r1, r2 and r4&lt;/span&gt;&lt;/b&gt; by the help of this binary representation of every position number.&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span style=&quot;color: #333333; font-family: verdana;&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/a/AVvXsEhBUwwNBTlpTHlZmFvGlBqWhv-IBYMXtmEl3fySnfGMex6PIXqg4zThFUvxF80eO8BY9Mm-VRY7vQ1GJDr-3FwPGmplN097l9yMfQip3Hrm6c7lx5yslmohMS53hJv77mJVxH2RCyXOWuj5t7MqM31tJRSzihBiYba9iYxmG26dBELT8DRO10uSNNCF=s327&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;184&quot; data-original-width=&quot;327&quot; height=&quot;266&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhBUwwNBTlpTHlZmFvGlBqWhv-IBYMXtmEl3fySnfGMex6PIXqg4zThFUvxF80eO8BY9Mm-VRY7vQ1GJDr-3FwPGmplN097l9yMfQip3Hrm6c7lx5yslmohMS53hJv77mJVxH2RCyXOWuj5t7MqM31tJRSzihBiYba9iYxmG26dBELT8DRO10uSNNCF=w340-h266&quot; width=&quot;340&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Determining the r1 bit&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The &lt;b&gt;r1 bit&lt;/b&gt; is calculated by performing a &lt;b&gt;parity check&lt;/b&gt; on the bit positions whose binary representation includes 1 in the &lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;first position&lt;/b&gt;&lt;/span&gt;.&lt;/span&gt;&lt;/p&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/a/AVvXsEjhsn7tXS8mMhg6ZEQdJ3FWeorut1O2PsSlSdcLmZhefxSvVLBe6tx2PsiC_Zt3RwqjxPkDPhvy1LP3S5RGBqcNaKQu5iXCuleUGgW46ljAZpYtfNoNXX1oEVdr8VKRzeWISwR6omR-9nGTM1v4r1D9Mo4lc0nmpkTxMOvI9mo-Ln90IL8iXKl5pfGF=s351&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;172&quot; data-original-width=&quot;351&quot; height=&quot;173&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjhsn7tXS8mMhg6ZEQdJ3FWeorut1O2PsSlSdcLmZhefxSvVLBe6tx2PsiC_Zt3RwqjxPkDPhvy1LP3S5RGBqcNaKQu5iXCuleUGgW46ljAZpYtfNoNXX1oEVdr8VKRzeWISwR6omR-9nGTM1v4r1D9Mo4lc0nmpkTxMOvI9mo-Ln90IL8iXKl5pfGF=w380-h173&quot; width=&quot;380&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: transparent; text-align: left;&quot;&gt;We observe from the above figure that the bit positions that includes 1 in the first position are &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;1, 3, 5, 7&lt;/span&gt;&lt;/b&gt;. Now, we perform the &lt;b&gt;even-parity check&lt;/b&gt; at these bit positions. The total &lt;b&gt;number of 1&lt;/b&gt; at these bit positions corresponding to &lt;b&gt;r1 is&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; text-align: left;&quot;&gt;&lt;b&gt;even&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; font-weight: 700; text-align: left;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;background-color: transparent; text-align: left;&quot;&gt;therefore, the value of the &lt;b&gt;r1 bit is 0&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; text-align: left;&quot;&gt;&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 class=&quot;h3&quot; style=&quot;line-height: 1.3em;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Determining r2 bit&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The&lt;b&gt; r2 bit&lt;/b&gt; is calculated by performing a&lt;b&gt; parity check&lt;/b&gt; on the&lt;b&gt; bit positions&lt;/b&gt; whose binary representation includes 1 in the&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt; second position&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&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/a/AVvXsEjQmq7dtm0H0Jp2GdZY8Jqc-zPnETEC-p-oErD2HEyBFXmKU1eZyCUMAhJzhNgq9SXKbNlyoOK3m2Wr2Q0oZ6MmxcGg9yEvXRcvI7gdSPP8B3wln_y8zIjGACtfJtZbOSWKeF2qS-In3oHEecqLVGMmDkrm-8n86LlRX5McJ-FwA9mNNhiBvgAZn3q7=s351&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;172&quot; data-original-width=&quot;351&quot; height=&quot;187&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjQmq7dtm0H0Jp2GdZY8Jqc-zPnETEC-p-oErD2HEyBFXmKU1eZyCUMAhJzhNgq9SXKbNlyoOK3m2Wr2Q0oZ6MmxcGg9yEvXRcvI7gdSPP8B3wln_y8zIjGACtfJtZbOSWKeF2qS-In3oHEecqLVGMmDkrm-8n86LlRX5McJ-FwA9mNNhiBvgAZn3q7=w343-h187&quot; width=&quot;343&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;We observe from the above figure that the bit positions that includes 1 in the &lt;b&gt;second position&lt;/b&gt; are&amp;nbsp;&lt;span style=&quot;font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;2, 3, 6, 7&lt;/span&gt;&lt;/span&gt;. Now, we perform the &lt;b&gt;even-parity check&lt;/b&gt; at these bit positions. The total &lt;b&gt;number of 1&lt;/b&gt; at these bit positions corresponding to &lt;b&gt;r2 is&amp;nbsp;odd&lt;/b&gt;&lt;span style=&quot;font-weight: 700;&quot;&gt;,&lt;/span&gt; therefore, the value of the &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;r2 bit is 1&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; line-height: 1.3em; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Determining r4 bit&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The &lt;b&gt;r4 bit&lt;/b&gt; is calculated by performing a &lt;b&gt;parity check&lt;/b&gt; on the &lt;b&gt;bit positions&lt;/b&gt; whose binary representation includes 1 in the &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;third position&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/p&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/a/AVvXsEiDQNQBDonYDThcyid3_zI54ls-wMQLnSSzM_mCjFDXgiWw9gHRkrqM0H5h09VJpR4UDRGDcYVkm_t8NmnrEUQNk14_JV5Z67r05hdwcB6G84Goa2Tkx6cWggRqXaMO31W5b1JjpT8H2cnJsiOfKR-Q2daRn2KKnmR73K4SC4CP14OD7MpQ5s-SMFLR=s351&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;182&quot; data-original-width=&quot;351&quot; height=&quot;166&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiDQNQBDonYDThcyid3_zI54ls-wMQLnSSzM_mCjFDXgiWw9gHRkrqM0H5h09VJpR4UDRGDcYVkm_t8NmnrEUQNk14_JV5Z67r05hdwcB6G84Goa2Tkx6cWggRqXaMO31W5b1JjpT8H2cnJsiOfKR-Q2daRn2KKnmR73K4SC4CP14OD7MpQ5s-SMFLR=w460-h166&quot; width=&quot;460&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;We observe from the above figure that the bit positions that includes 1 in the &lt;b&gt;third position&lt;/b&gt; are&amp;nbsp;&lt;span style=&quot;font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;4, 5, 6, 7&lt;/span&gt;&lt;/span&gt;. Now, we perform the &lt;b&gt;even-parity check&lt;/b&gt; at these bit positions. The total &lt;b&gt;number of 1&lt;/b&gt; at these bit positions corresponding to &lt;b&gt;r4 is&amp;nbsp;even&lt;/b&gt;&lt;span style=&quot;font-weight: 700;&quot;&gt;, &lt;/span&gt;therefore, the value of the&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt; r4 bit is 0&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;At the &lt;b&gt;step 4&lt;/b&gt; placed the &lt;b&gt;redundant bits into the positions &lt;/b&gt;of actual data and sent to the receiver.now the the &lt;b&gt;transferred&amp;nbsp;data&lt;/b&gt; is :&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;/p&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/a/AVvXsEi-lRO4w55MGsmj_EX4a7iv2ligrZ9B-WiOXWIPR-tybIEoY9jVAtSYBjtmhsuel7vzVyZXETY-oIH2Rm3TuEjjAnXWbCND4G_vyUORnhtd_FA5X6p7oJJaouIm8QnORx3uj4P6LBtJgC1hQDili02jLk1SfOdJwXTslvrOLOq2hi8dM4F8kdB_FvAX=s351&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;67&quot; data-original-width=&quot;351&quot; height=&quot;61&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEi-lRO4w55MGsmj_EX4a7iv2ligrZ9B-WiOXWIPR-tybIEoY9jVAtSYBjtmhsuel7vzVyZXETY-oIH2Rm3TuEjjAnXWbCND4G_vyUORnhtd_FA5X6p7oJJaouIm8QnORx3uj4P6LBtJgC1hQDili02jLk1SfOdJwXTslvrOLOq2hi8dM4F8kdB_FvAX=w363-h61&quot; width=&quot;363&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;color: #333333; font-family: inter-regular, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;Suppose the &lt;b&gt;4&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;sup style=&quot;text-align: justify;&quot;&gt;th&lt;/sup&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;bit &lt;/b&gt;is changed from &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;0 to 1&lt;/span&gt;&lt;/b&gt; at the receiving end, then &lt;b&gt;parity bits&lt;/b&gt; are recalculated at the receiver site in the &lt;b&gt;step 5&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 class=&quot;h3&quot; style=&quot;line-height: 1.3em;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;R1 bit&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The bit positions of the &lt;b&gt;r1 bit&lt;/b&gt; are &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;1,3,5,7.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&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/a/AVvXsEhLenlbOt3MRjMxWabKqzB8pSKVMzIQTuzybrCOck5FlRb_7zpqEvdkaav0FoUrAovFOc2CmLvrXIb6xPNY1DCv65ybzOQeU36lBNs7wXsQJ4vQxPh9H_OwvJOvMwniPqMuCNvhN0aaj28I1scdJib9cGC7I7VvsczO3FwlYMkTUAtTAZ5ZDYfhsndL=s351&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;161&quot; data-original-width=&quot;351&quot; height=&quot;159&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhLenlbOt3MRjMxWabKqzB8pSKVMzIQTuzybrCOck5FlRb_7zpqEvdkaav0FoUrAovFOc2CmLvrXIb6xPNY1DCv65ybzOQeU36lBNs7wXsQJ4vQxPh9H_OwvJOvMwniPqMuCNvhN0aaj28I1scdJib9cGC7I7VvsczO3FwlYMkTUAtTAZ5ZDYfhsndL=w327-h159&quot; width=&quot;327&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;We observe from the above figure that the binary representation of &lt;b&gt;r1 is 1100&lt;/b&gt;. Now, we perform the &lt;b&gt;even-parity check&lt;/b&gt;, the total &lt;b&gt;number of 1&#39;s&lt;/b&gt;&amp;nbsp;appearing in the &lt;b&gt;r1 bit is an even&lt;/b&gt; number. Therefore, the value of &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;r1 is 0&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;h3 class=&quot;h3&quot; style=&quot;background-color: white; line-height: 1.3em; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;R2 bit&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The bit positions of &lt;b&gt;r2 bit&lt;/b&gt; are &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;2,3,6,7&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/p&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/a/AVvXsEgjKssK8LtGlbLTVVESTPfSK5fwnV5acWirE-kaVvL4ZMVsko0oGCTYelew0NIb48Lekn-ks1vjXQBD3YLthJSEOyj_-IGiQqJsAXQoTc8Vsllth0SjqvlFKr5mY4wl4lwpJy9dlLDiLB6VkXAPJS-_epSbtLu6N-Uwh7Pc93OscipTpeWvWOlSRu7L=s351&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;161&quot; data-original-width=&quot;351&quot; height=&quot;147&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgjKssK8LtGlbLTVVESTPfSK5fwnV5acWirE-kaVvL4ZMVsko0oGCTYelew0NIb48Lekn-ks1vjXQBD3YLthJSEOyj_-IGiQqJsAXQoTc8Vsllth0SjqvlFKr5mY4wl4lwpJy9dlLDiLB6VkXAPJS-_epSbtLu6N-Uwh7Pc93OscipTpeWvWOlSRu7L=w320-h147&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;We observe from the above figure that the binary representation of&lt;b&gt; r2 is 1001&lt;/b&gt;. Now, we perform the &lt;b&gt;even-parity check&lt;/b&gt;, the total &lt;b&gt;number of 1&#39;s&lt;/b&gt;&amp;nbsp;appearing in the &lt;b&gt;r2 bit is an even &lt;/b&gt;number. Therefore, the value of &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;r2 is 0&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;h3 class=&quot;h3&quot; style=&quot;background-color: white; line-height: 1.3em; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;R4 bit&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The bit positions of&lt;b&gt; r4 bit&lt;/b&gt; are &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;4,5,6,7&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/p&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/a/AVvXsEhGGEnYfWng63ez5UuvVIZhHKsnoTbgCQ3CBSKhtLzRo9q4fArXb-eN1jclrBt5NdAejax6xSSMrpptai_bkCJ33lClENcFDMWHtK_iy2aiTWrn-z_ecYTDAZu7UXRDSlJyzWUC0Sk0sqeoLDZJTopvf5k3ReqsLVA3mngXS1IemfDFNJgiAOeE9y3h=s351&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;161&quot; data-original-width=&quot;351&quot; height=&quot;147&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhGGEnYfWng63ez5UuvVIZhHKsnoTbgCQ3CBSKhtLzRo9q4fArXb-eN1jclrBt5NdAejax6xSSMrpptai_bkCJ33lClENcFDMWHtK_iy2aiTWrn-z_ecYTDAZu7UXRDSlJyzWUC0Sk0sqeoLDZJTopvf5k3ReqsLVA3mngXS1IemfDFNJgiAOeE9y3h=s320&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;We observe from the above figure that the binary representation of &lt;b&gt;r4 is 1011&lt;/b&gt;. Now, we perform the &lt;b&gt;even-parity check&lt;/b&gt;, the total &lt;b&gt;number of 1&#39;s&lt;/b&gt;&amp;nbsp;appearing in the &lt;b&gt;r4 bit is an odd&lt;/b&gt; number. Therefore, the value of &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;r4 is 1&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;&lt;b&gt;Note :&lt;/b&gt;&lt;/span&gt; If we get all the &lt;b&gt;parity bits are 0 &lt;/b&gt;at the receiver end then the &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;data is not corrupted&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;But here we get the &lt;b&gt;non-zero parity bits&lt;/b&gt; so here is an error or the data is said to be &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;corrupted&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;clear: both; text-align: left;&quot;&gt;&lt;em style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The binary representation of &lt;b&gt;redundant bits&lt;/b&gt;, i.e., r4 r2 r1 is &lt;b&gt;100&lt;/b&gt;, and its corresponding decimal &lt;b&gt;value is 4&lt;/b&gt;. Therefore, the error occurs in a &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;4&lt;sup&gt;th&lt;/sup&gt;&amp;nbsp;bit&lt;/span&gt;&lt;/b&gt; position. The bit value must be changed from 1 to 0 to correct the error.&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #333333; font-family: inter-regular, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;_ap_apex_ad&quot; data-ap-network=&quot;adpTags&quot; data-refresh-time=&quot;1637743809118&quot; data-render-time=&quot;1637742976508&quot; data-section-id=&quot;&quot; data-section=&quot;cea68c55-a38b-4c1d-9430-5090620c56f9&quot; data-timeout=&quot;4265&quot; data-xpath=&quot;#city &amp;gt; table:eq(0) &amp;gt; tbody:eq(0) &amp;gt; tr:eq(0) &amp;gt; td:eq(0) &amp;gt; p:eq(16)&quot; id=&quot;cea68c55-a38b-4c1d-9430-5090620c56f9&quot; style=&quot;background-color: white; clear: both; color: #333333; height: 280px; margin: 10px auto; overflow: hidden; text-align: center; width: 336px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;blockquote style=&quot;border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;pre style=&quot;margin-bottom: 5px; margin-left: 10px; margin-top: 5px; text-align: justify;&quot;&gt;&lt;div&gt;&lt;p style=&quot;background-color: white; color: #333333; font-family: inter-regular, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; text-align: left; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;pre style=&quot;margin-bottom: 5px; margin-left: 10px; margin-top: 5px; text-align: justify;&quot;&gt;&lt;div style=&quot;color: #333333; font-size: 16px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;&lt;pre style=&quot;color: #333333; font-size: 16px; margin-bottom: 5px; margin-left: 10px; margin-top: 5px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style=&quot;color: #333333; font-size: 16px; margin-bottom: 5px; margin-left: 10px; margin-top: 5px; text-align: justify;&quot;&gt;&lt;pre style=&quot;margin-bottom: 5px; margin-left: 10px; margin-top: 5px;&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;pre style=&quot;color: #333333; font-size: 16px; margin-bottom: 5px; margin-left: 10px; margin-top: 5px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style=&quot;color: #333333; font-size: 16px; margin-bottom: 5px; margin-left: 10px; margin-top: 5px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style=&quot;color: #333333; font-size: 16px; margin-bottom: 5px; margin-left: 10px; margin-top: 5px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/4686192379950038482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/11/error-correction-techniques.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/4686192379950038482'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/4686192379950038482'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/11/error-correction-techniques.html' title='Error Correction Techniques'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEhtFTL5UFr21gd0lraWZNsHGjNJJCHmpA9mAhx7lAUGGEZApKCmZ0MYWRKCE-KF9WSfBBGUdWIx_q8ucx3AI153K09avmD3WNyLV5muCkbUkPpZHKij8_NnpJRvjO7iUZCy_0kUxYCIr2h1yFS1dS0yna8a46GmOd17tohCj07j4jeM34S4GTaINC_o=s72-w333-h77-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-5458626173000917679</id><published>2021-11-23T15:15:00.002+05:30</published><updated>2021-11-24T09:59:53.944+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Computer Network Unit 2"/><title type='text'>Error Control in Data Link layer</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: large;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;Error Control&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;&lt;b&gt;Error contro&lt;/b&gt;l in &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;data link layer&lt;/span&gt; &lt;/b&gt;is the process of &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;detecting&lt;/span&gt; &lt;/b&gt;and &lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;b&gt;correcting&lt;/b&gt;&lt;/span&gt; data frames that have been corrupted or lost during transmission.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0.5em 0em 0.7em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In case of lost or corrupted frames, the receiver does not receive the correct data-frame and sender is ignorant about the loss. &lt;b&gt;Data link layer&lt;/b&gt; follows a technique to detect transit errors and take necessary actions, which is re-transmission&amp;nbsp;of frames whenever error is detected or frame is lost. The process is called &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Automatic Repeat Request&lt;/span&gt;&lt;/b&gt; (&lt;b&gt;ARQ&lt;/b&gt;).&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0.5em 0em 0.7em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;Error control&lt;/b&gt; can be done in &lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;two&lt;/b&gt;&lt;/span&gt; ways.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0.5em 0em 0.7em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;1.&lt;span style=&quot;color: #800180;&quot;&gt; Error Detection :&lt;/span&gt;&lt;/b&gt;&lt;/span&gt; &lt;b&gt;Error detection&lt;/b&gt; involves checking whether any error has occurred&amp;nbsp;or not.The number of error bits and the type of error does not matter.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0.5em 0em 0.7em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: medium; font-weight: bold;&quot;&gt;2.&lt;/span&gt;&lt;span style=&quot;color: #800180; font-size: medium; font-weight: bold;&quot;&gt; Error Correction : &lt;/span&gt;&lt;b&gt;Error correction&lt;/b&gt; involves finding or calculating the exact number of bit&#39;s that has been corrupted and the location of the corrupted bit&#39;s.&lt;span style=&quot;font-size: medium;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0.5em 0em 0.7em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;For both &lt;b&gt;Error detection&lt;/b&gt; and &lt;b&gt;Error correction&lt;/b&gt;, the sender needs to send some additional bits along with the data bits.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0.5em 0em 0.7em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The receiver performs necessary&amp;nbsp;checks based upon the additional redundant bits. If it finds that the data is free from errors, it removes the redundant bits before passing the message to the upper layer.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0.5em 0em 0.7em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;margin: 0.5em 0em 0.7em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;Error Detection Techniques&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;There are &lt;b&gt;four&lt;/b&gt;&amp;nbsp;main techniques for detecting errors in frames namely &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Parity Check&lt;/span&gt;&lt;/b&gt;, &lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;Checksum&lt;/span&gt;&lt;span&gt;,&amp;nbsp;&lt;/span&gt;&lt;span&gt;&lt;b style=&quot;color: #800180;&quot;&gt;CRC &lt;/b&gt;and &lt;b&gt;LRC&lt;/b&gt;&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;1. Parity Check&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The parity check is done by adding an &lt;b&gt;extra bit&lt;/b&gt;, called &lt;b&gt;Parity bit&lt;/b&gt; to the data to make a &lt;b&gt;number of 1&#39;s&lt;/b&gt; either &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;even&lt;/span&gt;&lt;/b&gt; in case of &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;even parity&lt;/span&gt;&lt;/b&gt; or &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;odd&lt;/span&gt;&lt;/b&gt; in case of &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;odd parity&lt;/b&gt;&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;Parity check&lt;/b&gt; also known as &quot;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Vertical Redundancy Check&lt;/span&gt;&lt;/b&gt;&quot;(&lt;b&gt;VRC&lt;/b&gt;). In this method, a redundant bit also called &lt;b&gt;parity bit&lt;/b&gt; is added to each data unit.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;This method include &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;even parity&lt;/span&gt;&lt;/b&gt; and &lt;b&gt;odd parity&lt;/b&gt;.&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Even parity&lt;/span&gt;&lt;/b&gt; means the total &lt;b&gt;number of 1&#39;s&lt;/b&gt; in data is to be &lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;even&lt;/b&gt;&lt;/span&gt; and &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;odd parity&lt;/span&gt;&lt;/b&gt; means the total&amp;nbsp; &lt;b&gt;number of 1&#39;s &lt;/b&gt;in data is to be &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;odd&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0.5em 0em 0.7em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;While creating a frame, the sender counts the &lt;b&gt;number of 1&#39;s&lt;/b&gt;&amp;nbsp;in it and adds the parity bit in the following way&lt;/span&gt;&lt;/p&gt;&lt;ul class=&quot;list&quot; style=&quot;margin-bottom: 0rem; margin-top: 0px; text-align: left;&quot;&gt;&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-image: url(&amp;quot;/images/icon-bullet.png&amp;quot;); background-origin: initial; background-position: 0px 3px; background-repeat: no-repeat; background-size: initial; line-height: 24px; list-style: none; margin-bottom: 5px; padding: 0px 0px 0px 19px;&quot;&gt;&lt;p style=&quot;margin: 0.5em 0em 0.7em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;In case of even parity&lt;/span&gt;&lt;/b&gt;: If a &lt;b&gt;number of 1&#39;s&lt;/b&gt;&amp;nbsp;is &lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;even&lt;/b&gt;&lt;/span&gt; then parity bit value is&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt; 0&lt;/span&gt;&lt;/b&gt;. If the &lt;b&gt;number of 1&#39;s&lt;/b&gt; is &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;odd&lt;/b&gt;&lt;/span&gt; then parity bit value is&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt; 1&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-image: url(&amp;quot;/images/icon-bullet.png&amp;quot;); background-origin: initial; background-position: 0px 3px; background-repeat: no-repeat; background-size: initial; line-height: 24px; list-style: none; margin-bottom: 5px; padding: 0px 0px 0px 19px;&quot;&gt;&lt;p style=&quot;margin: 0.5em 0em 0.7em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;In case of odd parity&lt;/span&gt;&lt;/b&gt;: If a &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;number of 1&#39;s&amp;nbsp;is odd&lt;/span&gt;&lt;/b&gt; then parity bit &lt;span style=&quot;color: #38761d;&quot;&gt;&lt;b&gt;value is 0&lt;/b&gt;&lt;/span&gt;. If a &lt;b&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;number of 1&#39;s is even&lt;/span&gt;&lt;/b&gt; then parity bit &lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;b&gt;value is 1&lt;/b&gt;&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;margin: 0.5em 0em 0.7em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;On receiving a frame, the receiver counts the &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;number of 1&#39;s&lt;/span&gt;&lt;/b&gt;&amp;nbsp;in it. In case of &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;even parity check&lt;/span&gt;&lt;/b&gt;, if the &lt;b&gt;count of 1&#39;s is even&lt;/b&gt;, the frame is &lt;span style=&quot;color: #2b00fe;&quot;&gt;accepted&lt;/span&gt;, otherwise, it is rejected. A similar rule is adopted for&lt;b&gt; odd parity check&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0.5em 0em 0.7em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The &lt;b&gt;parity check&lt;/b&gt; is suitable for &lt;b&gt;&lt;span style=&quot;color: #800180;&quot;&gt;single bit error&lt;/span&gt;&lt;/b&gt; detection only.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0.5em 0em 0.7em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: red; font-size: medium;&quot;&gt;&lt;b&gt;Example:&lt;/b&gt;&lt;/span&gt; If the source wants to transmit data unit &lt;b&gt;1100111&lt;/b&gt; using &lt;b&gt;even parity&lt;/b&gt; to the destination. the source will have to pass through&amp;nbsp;&lt;b&gt;even parity generator&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0.5em 0em 0.7em; padding: 0px; text-align: justify;&quot;&gt;&lt;/p&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/a/AVvXsEiwcO9q_uVcb2IUWXOUyGq7REoj6Y8lsxC__01jLm5OY9cHwSOfBPtwdKe0G3FBIi9XTL-gZrsdvHLAD9gi8M87hXkl2C1XGjR8PgZAUp2SkGdFY8FzDavRsZqqSBYzQJPABGtQDtz-nFqe3V2aXCMq0jqY_9hMLjCzZb2D7a8nJH5h9Ji9H4ZOH_tp=s2472&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;980&quot; data-original-width=&quot;2472&quot; height=&quot;314&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiwcO9q_uVcb2IUWXOUyGq7REoj6Y8lsxC__01jLm5OY9cHwSOfBPtwdKe0G3FBIi9XTL-gZrsdvHLAD9gi8M87hXkl2C1XGjR8PgZAUp2SkGdFY8FzDavRsZqqSBYzQJPABGtQDtz-nFqe3V2aXCMq0jqY_9hMLjCzZb2D7a8nJH5h9Ji9H4ZOH_tp=w500-h314&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;The scheme makes the total&lt;span style=&quot;color: #2b00fe;&quot;&gt; number of 1&#39;s even &lt;/span&gt;that&#39;s why it&#39;s called &lt;span style=&quot;color: #38761d;&quot;&gt;even parity checking&lt;/span&gt;.&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;2. Checksum&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In&lt;b&gt; Checksum Error Detection&lt;/b&gt; scheme, the data is divided into &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;k segments&lt;/span&gt;&lt;/b&gt; each of &lt;b&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;m bits&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;At the &lt;b&gt;sender&#39;s end&lt;/b&gt; the segments are &lt;b&gt;added using 1&#39;s compliment &lt;/b&gt;arithmetic to get the &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;sum&lt;/span&gt;&lt;/b&gt;. The &lt;b&gt;sum is complemented&lt;/b&gt; to get the &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;checksum&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The&lt;b&gt; checksum segment &lt;/b&gt;is sent along with the &lt;b&gt;data segments to the receiver.&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;At the &lt;b&gt;receiver&#39;s end&amp;nbsp;&lt;/b&gt;all received segments (&lt;b&gt;included checksum&lt;/b&gt;) are &lt;b&gt;added using 1&#39;s complement&lt;/b&gt;&amp;nbsp;arithmetic&amp;nbsp;to get the &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;sum&lt;/span&gt;&lt;/b&gt;. The sum is complemented again.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;If the&lt;b&gt; result is 0&lt;/b&gt;, the received data is &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;accepted&lt;/span&gt;&lt;/b&gt; otherwise &lt;b&gt;discarded&lt;/b&gt;( &lt;span style=&quot;color: #2b00fe;&quot;&gt;rejected&lt;/span&gt;).&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhaBJOmtTX-Xte4Tik40KhPzOENaQewHhvBphG29uJ4LAczxgk7wNmas7qTYqTC6T4vr0LhFN-Qu4GZFnRDdgGcLXFa7jRKrHdoyJNi4jRx5tsBXi9cviVehoqROnZKPI0VjqI1znBnk_jsE-oyXzaQHjaMK6FNlTDBoxZ8lTCxH3V9Th5eZ9CooEfU=s1836&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1668&quot; data-original-width=&quot;1836&quot; height=&quot;479&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhaBJOmtTX-Xte4Tik40KhPzOENaQewHhvBphG29uJ4LAczxgk7wNmas7qTYqTC6T4vr0LhFN-Qu4GZFnRDdgGcLXFa7jRKrHdoyJNi4jRx5tsBXi9cviVehoqROnZKPI0VjqI1znBnk_jsE-oyXzaQHjaMK6FNlTDBoxZ8lTCxH3V9Th5eZ9CooEfU=w573-h479&quot; width=&quot;573&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;3. CRC&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;CRC&lt;/b&gt; stands for &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Cyclic redundancy Check&lt;/span&gt;&lt;/b&gt;. Unlike &lt;b&gt;checksum scheme&lt;/b&gt;, which is based on &lt;b&gt;addition&lt;/b&gt;, &lt;b&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;CRC is based on binary division&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In &lt;b&gt;CRC&lt;/b&gt;, a sequence of redundant bits, are appended to the end of the data unit so that the resulting data unit becomes exactly divisible by a second, &lt;b&gt;predetermined binary number&lt;/b&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;At the destination, the incoming data unit is divided by then same number. If at this step there is &lt;b&gt;no reminder&lt;/b&gt;, the data unit is assumed to be &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;correct&lt;/span&gt;&lt;/b&gt; and is therefore &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;accepted&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;A &lt;b&gt;reminder indicates&lt;/b&gt; that the data unit has been changed in transit and therefore must be &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;rejected&lt;/span&gt;.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: medium;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;Example : &lt;/span&gt;&lt;b&gt;O&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;riginal Message - 1010000 &lt;/b&gt;and&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; G&lt;/span&gt;enerator polynomial -&lt;/b&gt;x^3 +1 &lt;b&gt;(&lt;span style=&quot;color: red;&quot;&gt;1&lt;/span&gt;.x^3+ &lt;span style=&quot;color: red;&quot;&gt;0&lt;/span&gt;.x^2+&lt;span style=&quot;color: red;&quot;&gt;0&lt;/span&gt;.X^1+&lt;span style=&quot;color: red;&quot;&gt;1&lt;/span&gt;.x^0)&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; A&lt;/span&gt;ccording to polynomial the &lt;b&gt;CRC Generator&lt;/b&gt;&amp;nbsp;will be &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;1001&lt;/span&gt;.&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;If &lt;/span&gt;&lt;b&gt;CRC generator&lt;/b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt; is of &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;n bits&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt; then append &lt;/span&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;(n-1) zeros&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt; in the end of original message.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjGVYYJAtgc4p0gQ_AoRU20QRPd64wLxhuOeYPDGNnsrtfXYsR2irc11nucGBR3iv658W4yD66NVwOE9NKOkt2BpvyPCUdcpcszabxD5UrGbfL3Sh4kNQObFK_nBrkd7zpxVyIWiy6JjCIoH14vrNQsvkbe0R3kfAyg7VifFATH5dEb4a9Q30eL76da=s1956&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1676&quot; data-original-width=&quot;1956&quot; height=&quot;379&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjGVYYJAtgc4p0gQ_AoRU20QRPd64wLxhuOeYPDGNnsrtfXYsR2irc11nucGBR3iv658W4yD66NVwOE9NKOkt2BpvyPCUdcpcszabxD5UrGbfL3Sh4kNQObFK_nBrkd7zpxVyIWiy6JjCIoH14vrNQsvkbe0R3kfAyg7VifFATH5dEb4a9Q30eL76da=w580-h379&quot; width=&quot;580&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;4. LRC&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;LRC&lt;/b&gt; stands for &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Longitudinal Redundancy Check&lt;/span&gt;&lt;/b&gt;. It is also called &lt;b&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;two dimensional parity check&lt;/span&gt;&lt;/b&gt;.In this method , data which the user wants to send is organized in the form of &lt;b&gt;rows and columns&lt;/b&gt;.In order to detect an error, a &lt;b&gt;redundant bit&lt;/b&gt; is added to the whole block and this block is sent to the receiver along with the data.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;At the receiver&#39;s end these are compared with the parity bits calculated on the received data.After checking data for errors, receiver accepts the data and discards the redundant row of bits.&lt;/span&gt;&lt;/div&gt;&lt;span&gt;&lt;div style=&quot;font-family: verdana; font-weight: 700; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;font-family: verdana; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;&lt;b&gt;Example :&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;font-size: small; font-weight: normal;&quot;&gt;If a block of 32 bits is to be transmitted, it is divided into matrix of &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;four rows&lt;/span&gt;&lt;span style=&quot;font-size: small; font-weight: normal;&quot;&gt; and &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;eight columns&lt;/span&gt;&lt;span style=&quot;font-size: small; font-weight: normal;&quot;&gt;.&lt;/span&gt;&lt;/h3&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/a/AVvXsEjurw-ubBKSexZCzMyprrK9s36jT1covThT2xoEUH4Z38fhIIpDbFsOB_ktCFIhN4afZvmVd9h1PWLeHMH9UDm3TImedLKBqLpBxTObH1Znx6wTn7UnobjrkSIacWY5F_XcdrP3fdtv98LXkzp5oJ6tgBBwA6s8mwmtkf0sAYn5QDe5YKuAluJC1-_j=s322&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;157&quot; data-original-width=&quot;322&quot; height=&quot;296&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjurw-ubBKSexZCzMyprrK9s36jT1covThT2xoEUH4Z38fhIIpDbFsOB_ktCFIhN4afZvmVd9h1PWLeHMH9UDm3TImedLKBqLpBxTObH1Znx6wTn7UnobjrkSIacWY5F_XcdrP3fdtv98LXkzp5oJ6tgBBwA6s8mwmtkf0sAYn5QDe5YKuAluJC1-_j=w493-h296&quot; width=&quot;493&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In this matrix of bits, a &lt;b&gt;parity bit&lt;/b&gt; (&lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;odd&lt;/span&gt; or &lt;span style=&quot;color: #0b5394;&quot;&gt;even&lt;/span&gt;&lt;/b&gt;) is calculated for each column. It means 32 bits data plus 8 redundant bits are transmitted to the receiver. Whenever data reaches at the destination, receiver uses &lt;b&gt;LRC&lt;/b&gt; to detect an error in data.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;&lt;b&gt;Advantage :&lt;/b&gt;&lt;/span&gt; &lt;b&gt;LRC&lt;/b&gt; is used to detect&lt;b&gt; burst errors&lt;/b&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;&lt;b&gt;Example : &lt;/b&gt;&lt;/span&gt;Suppose 32 bit data plus &lt;b&gt;LRC&lt;/b&gt; that was being transmitted is hit by &lt;b&gt;burst error&lt;/b&gt; of length 5 and some bits are corrupted.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhqtlxC7zdoyh8ov3dFi8s--RB4CU0u6iqGnNzJPKcOiZRVp-BISRDizx6n_ztVIJSb4hH_6xnZ9t55mwZyWreZPbahumugFUJ_QoTUVDhJV99x--8-_707s4xDjLXGs3l_HX96t1hVAhLACfKrJ61QfNrzjxVu41WyMrqyhkr9fy_Nwqq6jbohTWE1=s362&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;139&quot; data-original-width=&quot;362&quot; height=&quot;322&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhqtlxC7zdoyh8ov3dFi8s--RB4CU0u6iqGnNzJPKcOiZRVp-BISRDizx6n_ztVIJSb4hH_6xnZ9t55mwZyWreZPbahumugFUJ_QoTUVDhJV99x--8-_707s4xDjLXGs3l_HX96t1hVAhLACfKrJ61QfNrzjxVu41WyMrqyhkr9fy_Nwqq6jbohTWE1=w467-h322&quot; width=&quot;467&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The &lt;b&gt;LRC&lt;/b&gt; received by the destination does not match with newly corrupted &lt;b&gt;LRC&lt;/b&gt;. The destination comes to know that the data is erroneous,so it discards the data.&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;&lt;b&gt;Note :&lt;/b&gt;&lt;/span&gt; The main problem with &lt;b&gt;LRC&lt;/b&gt; is that,if two bits in one data units are damaged&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;and two bits in &lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;exactly&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;the same position in another data unit are also damaged, then the &lt;b&gt;LRC &lt;/b&gt;will not able to detect the error.&lt;/span&gt;&lt;/p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0.5em 0em 0.7em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0.5em 0em 0.7em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0.5em 0em 0.7em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/5458626173000917679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/11/error-control-in-data-link-layer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/5458626173000917679'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/5458626173000917679'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/11/error-control-in-data-link-layer.html' title='Error Control in Data Link layer'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEiwcO9q_uVcb2IUWXOUyGq7REoj6Y8lsxC__01jLm5OY9cHwSOfBPtwdKe0G3FBIi9XTL-gZrsdvHLAD9gi8M87hXkl2C1XGjR8PgZAUp2SkGdFY8FzDavRsZqqSBYzQJPABGtQDtz-nFqe3V2aXCMq0jqY_9hMLjCzZb2D7a8nJH5h9Ji9H4ZOH_tp=s72-w500-h314-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-753222035866936581</id><published>2021-11-22T15:36:00.003+05:30</published><updated>2023-07-24T14:04:22.084+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Computer Network Unit 2"/><title type='text'>Error&#39;s and type of Error&#39;s At Data Link Layer</title><content type='html'>&lt;p&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;When data is transmitted from one device to another device, the system does not guarantee whether the data received by the device is identical to the data transmitted by another device. &lt;b&gt;Data Link layer &lt;/b&gt;uses &lt;b&gt;Error control techniques&lt;/b&gt; to ensure that frames i.e, bit streams of data, are transmitted from the source to destination with a certain extent of accuracy.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;Error&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;When bits are transmitted over the computer network, they are subject to get corrupted due to interference&amp;nbsp;and network problems. The corrupted&amp;nbsp;bits leads spurious data being received by the destination are called &quot;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Errors&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&quot;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b style=&quot;color: #333333;&quot;&gt;Errors&lt;/b&gt;&lt;span style=&quot;color: #333333;&quot;&gt; are the condition when the &lt;/span&gt;&lt;b style=&quot;color: #333333;&quot;&gt;receiver&#39;s information &lt;/b&gt;&lt;span style=&quot;color: #333333;&quot;&gt;does not match with the &lt;/span&gt;&lt;b style=&quot;color: #333333;&quot;&gt;sender&#39;s information&lt;/b&gt;&lt;span style=&quot;color: #333333;&quot;&gt;. During transmission, digital signals suffer from noise that can introduce errors in the binary bits travelling from sender to receiver. That means a &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;0 bit change to 1&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #333333;&quot;&gt; or &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;1 bit may be change to 0&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #333333;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: large;&quot;&gt;Types of Errors&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;Errors&lt;/b&gt; can be of 3 types namely &lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Single Bit Error&lt;/span&gt;,&lt;/b&gt; &lt;b&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;Multiple Bit Error&lt;/span&gt;&lt;/b&gt; and &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Burst Error&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;&lt;b&gt;1. Single Bit Error:&lt;/b&gt; &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;If i&lt;span style=&quot;font-weight: normal;&quot;&gt;n the received frame, &lt;/span&gt;&lt;b&gt;only one bit &lt;/b&gt;has been corrupted, means either changed from &lt;span style=&quot;color: #38761d;&quot;&gt;&lt;b&gt;0 to 1&lt;/b&gt;&lt;/span&gt; or from &lt;b&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;1 to 0&lt;/span&gt;&lt;/b&gt; then this type of error is called &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Single Bit Error&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgf6cBGwE8EJ6-q48MGDAq7kuSlaHjd-_GjyLNOvpXdPAH-sI2PcmiPLI-UzwdzZ94y-KtcCnSRJhW2voptpcqdWj3KODLSXt6XaR7tL7Dt78EiCumh7eYUoPrPz3Pi3_x63dEzZlH1egxr9eo9LpdoeCuyuA7AW4YfJneqC8krx8PclqMjYLxP6i1p=s616&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;141&quot; data-original-width=&quot;616&quot; height=&quot;117&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgf6cBGwE8EJ6-q48MGDAq7kuSlaHjd-_GjyLNOvpXdPAH-sI2PcmiPLI-UzwdzZ94y-KtcCnSRJhW2voptpcqdWj3KODLSXt6XaR7tL7Dt78EiCumh7eYUoPrPz3Pi3_x63dEzZlH1egxr9eo9LpdoeCuyuA7AW4YfJneqC8krx8PclqMjYLxP6i1p=w570-h117&quot; width=&quot;570&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt;&lt;b&gt;2. Multiple Bit Error:&lt;/b&gt; &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;If in the received frame , &lt;b&gt;more than one&amp;nbsp;bits&lt;/b&gt;&amp;nbsp;are corrupted then this type of error is called &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Multiple Bit Error&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh6Uxa35ICt4P14sjoQAjvoDCitLopJIDPKZ65nMvZU5kPqs5yfDNSQUno_nemPP-_e31kIeYGu0j_e1cFJnzU6JuBCpzsrDLP02WPDYAQd38NqHXVQx7Yw6BZFCY3exL07IgSYjsTKCjN8XuH_EQ2kv0K9HQnrW-cRCsyKGaSo3_VacJM0cm4uVAHB=s457&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;64&quot; data-original-width=&quot;457&quot; height=&quot;80&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh6Uxa35ICt4P14sjoQAjvoDCitLopJIDPKZ65nMvZU5kPqs5yfDNSQUno_nemPP-_e31kIeYGu0j_e1cFJnzU6JuBCpzsrDLP02WPDYAQd38NqHXVQx7Yw6BZFCY3exL07IgSYjsTKCjN8XuH_EQ2kv0K9HQnrW-cRCsyKGaSo3_VacJM0cm4uVAHB=w571-h80&quot; width=&quot;571&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: small;&quot;&gt;3. Burst Error:&lt;/span&gt;&lt;span style=&quot;color: #800180; font-size: medium;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-size: small; font-weight: normal;&quot;&gt;If in the received frame, &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;more than one consecutive bits&lt;/span&gt;&lt;span style=&quot;font-size: small; font-weight: normal;&quot;&gt; are corrupted then this type of error is called &lt;/span&gt;&lt;span style=&quot;color: #2b00fe; font-size: small;&quot;&gt;Burst Error&lt;/span&gt;&lt;span style=&quot;font-size: small; font-weight: normal;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEia5lBIz_WiTJwx0D0dqt3OQR2JHZP5M_hjScVxrd6RskuL8buFLRHeSmU1wf6sjNbxsatn_Qul_7CMcEWKyGUnTNe8-36zX6xt_zpJYwyAT9p_KN3vT6wOhqH3V9-ooj10JO6TDbJt5bPuorBt5HsJxBSODSwBjua_NaQtCpj3wcUa-YinEzNKBPAj=s457&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;64&quot; data-original-width=&quot;457&quot; height=&quot;70&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEia5lBIz_WiTJwx0D0dqt3OQR2JHZP5M_hjScVxrd6RskuL8buFLRHeSmU1wf6sjNbxsatn_Qul_7CMcEWKyGUnTNe8-36zX6xt_zpJYwyAT9p_KN3vT6wOhqH3V9-ooj10JO6TDbJt5bPuorBt5HsJxBSODSwBjua_NaQtCpj3wcUa-YinEzNKBPAj=w547-h70&quot; width=&quot;547&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;The duration of noise in &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;Burst Error &lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;is more than the duration of noise in &lt;/span&gt;&lt;span style=&quot;color: #073763;&quot;&gt;Single-Bit Error.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/753222035866936581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/11/error-detection-at-data-link-layer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/753222035866936581'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/753222035866936581'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/11/error-detection-at-data-link-layer.html' title='Error&#39;s and type of Error&#39;s At Data Link Layer'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEgf6cBGwE8EJ6-q48MGDAq7kuSlaHjd-_GjyLNOvpXdPAH-sI2PcmiPLI-UzwdzZ94y-KtcCnSRJhW2voptpcqdWj3KODLSXt6XaR7tL7Dt78EiCumh7eYUoPrPz3Pi3_x63dEzZlH1egxr9eo9LpdoeCuyuA7AW4YfJneqC8krx8PclqMjYLxP6i1p=s72-w570-h117-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-9209964076936393957</id><published>2021-11-22T12:22:00.008+05:30</published><updated>2021-11-22T12:24:01.100+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Computer Network Unit 1"/><title type='text'>LAN VS WLAN</title><content type='html'>&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;A network consist of two or more computers that are linked in order to share all form of resources including communication.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Both &lt;b&gt;LAN&lt;/b&gt; and &lt;b&gt;WLAN &lt;/b&gt;networks are interrelated and share moreover conman characteristics.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;LAN&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;LAN &lt;/b&gt;stands for &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Local Area Network&lt;/span&gt;&lt;/b&gt;.&lt;b&gt;LAN&lt;/b&gt; connections include both &lt;span style=&quot;color: red;&quot;&gt;wired&lt;/span&gt; and &lt;span style=&quot;color: red;&quot;&gt;wireless&lt;/span&gt; communication.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;LAN&lt;/b&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; network is a collection of computers or other such devices in a particular&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;location that are connected together by &lt;/span&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;communication elements&lt;/b&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; or &lt;/span&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;network elements&lt;/b&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;LAN&lt;/b&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; is free from external attacks like interruption&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;of signals, cyber criminals attacks etc.So it is more secure.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;LAN&lt;/b&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; is not so much popular but less expensive.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Wired &lt;/span&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;LAN&lt;/b&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; needs physical access like connecting the wires to the &lt;/span&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;switches&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; or &lt;/span&gt;&lt;span style=&quot;color: #2b00fe; font-family: verdana;&quot;&gt;&lt;b&gt;routers.&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In &lt;/span&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;LAN&lt;/b&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; devices are connected locally with&lt;/span&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt; Ethernet cable.&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It may or may not vary with external factors like environment and quality of cables.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #800180;&quot;&gt;Example :&lt;/span&gt;&lt;/b&gt; &lt;b&gt;Computers connected in a college or any organization.&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana; font-size: large;&quot;&gt;WLAN&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;WLAN&lt;/b&gt; stands for &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Wireless Local Area Network&lt;/span&gt;&lt;/b&gt;.&amp;nbsp;&lt;b&gt;WLAN&lt;/b&gt; connections are completely &lt;b&gt;wireless&lt;/b&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;WLAN&lt;/b&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;network is a collection of computers or other such devices in a particular&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;location that are connected together &lt;b&gt;wirelessly&lt;/b&gt; by&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;communication elements&lt;/b&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;network elements&lt;/b&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;WLAN&lt;/b&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; is vulnerable to external attack.So it is &lt;/span&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;less secure.&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;WLAN&lt;/b&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; is &lt;/span&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;popular&lt;/b&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; but &lt;/span&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;more expensive&lt;/b&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;WLAN&lt;/b&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; works on connecting wires to the switches and routers are neglected.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Ethernet cable &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;is not &lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;necessary&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;in &lt;/span&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;WLAN&lt;/b&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It varies due to external factors. Most of the external factors effect the signal transmission.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;Example :&lt;/span&gt; Laptops, Phones, Tablets are connected to a wireless router or hotspot.&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span style=&quot;color: #800180;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/9209964076936393957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/11/lan-vs-wlan.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/9209964076936393957'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/9209964076936393957'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/11/lan-vs-wlan.html' title='LAN VS WLAN'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-1314867447668093771</id><published>2021-11-20T12:06:00.004+05:30</published><updated>2021-11-20T12:31:29.741+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Computer Network Unit 1"/><title type='text'>TCP/IP Model in Computer Network</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: large;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: verdana;&quot;&gt;TCP/IP Model&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;The TCP/IP model was developed prior to the &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;OSI&lt;/span&gt;&lt;/b&gt; model.&lt;/span&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;The &lt;b&gt;TCP/IP&lt;/b&gt; model is not exactly similar to the OSI model.It was designed and developed by &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Department of Defense&lt;/span&gt;&lt;/b&gt;&amp;nbsp;in &lt;b&gt;1960&lt;/b&gt;. and is based on the standard&amp;nbsp;protocols.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;It stands for &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Transmission Control Protocol/Internet Protocol&lt;/span&gt;&lt;/b&gt;. &lt;span style=&quot;color: #222222;&quot;&gt;TCP/IP model helps you to determine how a specific computer should be connected to the internet and how data should be transmitted between them.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;The functionality of the &lt;b&gt;TCP/IP&lt;/b&gt; model is divided into &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;four&lt;/span&gt;&lt;/b&gt; layers, and each includes specific protocols.&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;All these four &lt;b&gt;TCP/IP&lt;/b&gt; layers work collaboratively to transmit the data from one layer to another.The layers are :-&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;1. Process/ Application layer&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;2. Host to Host/ Transport layer&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;3. Internet layer&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;4. Network Access/Link layer&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj_-FHLin_XTcKGMoIX0ZSZj6o75hlsqP8UGxZAqu1WZnonMRFa3351NoI-xna1tYd3Lc4ks9Bnl7nWVU_XSNpUTA0k6nQd8q76dNirk9wtDSit1mVA3naj8AJOceePZ1isAHx59IwL3pok0dd5rnEWReo2Bs_xtOxG89KRCFpsfuy746NvEjAw4NE2=s648&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;402&quot; data-original-width=&quot;648&quot; height=&quot;391&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj_-FHLin_XTcKGMoIX0ZSZj6o75hlsqP8UGxZAqu1WZnonMRFa3351NoI-xna1tYd3Lc4ks9Bnl7nWVU_XSNpUTA0k6nQd8q76dNirk9wtDSit1mVA3naj8AJOceePZ1isAHx59IwL3pok0dd5rnEWReo2Bs_xtOxG89KRCFpsfuy746NvEjAw4NE2=w518-h391&quot; width=&quot;518&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: large;&quot;&gt;Network Access Layer&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;A &lt;b&gt;network Access layer&lt;/b&gt; is the lowest layer of the &lt;b&gt;TCP/IP&lt;/b&gt; model. This layer corresponds to the combination of &lt;b&gt;Data Link layer&lt;/b&gt; and &lt;b&gt;Physical layer&lt;/b&gt; of the &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;OSI &lt;/span&gt;&lt;/b&gt;model.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;It defines how the data should be sent physically through the network.The functions carried out by this layer are encapsulating the &lt;b&gt;IP datagram&lt;/b&gt; into &lt;span style=&quot;color: #2b00fe;&quot;&gt;frames&lt;/span&gt; transmitted by the network and mapping of IP addresses into physical addresses.&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: large;&quot;&gt;Internet Layer&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;An &lt;b&gt;internet layer &lt;/b&gt;is the second layer of the &lt;b&gt;TCP/IP&lt;/b&gt; model.An internet layer is also known as the &lt;b&gt;network layer&lt;/b&gt;. This layers parallels the functions of &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;OSI&lt;/span&gt; network layer.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;The main responsibility of the internet layer is to send the packets from any network, and they arrive at the destination irrespective of the route they take.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;It defines the protocols which are responsible for logical transmission of data over the entire network.The main protocols at this layer are-&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;IP :&lt;/span&gt;&lt;/b&gt;&amp;nbsp;It stands for&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt; Internet Protocol&lt;/span&gt;&lt;/b&gt;. It is responsible for delivering packets from &lt;b&gt;source Host&lt;/b&gt; to &lt;b&gt;destination Host&lt;/b&gt; by looking at the &lt;span style=&quot;color: #ff00fe;&quot;&gt;&lt;b&gt;IP addresses&lt;/b&gt;&lt;/span&gt; in the &lt;b&gt;packet headers&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;IP has two versions &lt;b&gt;IPV4&lt;/b&gt; and &lt;b&gt;IPV6&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;ARP :&lt;/span&gt;&lt;/b&gt;&amp;nbsp;It stands for &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Address Resolution Protocol&lt;/span&gt;&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;b&gt;ARP&lt;/b&gt; is a network layer protocol which is used to find the physical address from the IP address. ARP has several types like &lt;b&gt;Reverse ARP&lt;/b&gt;, &lt;b&gt;Proxy ARP&lt;/b&gt;, &lt;b&gt;Inverse ARP&lt;/b&gt; etc.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;b style=&quot;font-family: inter-regular, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;ICMP :&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;It&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; font-weight: 700;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;stands for&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt; Internet Control Message Protocol&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;It is a mechanism used by the hosts or routers to send notifications regarding datagram problems back to the sender.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;A datagram travels from router-to-router until it reaches its destination. If a router is unable to route the data because of some unusual conditions such as disabled links, a device is on fire or network congestion, then the &lt;b&gt;ICMP protocol&lt;/b&gt; is used to inform the sender that the datagram is undeliverable.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;The core responsibility of the &lt;b&gt;ICMP protocol&lt;/b&gt; is to report the problems, not correct them.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;b&gt;ICMP&lt;/b&gt; can send the messages only to the source, but not to the intermediate routers because the &lt;b&gt;IP datagram&lt;/b&gt; carries the addresses of the source and destination but not of the router that it is passed to.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;clear: both;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: large;&quot;&gt;Transport Layer&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;This layer is analogous to the &lt;b&gt;Transport layer&lt;/b&gt; of the &lt;b&gt;OSI layer&lt;/b&gt;. It is also called The &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Host to Host Layer&lt;/span&gt;&lt;/b&gt;. IT is responsible for end to end communication and error free delivery of data.&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;The transport layer is responsible for the &lt;b&gt;reliability&lt;/b&gt;, &lt;b&gt;flow control&lt;/b&gt;, and &lt;b&gt;correction of data&lt;/b&gt; which is being sent over the network.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;The two main protocols are presenting in this layer are :-&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; color: red; font-size: medium;&quot;&gt;Transmission Control Protocol&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;&lt;b&gt;TCP&lt;/b&gt; is a reliable protocol as it detects the &lt;b&gt;error &lt;/b&gt;and &lt;b&gt;retransmits&lt;/b&gt; the damaged frames.Therefore, it ensures all the segments must be received and acknowledged before the transmission is considered to be completed.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;At the sending end, &lt;b&gt;TCP&lt;/b&gt; divides the whole message into smaller units known as &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;segment&lt;/span&gt;&lt;/b&gt;, and each segment contains a sequence number which is required for reordering the frames to form an original message.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;At the receiving end, &lt;b&gt;TCP&lt;/b&gt; collects all the &lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;segments&lt;/b&gt;&lt;/span&gt; and reorders them based on sequence numbers.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red; font-family: verdana; font-size: medium;&quot;&gt;User Datagram Protocol&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;It provides &lt;b&gt;connectionless &lt;/b&gt;service and end-to-end delivery of transmission.It is an unreliable protocol as it discovers the errors but not specify the error.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;&lt;b&gt;User Datagram Protocol&lt;/b&gt; discovers the error, and &lt;b&gt;ICMP&lt;/b&gt; protocol reports the error to the sender that user datagram has been damaged.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180; font-size: large;&quot;&gt;Application Layer&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;An Application layer is the topmost layer in the &lt;b&gt;TCP/IP&lt;/b&gt; model. This layer performs the functions of top three layers of the &lt;b&gt;OSI&lt;/b&gt; model (&lt;b&gt;Application&lt;/b&gt;, &lt;b&gt;Presentation&lt;/b&gt; and &lt;b&gt;Session&lt;/b&gt; layer) .&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;This layer allows the user to interact with the application.When one application layer protocol wants to communicate with another application layer, it forwards its data to the transport layer.&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;There is an ambiguity occurs in the application layer. Every application cannot be placed inside the application layer except those who interact with the communication system.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;For example: &lt;span style=&quot;color: #2b00fe;&quot;&gt;Text editor&lt;/span&gt; cannot be considered in application layer while web &lt;span style=&quot;color: #2b00fe;&quot;&gt;browser&lt;/span&gt; using&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;background-color: white; font-family: verdana;&quot;&gt;HTTP&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;background-color: white; font-family: verdana;&quot;&gt;protocol to interact with the network where&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana;&quot;&gt;&lt;b&gt;HTTP&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana;&quot;&gt;protocol is an &lt;b&gt;application layer protocol&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Some of the protocols used in this layer are :-&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px; font-weight: 700; text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;HTTP:&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;HTTP stands for &lt;b&gt;Hypertext Transfer Protocol&lt;/b&gt;. This protocol allows us to access the data over the &lt;b&gt;world wide web&lt;/b&gt;. It transfers the data in the form of &lt;span style=&quot;color: #2b00fe;&quot;&gt;plain text&lt;/span&gt;, &lt;span style=&quot;color: #2b00fe;&quot;&gt;audio&lt;/span&gt;, &lt;span style=&quot;color: #2b00fe;&quot;&gt;video&lt;/span&gt;. It is known as a &lt;b&gt;Hypertext Transfer Protocol &lt;/b&gt;as it has the efficiency to use in a hypertext environment where there are rapid jumps from one document to another.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px; font-weight: 700; text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;SMTP:&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;SMTP stands for &lt;b&gt;Simple Mail Transfer Protocol&lt;/b&gt;. The &lt;b&gt;TCP/IP &lt;/b&gt;protocol that supports the e-mail is known as a Simple mail transfer protocol. This protocol is used to send the data to another e-mail address. It is a combination of &lt;b&gt;HTTP&lt;/b&gt; with &lt;b&gt;SSL&lt;/b&gt;(&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;S&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;ecure Socket layer&lt;/span&gt;&lt;/b&gt;).&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;DNS:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;DNS stands for &lt;b&gt;Domain Name System&lt;/b&gt;. An &lt;b&gt;IP address&lt;/b&gt; is used to identify the connection of a host to the internet uniquely. But, people prefer to use the names instead of addresses. Therefore, the system that maps the name to the address is known as &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Domain Name System&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; color: red; font-weight: 700; text-align: justify;&quot;&gt;TELNET:&lt;/span&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&lt;/span&gt;Telnet stands for &lt;b&gt;Teletype Network&lt;/b&gt;.&lt;/span&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;It establishes the connection between the &lt;b&gt;local computer&lt;/b&gt; and &lt;b&gt;remote computer &lt;/b&gt;in such a way that the local terminal appears to be a terminal at the remote system.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; font-weight: 700; text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;FTP:&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;FTP stands for &lt;b&gt;File Transfer Protocol&lt;/b&gt;. FTP is a standard internet protocol used for transmitting the files from one computer to another computer.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/1314867447668093771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/11/tcpip-model-in-computer-network.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/1314867447668093771'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/1314867447668093771'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/11/tcpip-model-in-computer-network.html' title='TCP/IP Model in Computer Network'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEj_-FHLin_XTcKGMoIX0ZSZj6o75hlsqP8UGxZAqu1WZnonMRFa3351NoI-xna1tYd3Lc4ks9Bnl7nWVU_XSNpUTA0k6nQd8q76dNirk9wtDSit1mVA3naj8AJOceePZ1isAHx59IwL3pok0dd5rnEWReo2Bs_xtOxG89KRCFpsfuy746NvEjAw4NE2=s72-w518-h391-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-7086184734617448286</id><published>2021-11-17T14:52:00.007+05:30</published><updated>2021-11-18T15:25:59.214+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Computer Network Unit 1"/><title type='text'>ISO- OSI Model</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;OSI Model&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;OSI stands for &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Open System Interconnection&lt;/span&gt;&lt;/b&gt;. It has been developed by &quot;&lt;b&gt;International Organization of Standardization&lt;/b&gt;&quot;, in the year &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;1984&lt;/b&gt;&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It is a reference model that describes how information from a software application in one computer moves through a physical medium to the software application in another computer.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It is a &lt;b&gt;7 layer architecture&lt;/b&gt; with each layer having specific functionality to perform. All these 7 layers work collaboratively to transmit the data from one computer to another across the globe. OSI model divides the whole task into seven smaller and manageable tasks. Each layer is assigned a particular task.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&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/a/AVvXsEiy-e9J9zUFC9emYKpNwnXHtv5uIiwYiiT0mYVu0-Odiz5x_H2K7yiwBEV7S8CS33H6rcBCoKvwGnLZ8y6-pz4YORtO20jyb184Jt3EYt9qHuMUfzkeAgspEprNwZW0JeFV5s-cPvh441KqQ03EX-GvaGOx7v2-Wo36wj_cuOImU8i_6SguVHscemTA=s404&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;292&quot; data-original-width=&quot;404&quot; height=&quot;264&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiy-e9J9zUFC9emYKpNwnXHtv5uIiwYiiT0mYVu0-Odiz5x_H2K7yiwBEV7S8CS33H6rcBCoKvwGnLZ8y6-pz4YORtO20jyb184Jt3EYt9qHuMUfzkeAgspEprNwZW0JeFV5s-cPvh441KqQ03EX-GvaGOx7v2-Wo36wj_cuOImU8i_6SguVHscemTA=w412-h264&quot; width=&quot;412&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span face=&quot;inter-regular, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif&quot; style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The OSI model is divided into two types of layers: &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;upper layers&lt;/span&gt;&lt;/b&gt; and &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;lower layers&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The upper layer of the OSI model mainly deals with the application related issues, and they are implemented only in the software. The application layer is closest to the end user. Both the end user and the application layer interact with the software applications.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: verdana; text-align: justify;&quot;&gt;An upper layer refers to the layer just above another layer.&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana; text-align: justify;&quot;&gt;The lower layer of the OSI model deals with the data transport issues. The data link layer and the physical layer are implemented in hardware and software. The physical layer is the lowest layer of the OSI model and is closest to the physical medium. The physical layer is mainly responsible for placing the information on the physical medium.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #333333; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;There are the seven OSI layers. Each layer has different functions. A list of seven layers are given below:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: verdana; text-align: justify;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ol class=&quot;points&quot; style=&quot;background-color: white; color: #333333; font-size: 16px; text-align: justify;&quot;&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Physical Layer&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Data-Link Layer&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Network Layer&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Transport Layer&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Session Layer&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Presentation Layer&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Application Layer&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjuLN0UZ480D-Atywpv9On9EI4aVkuyUl_gRLF8GM_YNihyX5C1PM1qdFBQUnP-N28m24HKGjiRnYlWXoUXGhI2dAOGyhkwEiW6HzBjpLOD-Ga6c_HZ6mRrwBkKfVvRb7NHCnGH3O2tB6S0JSRXyUeeI6yJLe3fMc-6xuJQ6CnOwWRE7Os74z_IQ2CS=s624&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;441&quot; data-original-width=&quot;624&quot; height=&quot;393&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjuLN0UZ480D-Atywpv9On9EI4aVkuyUl_gRLF8GM_YNihyX5C1PM1qdFBQUnP-N28m24HKGjiRnYlWXoUXGhI2dAOGyhkwEiW6HzBjpLOD-Ga6c_HZ6mRrwBkKfVvRb7NHCnGH3O2tB6S0JSRXyUeeI6yJLe3fMc-6xuJQ6CnOwWRE7Os74z_IQ2CS=w508-h393&quot; width=&quot;508&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;h3&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;1. Physical Layer&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The main functionality of the physical layer is to transmit the individual bits from one node to another node.&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;It is the lowest layer of the &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;OSI&lt;/span&gt;&lt;/b&gt; model.&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;It establishes, maintains and deactivates the physical connection.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;Hub&lt;/b&gt;, &lt;b&gt;Repeater&lt;/b&gt;, &lt;b&gt;Modem&lt;/b&gt;, &lt;b&gt;Cables&lt;/b&gt; are physical layer devices. IT also defines the transmission rate.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; font-weight: 500; line-height: 1.3em; margin-left: 0px; padding: 0px;&quot;&gt;&lt;/p&gt;&lt;h3&gt;&lt;span style=&quot;color: red; font-family: verdana; font-size: medium;&quot;&gt;Functions of a Physical layer&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style=&quot;color: #38761d; font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;Line configuration :&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It defines the way how two or more devices can be connected physically.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #38761d; font-size: medium;&quot;&gt;&lt;b&gt;Data Transmission :&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;inter-regular, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;It defines the transmission mode whether it is simplex, half-duplex or full-duplex mode between the two devices on the network.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #38761d; font-size: medium;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Topology :&lt;/span&gt;&lt;/b&gt;&lt;span face=&quot;inter-regular, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Helvetica, Arial, sans-serif&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;inter-regular, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;It defines the way how network devices are arranged.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #38761d; font-family: verdana; font-size: medium;&quot;&gt;&lt;b&gt;Signals :&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;inter-regular, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;It determines the type of the signal used for transmitting the information.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;inter-regular, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;2. Data Link Layer&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;This layer is responsible for the &lt;b&gt;error-free transfer of data&lt;/b&gt; frames. The main function of this layer is to make sure data transfer is error-free from one node to another.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;It defines the format of the data on the network.It provides a reliable and efficient communication between two or more devices.It is mainly responsible for the unique identification of each device that resides on a local network.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;When a packet is arrives in a network, it&#39;s responsibility of &lt;b&gt;Data Link Layer&lt;/b&gt; to transmit it to the &lt;b&gt;Host&lt;/b&gt; using it&#39;s &lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;MAC&lt;/b&gt;&lt;/span&gt; address.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #800180;&quot;&gt;DLL&lt;/span&gt;&lt;/b&gt; is divided into&lt;b&gt; two sub layers&lt;/b&gt; :&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #ff00fe; font-family: verdana;&quot;&gt;Logical Link Control Layer&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;It is responsible for transferring the packets to the Network layer of the receiver that is receiving.&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;It identifies the address of the network layer protocol from the header.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It also provides flow control.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #ff00fe; font-family: verdana;&quot;&gt;&lt;b&gt;Media Access Control Layer&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;A Media access control layer is a link between the Logical Link Control layer and the network&#39;s physical layer.&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;It is used for transferring the packets over the network.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; line-height: 1.3em; margin-left: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: red; font-family: verdana; font-size: medium;&quot;&gt;Functions of the Data-link layer&lt;/span&gt;&lt;/h3&gt;&lt;ul class=&quot;points&quot; style=&quot;background-color: white; font-size: 16px; line-height: 24px; list-style: circle;&quot;&gt;&lt;li style=&quot;line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Framing:&lt;/span&gt;&lt;/span&gt;&amp;nbsp;The data link layer translates the physical&#39;s raw bit stream into packets known as Frames. The Data link layer adds the header and trailer to the frame. The header which is added to the frame contains the hardware destination and source address.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;img alt=&quot;OSI Model&quot; src=&quot;https://static.javatpoint.com/tutorial/computer-network/images/osi-model5.png&quot; style=&quot;background-color: white; color: #333333; font-size: 16px; height: auto; max-width: 100%;&quot; /&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul class=&quot;points&quot; style=&quot;background-color: white; line-height: 24px; list-style: circle;&quot;&gt;&lt;li style=&quot;font-size: 16px; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Physical Addressing:&lt;/span&gt;&lt;/span&gt;&amp;nbsp;The Data link layer adds a header to the frame that contains a destination address. The frame is transmitted to the destination address mentioned in the header.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;font-size: 16px; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Flow Control:&lt;/span&gt;&lt;/span&gt;&amp;nbsp;Flow control is the main functionality of the Data-link layer. It is the technique through which the constant data rate is maintained on both the sides so that no data get corrupted. It ensures that the transmitting station such as a server with higher processing speed does not exceed the receiving station, with lower processing speed.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: 16px; font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Error Control:&lt;/span&gt;&lt;/span&gt;&amp;nbsp;Error control is achieved by adding a calculated value &lt;span style=&quot;color: #2b00fe;&quot;&gt;CRC&lt;/span&gt; &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;(&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;Cyclic Redundancy Check&lt;/b&gt;)&lt;/span&gt; that is placed to the Data link layer&#39;s trailer which is added to the message frame before it is sent to the physical layer. If any error seems to occur, then the receiver sends the acknowledgment for the re transmission&amp;nbsp;of the corrupted frames.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;font-size: 16px; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Access Control:&lt;/span&gt;&lt;/span&gt;&amp;nbsp;When two or more devices are connected to the same communication channel, then the data link layer protocols are used to determine which device has control over the link at a given time.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;3. Network Layer&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Network layer works for the transmission of the data from one host to another located in different network.It also take care of packet routing means selection of the shortest path to transmit the packet, from the numbers of route available.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;The Data link layer is responsible for &lt;b&gt;routing &lt;/b&gt;and &lt;b&gt;forwarding&lt;/b&gt; the packets.The sender and receiver &lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;IP&lt;/b&gt;&lt;/span&gt; address are placed in the &lt;b&gt;header&lt;/b&gt; by the network layer.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Routers are the layer 3 devices, they are specified in this layer and used to provide the routing services within an inter network.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;The protocols used to route the network traffic are known as Network layer protocols. Examples of protocols are &lt;b&gt;IP&lt;/b&gt; and &lt;b&gt;Ipv6&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; line-height: 1.3em; margin-left: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: red; font-family: verdana; font-size: medium;&quot;&gt;Functions of Network Layer&lt;/span&gt;&lt;/h3&gt;&lt;ul class=&quot;points&quot; style=&quot;background-color: white; font-family: inter-regular, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 24px; list-style: circle;&quot;&gt;&lt;li style=&quot;line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: inter-bold, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Internetworking:&lt;/span&gt;&lt;/span&gt;&amp;nbsp;An &lt;b&gt;internetworking &lt;/b&gt;is the main responsibility of the network layer. It provides a logical connection between different devices.&lt;/li&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: inter-bold, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-weight: 700;&quot;&gt;&lt;a href=&quot;https://www.javatpoint.com/network-addressing&quot; style=&quot;color: green; text-decoration-line: none;&quot;&gt;Addressing&lt;/a&gt;:&lt;/span&gt;&amp;nbsp;A Network layer adds the source and destination address to the header of the frame. Addressing is used to identify the device on the internet.&lt;/li&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: inter-bold, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-weight: 700;&quot;&gt;&lt;a href=&quot;https://www.javatpoint.com/computer-network-routing&quot; style=&quot;color: green; text-decoration-line: none;&quot;&gt;Routing&lt;/a&gt;:&lt;/span&gt;&amp;nbsp;Routing is the major component of the network layer, and it determines the best optimal path out of the multiple paths from source to the destination.&lt;/li&gt;&lt;li style=&quot;line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: inter-bold, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Packetizing:&lt;/span&gt;&lt;/span&gt;&amp;nbsp;A Network Layer receives the packets from the upper layer and converts them into packets. This process is known as &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Packetizing&lt;/span&gt;&lt;/b&gt;. It is achieved by &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;internet protocol &lt;/span&gt;&lt;/b&gt;(&lt;b&gt;IP&lt;/b&gt;).&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;4. Transport Layer&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;The Transport layer is a Layer 4 ensures that messages are transmitted in the order in which they are sent and there is no duplication of data.The main responsibility of the transport layer is to transfer the data completely.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;It receives the data from the upper layer and converts them into smaller units known as &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;segments&lt;/span&gt;&lt;/b&gt;.It is responsible to end to end delivery of the complete message.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;The transport layer also provides the acknowledgement of the successful data transmission and re transmits the data if an error is found.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;&lt;b&gt;The two protocols are used in this layer are:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3&gt;&lt;span style=&quot;background-color: white; font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Transmission Control Protocol&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;It is a standard protocol that allows the systems to communicate over the internet.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;When data is sent over the &lt;b&gt;TCP&lt;/b&gt; connection, then the &lt;b&gt;TCP&lt;/b&gt; protocol divides the data into smaller units known as &lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;segments&lt;/b&gt;&lt;/span&gt;. Each segment travels over the internet using multiple routes, and they arrive in different orders at the destination. The transmission control protocol reorders the packets in the correct order at the receiving end.&lt;/span&gt;&lt;/p&gt;&lt;h3&gt;&lt;span style=&quot;background-color: white; font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;User Datagram Protocol&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;User Datagram Protocol is a transport layer protocol.It is an unreliable transport protocol as in this case receiver does not send any acknowledgment when the packet is received, the sender does not wait for any acknowledgment. Therefore, this makes a protocol unreliable.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; line-height: 1.3em; margin-left: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: red; font-family: verdana; font-size: medium;&quot;&gt;Functions of Transport Layer&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;&lt;ul class=&quot;points&quot; style=&quot;background-color: white; line-height: 24px; list-style: circle;&quot;&gt;&lt;li style=&quot;line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Segmentation and reassembly:&lt;/span&gt;&lt;/span&gt;&amp;nbsp;When the transport layer receives the message from the upper layer, it divides the message into multiple &lt;b&gt;segments&lt;/b&gt;, and each segment is assigned with a &lt;b&gt;sequence number&lt;/b&gt; that uniquely identifies each segment. When the message has arrived at the destination, then the transport layer &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;reassembles&lt;/span&gt;&lt;/b&gt; the message based on their sequence numbers.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;points&quot; style=&quot;background-color: white; line-height: 24px; list-style: circle;&quot;&gt;&lt;li style=&quot;line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Connection control:&lt;/span&gt;&lt;/span&gt;&amp;nbsp;Transport layer provides two services&lt;b&gt; Connection-oriented service&lt;/b&gt; and &lt;b&gt;connectionless service&lt;/b&gt;. A connectionless service treats each segment as an individual packet, and they all travel in different routes to reach the destination. A connection-oriented service makes a connection with the transport layer at the destination machine before delivering the packets. In connection-oriented service, all the packets travel in the single route.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;points&quot; style=&quot;background-color: white; line-height: 24px; list-style: circle;&quot;&gt;&lt;li style=&quot;line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Flow control:&lt;/span&gt;&lt;/span&gt;&amp;nbsp;The transport layer also responsible for flow control but it is performed end-to-end rather than across a single link.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;points&quot; style=&quot;background-color: white; line-height: 24px; list-style: circle;&quot;&gt;&lt;li style=&quot;line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Error control:&lt;/span&gt;&lt;/span&gt;&amp;nbsp;The transport layer is also responsible for Error control. Error control is performed end-to-end rather than across the single link. The sender transport layer ensures that message reach at the destination without any error.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;h3&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;5. Session Layer&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;This layer is responsible for &lt;b&gt;establishment of connection&lt;/b&gt;, &lt;b&gt;maintenance&amp;nbsp;of sessions&lt;/b&gt;, &lt;b&gt;authentication&lt;/b&gt;&amp;nbsp;and also ensures &lt;b&gt;security&lt;/b&gt;. the session layer allows two systems to start communication with each other in &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;half-duplex &lt;/span&gt;&lt;/b&gt;and &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;full-duplex&lt;/span&gt;&lt;/b&gt; mode.&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;h3 style=&quot;background-color: white; line-height: 1.3em; margin-left: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: red; font-family: verdana; font-size: medium;&quot;&gt;Functions of Session layer&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul class=&quot;points&quot; style=&quot;background-color: white; font-size: 16px; line-height: 24px; list-style: circle;&quot;&gt;&lt;li style=&quot;line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Session Establishment, Maintenance and Termination :&lt;/span&gt; &lt;/b&gt;The session layer allows the two processes to &lt;b&gt;establish&lt;/b&gt;, &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;use&lt;/span&gt;&lt;/b&gt; and &lt;b&gt;termination&lt;/b&gt; a connection.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;points&quot; style=&quot;background-color: white; font-size: 16px; line-height: 24px; list-style: circle;&quot;&gt;&lt;li style=&quot;line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Synchronization:&lt;/span&gt;&lt;/span&gt;&amp;nbsp;Session layer adds some &lt;b&gt;checkpoints &lt;/b&gt;when transmitting the data in a sequence. If some error occurs in the middle of the transmission of data, then the transmission will take place again from the checkpoint. This process is known as &lt;b&gt;Synchronization and recovery&lt;/b&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;h3&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;6. Presentation Layer&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;A Presentation layer is mainly concerned with the &lt;b&gt;syntax&lt;/b&gt; and &lt;b&gt;semantics&lt;/b&gt; of the information exchanged between the two systems.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;It acts as a &lt;b&gt;data translator&lt;/b&gt; for a network.This layer is a part of the operating system that converts the data from one presentation format to another format.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;The Presentation layer is also known as the &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;syntax layer&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; line-height: 1.3em; margin-left: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: red; font-family: verdana; font-size: medium;&quot;&gt;Functions of Presentation layer&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span face=&quot;inter-regular, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif&quot; style=&quot;background-color: white; font-family: verdana;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul class=&quot;points&quot; style=&quot;background-color: white; font-size: 16px; line-height: 24px; list-style: circle;&quot;&gt;&lt;li style=&quot;line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Translation:&lt;/span&gt;&lt;/span&gt;&amp;nbsp;It converts the data from sender-dependent format into a common format and changes the common format into receiver-dependent format at the receiving end.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Encryption:&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;b&gt;Encryption&lt;/b&gt; is needed to maintain privacy. &lt;b&gt;Encryption&lt;/b&gt; is a process of converting the sender-transmitted information into another form and sends the resulting message over the network.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Compression:&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;b&gt;Data compression&lt;/b&gt; is a process of compressing the data, i.e., it reduces the number of bits to be transmitted. Data compression is very important in multimedia such as &lt;b&gt;text&lt;/b&gt;, &lt;b&gt;audio&lt;/b&gt;, &lt;b&gt;video&lt;/b&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;7. Application Layer&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;An application layer is not an application, but it performs the application layer functions.These application produce the data, which has to be transferred over the network.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;This layer also serves as a window for the application services to access the network and for displaying the receiving information to the user.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; line-height: 1.3em; margin-left: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: red; font-family: verdana; font-size: medium;&quot;&gt;Functions of Application layer&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;/p&gt;&lt;ul class=&quot;points&quot; style=&quot;background-color: white; line-height: 24px; list-style: circle;&quot;&gt;&lt;li style=&quot;line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;File transfer, access, and management (FTAM):&lt;/span&gt;&lt;/span&gt;&amp;nbsp;An application layer allows a user to access the files in a remote computer, to retrieve the files from a computer and to manage the files in a remote computer.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;points&quot; style=&quot;background-color: white; line-height: 24px; list-style: circle;&quot;&gt;&lt;li style=&quot;line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Mail services:&lt;/span&gt;&lt;/span&gt;&amp;nbsp;An application layer provides the facility for email forwarding and storage.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #800180;&quot;&gt;Note :&lt;/span&gt;&lt;/b&gt; &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;OSI Model&lt;/span&gt; acts as a reference model and is not implemented in the internet because&amp;nbsp;of it&#39;s late invention. Current&amp;nbsp;model being used is the &lt;span style=&quot;color: #2b00fe;&quot;&gt;TCP/IP&lt;/span&gt; &lt;span style=&quot;color: #2b00fe;&quot;&gt;model&lt;/span&gt;.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;inter-regular, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif&quot; style=&quot;background-color: white; font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;inter-regular, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif&quot; style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/7086184734617448286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/11/iso-osi-model.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/7086184734617448286'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/7086184734617448286'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/11/iso-osi-model.html' title='ISO- OSI Model'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEiy-e9J9zUFC9emYKpNwnXHtv5uIiwYiiT0mYVu0-Odiz5x_H2K7yiwBEV7S8CS33H6rcBCoKvwGnLZ8y6-pz4YORtO20jyb184Jt3EYt9qHuMUfzkeAgspEprNwZW0JeFV5s-cPvh441KqQ03EX-GvaGOx7v2-Wo36wj_cuOImU8i_6SguVHscemTA=s72-w412-h264-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-7433196759307361721</id><published>2021-11-16T15:18:00.003+05:30</published><updated>2021-11-18T15:25:59.214+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Computer Network Unit 1"/><title type='text'>Transmission Media</title><content type='html'>&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;&amp;nbsp;Transmission Media&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In data communication terminology transmission medium is physical path between the transmitter and the receiver. It is the channel through which data is sent from one place to another.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Transmission media is a communication channel that carries the information from the sender to the receiver. Data is transmitted through the electromagnetic signals.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;Types of Transmission Media&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;there are two types of transmission media which are as follows:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;color: #2b00fe; font-family: verdana;&quot;&gt;&lt;b&gt;Guided Media&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;Unguided Media&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; line-height: 1.3em; margin-top: 5px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;background-color: white; line-height: 1.3em; margin-top: 5px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;1. Guided Transmission Media&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;p style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;It is defined as the physical medium through which the signals are transmitted.It is also referred to as &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;wired&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #333333;&quot;&gt; or &lt;/span&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;bounded&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt; transmission media. Signals being transmitted are directed and confined in a narrow pathway by using physical links.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;They are secure and and used for comparatively shorter distances.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;There are various&amp;nbsp;examples of guided media. Some of these are are as follows:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; line-height: 1.3em; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;Twisted pair&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; color: #333333; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Twisted pair is a physical media made up of a pair of cables twisted with each other. A twisted pair cable is cheap as compared to other transmission media. Installation of the twisted pair cable is easy, and it is a lightweight cable. The frequency range for twisted pair cable is from 0 to 3.5KHz.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #333333; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;A twisted pair consists of two insulated copper wires arranged in a regular spiral pattern.The degree of reduction in noise interference is determined by the number of turns per foot. Increasing the number of turns per foot decreases noise interference.&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #333333; font-family: inter-regular, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; text-align: justify;&quot;&gt;&lt;/p&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/a/AVvXsEiuoCKxY7Ck8VaHYx5ltxw0RYG2aHhdsjs4pPT6sA8BtJWRna81VE8sEkOW9_qNHAEbZdMNtm9r69ysJPDPzAzVg4ZMlDCrSNTwDyhkfMlnYwb_KBxdxqgxecgWcECgrTN_Bv7RNBFjtggWiOpRmmKfdNRFD1qF97aTrUZMNnFp4j09631FT6ohOU_b=s624&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;133&quot; data-original-width=&quot;624&quot; height=&quot;133&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiuoCKxY7Ck8VaHYx5ltxw0RYG2aHhdsjs4pPT6sA8BtJWRna81VE8sEkOW9_qNHAEbZdMNtm9r69ysJPDPzAzVg4ZMlDCrSNTwDyhkfMlnYwb_KBxdxqgxecgWcECgrTN_Bv7RNBFjtggWiOpRmmKfdNRFD1qF97aTrUZMNnFp4j09631FT6ohOU_b=w498-h133&quot; width=&quot;498&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; line-height: 1.3em; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;Coaxial Cable&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Coaxial cable is very commonly used transmission media, for example, TV wire is usually a coaxial cable.The name of the cable is coaxial as it contains two conductors parallel to each other.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;It has a higher frequency as compared to Twisted pair cable.The inner conductor of the coaxial cable is made up of copper, and the outer conductor is made up of copper mesh. The middle core is made up of non-conductive cover that separates the inner conductor from the outer conductor.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;The middle core is responsible for the data transferring whereas the copper mesh prevents from the&amp;nbsp;&lt;b&gt;EMI&lt;/b&gt;(&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;Electromagnetic interference&lt;/b&gt;&lt;/span&gt;).&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em; text-align: justify;&quot;&gt;&lt;/p&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/a/AVvXsEg_3U9u5NjPlKIIrqMlBTMdN2B-xyYtSZfgOndNX0hm9UsNUOdXSHz6DPONg5lw_cBzp3syZuxk_MyycY6zD1m6LiDRF4QlpZsop0rUKnJB7YHbI1Lcef7kB-kW9y---GddgVGR4slbdCOjaf4AeKjqiSJsqp9cplhLxLbsYf02fHKc6iFrWAgwajcL=s621&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;134&quot; data-original-width=&quot;621&quot; height=&quot;106&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEg_3U9u5NjPlKIIrqMlBTMdN2B-xyYtSZfgOndNX0hm9UsNUOdXSHz6DPONg5lw_cBzp3syZuxk_MyycY6zD1m6LiDRF4QlpZsop0rUKnJB7YHbI1Lcef7kB-kW9y---GddgVGR4slbdCOjaf4AeKjqiSJsqp9cplhLxLbsYf02fHKc6iFrWAgwajcL=w477-h106&quot; width=&quot;477&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; line-height: 1.3em; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;Optical Fibre&amp;nbsp;Cable&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;Fibre optic cable is a cable that uses electrical signals for communication. Fibre&amp;nbsp;optic is a cable that holds the optical fibres coated in plastic that are used to send the data by pulses of light.The plastic coating protects the optical fibres&amp;nbsp;from heat, cold, electromagnetic interference from other types of wiring. Fibre&amp;nbsp;optics provide faster data transmission than copper wires.&lt;/span&gt;&lt;/p&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/a/AVvXsEgmxc0FNYuy7Vr4InKA_TCx_F4c6u6GfBh4AgfiOGZaqqhPi7D1_mU6Jl-obviferxAlxJ13KBup_3JyVog3nmfNi-ZcU-_o7_pVbYcN-FC4GuEnw8K4AU6wJnShcxsOpRsKMAv8efxjR2m_J15I2IgjRhxAM_7EOYo0sVISldKbIXQNTHYG9wPLRpF=s635&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;189&quot; data-original-width=&quot;635&quot; height=&quot;189&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgmxc0FNYuy7Vr4InKA_TCx_F4c6u6GfBh4AgfiOGZaqqhPi7D1_mU6Jl-obviferxAlxJ13KBup_3JyVog3nmfNi-ZcU-_o7_pVbYcN-FC4GuEnw8K4AU6wJnShcxsOpRsKMAv8efxjR2m_J15I2IgjRhxAM_7EOYo0sVISldKbIXQNTHYG9wPLRpF=w605-h189&quot; width=&quot;605&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;h3 style=&quot;background-color: white; line-height: 1.3em; margin-top: 5px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;2. Unguided&amp;nbsp;Transmission Media&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em; margin-top: 5px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;An unguided transmission transmits the &lt;b&gt;electromagnetic waves&lt;/b&gt; without using any physical medium. Therefore it is also known as&amp;nbsp;wireless transmission or unbounded transmission media.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em; margin-top: 5px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;In unguided media, air is the media through which the electromagnetic energy can flow easily.The signals is broadcasted through air.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em; margin-top: 5px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;They are less secure and used for larger distance.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em; margin-top: 5px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;There are 3 types of signals transmitted through unguided media.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; line-height: 1.3em; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;Radio waves&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Radio waves are the electromagnetic waves that are transmitted in all the directions of free space.Radio waves are imnidirectional, i.e., the signals are propagated in all the directions.The range in frequencies of radio waves is from &lt;b&gt;3Khz to 1 khz&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In the case of radio waves, the sending and receiving antenna are not aligned, i.e., the wave sent by the sending antenna can be received by any receiving antenna.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;An example of the radio wave is&lt;span style=&quot;font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;FM radio&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; line-height: 1.3em; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;Infrared&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;background-color: white; line-height: 1.3em; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small; font-weight: normal;&quot;&gt;An infrared transmission is a wireless technology used for communication over short ranges.The frequency of the infrared in the range from &lt;/span&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;300 GHz to 400 THz&lt;/span&gt;&lt;span style=&quot;font-family: verdana; font-size: small; font-weight: normal;&quot;&gt;. It is used for short-range communication such as data transfer between two cell phones, TV remote operation, data transfer between a computer and cell phone resides in the same closed area.&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;It supports high bandwidth, and hence the data rate will be very high.An infrared communication provides better security with minimum interference.Infrared communication is unreliable outside the building because the sun rays will interfere with the infrared waves.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; line-height: 1.3em; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;Microwaves&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The microwave is another type of electromagnetic waves that have a frequency range of &lt;b&gt;1 GHz to 300 GHz&lt;/b&gt;. The microwave is unidirectional.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In this transmission, whenever the signals are transmitted through an antenna, the signals can make narrow to focus to a particular point. And in this transmission, there is a requirement of proper alignment of sending antenna and receiving antenna.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It supports the bandwidth from 1 to 10 Mbps.&amp;nbsp;Microwave transmission is cheaper than using cables.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Microwaves are of two types:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ul class=&quot;points&quot; style=&quot;background-color: white; line-height: 24px; list-style: circle; text-align: justify;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Terrestrial microwave&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;color: #2b00fe; font-family: verdana;&quot;&gt;Satellite microwave communication.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #333333; font-family: inter-regular, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #333333; font-family: inter-regular, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #333333; font-family: inter-regular, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #333333; font-family: inter-regular, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/7433196759307361721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/11/transmission-media.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/7433196759307361721'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/7433196759307361721'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/11/transmission-media.html' title='Transmission Media'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEiuoCKxY7Ck8VaHYx5ltxw0RYG2aHhdsjs4pPT6sA8BtJWRna81VE8sEkOW9_qNHAEbZdMNtm9r69ysJPDPzAzVg4ZMlDCrSNTwDyhkfMlnYwb_KBxdxqgxecgWcECgrTN_Bv7RNBFjtggWiOpRmmKfdNRFD1qF97aTrUZMNnFp4j09631FT6ohOU_b=s72-w498-h133-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-6787146718482761393</id><published>2021-11-13T14:50:00.000+05:30</published><updated>2021-11-18T15:25:59.214+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Computer Network Unit 1"/><title type='text'>Network Devices in Computer Network</title><content type='html'>&lt;h2 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;Network Device&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Networking devices or networking hardware are physical devices that are required for communication and interconnection between hardware on a computer network.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;Hardware devices that are used to connect computers, printers, fax machines and other electronic devices to a network are called&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; font-weight: 640; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;network devices&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;. These devices transfer data in a fast, secure and correct way over same or different networks.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;Network devices may be inter-network or intra-network. Some devices are installed on the device, like NIC card or RJ45 connector, whereas some are part of network, like router, switch, etc. Let us explore some of these devices in greater detail.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; color: #800180; font-family: verdana; font-size: x-large; text-align: justify;&quot;&gt;Router&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;A&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; font-weight: 640; text-align: justify;&quot;&gt;router&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&amp;nbsp;is a&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; font-weight: 640; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;network layer&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&amp;nbsp;hardware device that transmits data from one LAN to another if both networks support the same set of protocols.&amp;nbsp;A router is a device like a switch that routes data packets based on their IP address.&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;It receives its data in the form of&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; font-weight: 640; text-align: justify;&quot;&gt;packets&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;, which are&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; font-weight: 640; text-align: justify;&quot;&gt;data frames&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&amp;nbsp;with their&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;destination address&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&amp;nbsp;added.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;p style=&quot;font-size: 16px; margin: 0.5em 0.2em 0.6em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;A router reads its &lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;routing table &lt;/b&gt;&lt;/span&gt;to decide the best available route the packet can take to reach its destination quickly and accurately. The routing table may be of these two types −&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; margin: 0.5em 0.2em 0.6em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-weight: 640;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;Static&lt;/span&gt;&lt;/span&gt;&amp;nbsp;− In a static routing table the routes are fed manually. So it is suitable only for very small networks that have maximum two to three routers.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; margin: 0.5em 0.2em 0.6em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-weight: 640;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;Dynamic&lt;/span&gt;&lt;/span&gt;&amp;nbsp;− In a dynamic routing table, the router communicates with other routers through protocols to determine which routes are free. This is suited for larger networks where manual feeding may not be feasible due to large number of routers.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;margin: 0.5em 0.2em 0.6em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;margin: 0.5em 0.2em 0.6em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;Switch&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;Switch&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&amp;nbsp;is a network device that connects other devices to&lt;span style=&quot;color: #2b00fe;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; font-weight: 640; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Ethernet&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&amp;nbsp;networks through&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; font-weight: 640; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;twisted pair&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&amp;nbsp;&lt;/span&gt;cables. It uses&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; font-weight: 640; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;packet switching&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&amp;nbsp;technique to&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;receive, store&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;forward data packets&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&amp;nbsp;on the network. The switch maintains a list of network addresses of all the devices connected to it.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;On receiving a packet it checks the destination address and transmits the packet to the correct port.&lt;/span&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;The switch can perform error checking before &lt;/span&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;forwarding&amp;nbsp;data, which&lt;/span&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&amp;nbsp;makes it very efficient as it does not forward frames that have errors and forward good packets selectively to the correct port only.&lt;/span&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;The data is transmitted in full duplex mode.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Data transmission speed in switches can be double that of other network devices like &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;hubs&lt;/span&gt;&lt;/b&gt; used for networking.This is because switch shares its maximum speed with all the devices connected to it.This helps in maintaining network speed even during high traffic. In fact, higher data speeds are achieved on networks through use of multiple switches.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: Arial, Verdana, Tahoma; font-size: 16px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;Gateway&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px; font-weight: 640; text-align: justify;&quot;&gt;Gateway&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&amp;nbsp;is a network device used to connect two or more dissimilar networks. In networking parlance, networks that use different protocols are&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; font-weight: 640; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;dissimilar networks&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;A gateway, as the name suggests, is a passage to connect two networks together that may work upon different networking module.They work basically work as an messenger&amp;nbsp;agents that take data from one system, interpret it, and transfer it to another system.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;Gateway&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&amp;nbsp;uses&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; font-weight: 640; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;packet switching&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&amp;nbsp;technique to transmit data from one network to another. In this way it is similar to a&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; font-weight: 640; text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;router&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;, the only difference being router can transmit data only over networks that use same protocols.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;Hub&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;b&gt;Hubs&lt;/b&gt; connect multiple computer networking devices together. A hub connects multiple wires coming from different branches, for example the connector in star topology which connects different stations.&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;A hub is the simplest in the family of network connecting devices because it connects &lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;LAN&lt;/b&gt;&lt;/span&gt; components with &lt;b&gt;identical&lt;/b&gt; protocols.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Hubs do not perform packet filtering or addressing functions; they just send data packets to all connected devices. Also they do not have intelligence to find out the best path for data packets which leads to inefficiencies and wastage. Hub is an broadcasting device that design to connect different computer with each other.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;Bridge&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;Bridges&lt;/b&gt; are used to connect two or more hosts or network segments together. The basic role of bridges in network architecture is storing and forwarding frames between the different segments that the bridge connects. They use hardware &lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;MAC&lt;/b&gt;&lt;/span&gt; (&lt;b&gt;Media Access Control&lt;/b&gt;) addresses for transferring frames.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;By looking at the MAC address of the devices connected to each segment, bridges can forward the data or block it from crossing.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: start;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Bridges work only at the &lt;b&gt;Physical&lt;/b&gt; and &lt;b&gt;Data Link layers&lt;/b&gt; of the &lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;OSI model&lt;/b&gt;&lt;/span&gt;. It is a two port device (one for input and one for output).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: start;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: start;&quot;&gt;It is also used for interconnecting two &lt;b&gt;LAN&#39;s&lt;/b&gt; working on the same protocol.&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: left;&quot;&gt;However, bridges filter incoming data packets, known as frames, for addresses before they are forwarded. As it filters the data packets, the bridge makes no modifications to the format or content of the incoming data. The bridge filters and forwards frames on the network with the help of a dynamic bridge table. The bridge table, which is initially empty, maintains the LAN addresses for each computer in the LAN and the addresses of each bridge interface that connects the LAN to other &lt;b&gt;LAN&#39;s&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;font-size: 16px; margin: 0.5em 0.2em 0.6em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;margin: 0.5em 0.2em 0.6em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;Repeater&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;A &lt;b&gt;repeater &lt;/b&gt;operates at the physical layer. It is job is to regenerate the signal over the same network before the signal becomes too weak or corrupted so as to extend the length to which the signal can be transmitted over the same network.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Repeaters do not amplify the signal when the signal becomes weak, they copy the signal bit by bit and regenerate it at the original strength.&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;font-size: 16px; margin: 0.5em 0.2em 0.6em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; margin: 0.5em 0.2em 0.6em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; margin: 0.5em 0.2em 0.6em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; margin: 0.5em 0.2em 0.6em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/6787146718482761393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/11/network-devices-in-computer-network.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/6787146718482761393'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/6787146718482761393'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/11/network-devices-in-computer-network.html' title='Network Devices in Computer Network'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-5607407084853935186</id><published>2021-11-12T10:52:00.005+05:30</published><updated>2021-11-12T11:44:08.811+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Computer Network Unit 1"/><title type='text'>Computer network and Types of Computer network</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: large;&quot;&gt;Computer Network&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background-color: white; color: #333333; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;A computer network is a group of computers linked to each other that enables the computer to communicate with another computer and share their resources, data, and applications.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;A computer network can be categorized by their size. A&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-weight: 700;&quot;&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;computer network&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;nbsp;is mainly of&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-weight: 700;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;four&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-weight: 700;&quot;&gt; types&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul class=&quot;points&quot; style=&quot;background-color: white; color: #333333; font-size: 16px; line-height: 24px; list-style: circle; text-align: justify;&quot;&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;LAN(Local Area Network)&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;PAN(Personal Area Network)&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;MAN(Metropolitan Area Network)&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;color: black; line-height: 25px; margin-top: 4px; padding: 0.2em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;WAN(Wide Area Network)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;h3 style=&quot;background-color: white; color: #610b38; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: large;&quot;&gt;LAN(Local Area Network)&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Local Area Network is a group of computers connected to each other in a small area such as building, office (Limited to few kilometres&amp;nbsp;of area.)&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;LAN is used for connecting two or more personal computers through a communication medium such as twisted pair, coaxial cable, etc.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It is less costly as it is built with inexpensive hardware such as hubs, network adapters, and Ethernet cables.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The data is transferred at an extremely faster rate in Local Area Network.Local Area Network provides higher security.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;/p&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/a/AVvXsEgrSewCyCbP55LvjCPgl0d5YYtWQ9CbfWUtlo4UHEtVwqnYfyuwk5oHaTg81oSt9foYPUuT96FqXeSX-Cin0vDU4UqvorW_DjcTIgSjVIANbckFYtiSAvJj3wHdxqmYusCgxZm43yHJKUrkXlkWlEXAshqXKO0uxZwJrE7KTI1B13FI7AHvw0QTnx9L=s436&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;328&quot; data-original-width=&quot;436&quot; height=&quot;241&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgrSewCyCbP55LvjCPgl0d5YYtWQ9CbfWUtlo4UHEtVwqnYfyuwk5oHaTg81oSt9foYPUuT96FqXeSX-Cin0vDU4UqvorW_DjcTIgSjVIANbckFYtiSAvJj3wHdxqmYusCgxZm43yHJKUrkXlkWlEXAshqXKO0uxZwJrE7KTI1B13FI7AHvw0QTnx9L=s320&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; color: #610b38; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: large;&quot;&gt;PAN(Personal Area Network)&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; color: #610b38; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Personal Area Network is a network arranged within an individual person, typically within a range of 10 meters.&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Personal Area Network is used for connecting the computer devices of personal use is known as Personal Area Network.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Thomas Zimmerman&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;was the first research scientist to bring the idea of the Personal Area Network.&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Personal Area Network covers an area of&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;30 feet&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Personal computer devices that are used to develop the personal area network are the laptop, mobile phones, media player and play stations.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhjtTctpld-Yw-HGoTGIleACP0qS8mx-_qBsJdzs9i_4OVGlkvMBgTRDPlY59L1ZjMBE5LsSbZSbQsjBBO8r2rdXg92IV8YbAyqKfFkjtS45SBJW8ZPe7RoylA4ZhEGUHYCDAz-Vg72iZYU0KgtWujdH5557QN2djUuxoe_SS5sWsszqWGcEQqk3jKM=s505&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;335&quot; data-original-width=&quot;505&quot; height=&quot;234&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhjtTctpld-Yw-HGoTGIleACP0qS8mx-_qBsJdzs9i_4OVGlkvMBgTRDPlY59L1ZjMBE5LsSbZSbQsjBBO8r2rdXg92IV8YbAyqKfFkjtS45SBJW8ZPe7RoylA4ZhEGUHYCDAz-Vg72iZYU0KgtWujdH5557QN2djUuxoe_SS5sWsszqWGcEQqk3jKM=w351-h234&quot; width=&quot;351&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;There are two types of personal area network.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;1. Wired Personal Area Network&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;2. Wireless Personal Area Network&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: 16px; font-weight: 700; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;Wireless Personal Area Network:&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-size: 16px; text-align: justify;&quot;&gt;&amp;nbsp;Wireless Personal Area Network is developed by simply using wireless technologies such as WiFi, Bluetooth. It is a low range network.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: 16px; font-weight: 700; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: 16px; font-weight: 700; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;Wired Personal Area Network:&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-size: 16px; text-align: justify;&quot;&gt;&amp;nbsp;Wired Personal Area Network is created by using the USB.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #333333; font-size: 16px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; color: #610b38; font-size: 25px; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;MAN(Metropolitan Area Network)&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; color: #610b38; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;A metropolitan area network is a network that covers a larger geographic area by interconnecting a different LAN to form a larger network.&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Government agencies use MAN to connect to the citizens and private industries.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #610b38; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;In MAN, various LAN&#39;s are connected to each other through a telephone exchange line.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The most widely used protocols in MAN are RS-232, Frame Relay, ATM, ISDN, OC-3, ADSL, etc.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;It has a higher range than Local Area Network(LAN).&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;MAN is used in communication between the banks in the city. It can be used in any organization to connect all the different branches of a city.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;/p&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/a/AVvXsEiT7j7SOgJ3KGArkATys7hXAhNjPoP1XZbEuZ_zuoOneQJJNGEHi4PQuTd2Ct_RPG2_bb6OYWV0RF-HD0EonMf_hv-A8wFYSZ3M7I7GYF-QUWtyKYU9FZUHOHIWK-mMq5JbMN6Uxd27mfiXaESn9h_vWp4L2aQ9oyWD1YRNkPcAOXyCJyiTru1YVZm8=s899&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;581&quot; data-original-width=&quot;899&quot; height=&quot;351&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiT7j7SOgJ3KGArkATys7hXAhNjPoP1XZbEuZ_zuoOneQJJNGEHi4PQuTd2Ct_RPG2_bb6OYWV0RF-HD0EonMf_hv-A8wFYSZ3M7I7GYF-QUWtyKYU9FZUHOHIWK-mMq5JbMN6Uxd27mfiXaESn9h_vWp4L2aQ9oyWD1YRNkPcAOXyCJyiTru1YVZm8=w518-h351&quot; width=&quot;518&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; color: #610b38; font-size: 25px; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;WAN(Wide Area Network)&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;A Wide Area Network is a network that extends over a large geographical area such as states or countries.A Wide Area Network is quite bigger network than the LAN.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;A Wide Area Network is not limited to a single location, but it spans over a large geographical area through a telephone line, fiber optic cable or satellite links.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;The internet is one of the biggest WAN in the world.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: small;&quot;&gt;A Wide Area Network is widely used in the field of Business, government, and education.&lt;/span&gt;&lt;/p&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/a/AVvXsEhEROtI3KKHy726vaS4SORINZxwvudM8NLZ0GnJyuNBcmr54AyxKilA2QTQS7i347EEK003gAlY6necKnY9cOPRsZCSFBPg8gS7v0cZKoO3Ytjb7thwD5kLTC26VUCyNc4A1ngbq88zJZwpwVyyBxKdi1VLMaetRDSWv1cSkKKdE5FvcZJ-P4DKvnv5=s936&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;584&quot; data-original-width=&quot;936&quot; height=&quot;417&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhEROtI3KKHy726vaS4SORINZxwvudM8NLZ0GnJyuNBcmr54AyxKilA2QTQS7i347EEK003gAlY6necKnY9cOPRsZCSFBPg8gS7v0cZKoO3Ytjb7thwD5kLTC26VUCyNc4A1ngbq88zJZwpwVyyBxKdi1VLMaetRDSWv1cSkKKdE5FvcZJ-P4DKvnv5=w555-h417&quot; width=&quot;555&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;h3 class=&quot;h3&quot; style=&quot;background-color: white; color: #610b4b; font-size: 21px; line-height: 1.3em; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Advantages Of Wide Area Network:&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; color: #333333; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Following are the advantages of the Wide Area Network:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #333333; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: verdana; font-weight: 700;&quot;&gt;Geographical area:&lt;/span&gt;&lt;span style=&quot;color: black; font-family: verdana;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: verdana;&quot;&gt;A Wide Area Network provides a large geographical area. Suppose if the branch of our office is in a different city then we can connect with them through WAN. The internet provides a leased line through which we can connect with another branch.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #333333; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: verdana; font-weight: 700;&quot;&gt;Centralized data:&lt;/span&gt;&lt;span style=&quot;color: black; font-family: verdana;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: verdana;&quot;&gt;In case of WAN network, data is centralized. Therefore, we do not need to buy the emails, files or back up servers.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #333333; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: verdana; font-weight: 700;&quot;&gt;Get updated files:&lt;/span&gt;&lt;span style=&quot;color: black; font-family: verdana;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: verdana;&quot;&gt;Software companies work on the live server. Therefore, the programmers get the updated files within seconds.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #333333; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: verdana; font-weight: 700;&quot;&gt;Exchange messages:&lt;/span&gt;&lt;span style=&quot;color: black; font-family: verdana;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: verdana;&quot;&gt;In a WAN network, messages are transmitted fast. The web application like Facebook, Whatsapp, Skype allows you to communicate with friends.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #333333; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: verdana; font-weight: 700;&quot;&gt;Sharing of software and resources:&lt;/span&gt;&lt;span style=&quot;color: black; font-family: verdana;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: verdana;&quot;&gt;In WAN network, we can share the software and other resources like a hard drive, RAM.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #333333; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: verdana; font-weight: 700;&quot;&gt;Global business:&lt;/span&gt;&lt;span style=&quot;color: black; font-family: verdana;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: verdana;&quot;&gt;We can do the business over the internet globally.&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;h3 class=&quot;h3&quot; style=&quot;background-color: white; color: #610b4b; font-size: 21px; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Disadvantages of Wide Area Network:&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background-color: white; color: #333333; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The following are the disadvantages of the Wide Area Network:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #333333; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: black; font-weight: 700;&quot;&gt;Security issue:&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;A WAN network has more security issues as compared to LAN and MAN network as all the technologies are combined together that creates the security problem.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #333333; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: black; font-weight: 700;&quot;&gt;Needs Firewall &amp;amp; antivirus software:&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;The data is transferred on the internet which can be changed or hacked by the hackers, so the firewall needs to be used. Some people can inject the virus in our system so antivirus is needed to protect from such a virus.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #333333; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: black; font-weight: 700;&quot;&gt;High Setup cost:&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;An installation cost of the WAN network is high as it involves the purchasing of routers, switches.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #333333; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: black; font-weight: 700;&quot;&gt;Troubleshooting problems:&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;It covers a large area so fixing the problem is difficult.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; line-height: 1.3em;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/5607407084853935186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/11/computer-network-and-types-of-computer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/5607407084853935186'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/5607407084853935186'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/11/computer-network-and-types-of-computer.html' title='Computer network and Types of Computer network'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEgrSewCyCbP55LvjCPgl0d5YYtWQ9CbfWUtlo4UHEtVwqnYfyuwk5oHaTg81oSt9foYPUuT96FqXeSX-Cin0vDU4UqvorW_DjcTIgSjVIANbckFYtiSAvJj3wHdxqmYusCgxZm43yHJKUrkXlkWlEXAshqXKO0uxZwJrE7KTI1B13FI7AHvw0QTnx9L=s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-8191606738626974980</id><published>2021-11-12T10:14:00.004+05:30</published><updated>2021-11-12T11:44:08.811+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Computer Network Unit 1"/><title type='text'>Topology in Computer Network </title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana;&quot;&gt;&amp;nbsp;Topology&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Topology defines the structure of the network of how all components are interconnected to each other.There are two types of topology: Physical and Logical. Physical topology is the geometric representation of all the node in a network.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana;&quot;&gt;Types of Topology&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;There are various type of topology which are given below :&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red; font-family: verdana;&quot;&gt;1. Bus Topology&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The bus topology is designed in such a way that tell the stations are connected through a single cable known as a backbone cable.Each node is either connected to the backbone cable by drop cable or directly connected to the backbone cable.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In case of Bus topology, all devices share single communication line or cable.Bus topology may have problem while multiple hosts sending data at the same time.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;It is one of the simple forms of networking where a failure of a device does not affect the other devices. But failure of the shared communication line can make all other devices stop functioning.&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The configuration of a bus topology is quite simpler as compared to other typologies. The&amp;nbsp;backbone cable is considered as a &quot;single lane&quot; through which the message is broadcast to all the stations.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&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/a/AVvXsEiFW3Ao7AWh4npmC9ZA7k8sM5BLDLIzSIZXjmp-l66FDlDFigwwRqcDOlSCuluJgOGwASMJCxcg2iGqZHE2Gmr3Sc1auLfh8YXjDkJxR3L7yDlZccER9AlqGz6Fg9qiKfVIWrg7WaEEMpt77b73XMaF-8zK_obQIkLPOWa1bUN6JEkRdIMt6N2JfFbE=s560&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;257&quot; data-original-width=&quot;560&quot; height=&quot;147&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiFW3Ao7AWh4npmC9ZA7k8sM5BLDLIzSIZXjmp-l66FDlDFigwwRqcDOlSCuluJgOGwASMJCxcg2iGqZHE2Gmr3Sc1auLfh8YXjDkJxR3L7yDlZccER9AlqGz6Fg9qiKfVIWrg7WaEEMpt77b73XMaF-8zK_obQIkLPOWa1bUN6JEkRdIMt6N2JfFbE=s320&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: red; font-family: verdana;&quot;&gt;2. Ring Topology&lt;/span&gt;&amp;nbsp;&lt;/h3&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In ring topology, each host machine connects to exactly two other machines, creating a circular network structure. When one host tries to communicate or send message to a host which is not adjacent to it, the data travels through all intermediate hosts. To connect one more host in the existing structure, the administrator may need only one more extra cable.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The data flow is one direction means it is unidirectional.The data flow in a clockwise direction. The most conman&amp;nbsp;access method of ring topology is token passing.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Failure of any host results in failure of the whole ring.Thus, every connection in the ring is a point of failure. There are methods which employ one more backup ring.&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj4OlLoEMW12Wf9sm9W8UQCNrpzaylY0WEJO7POIvn45IQM_sVEtdknAtV4EK4CJj_zSU2140oeizKJcRowqVUqglRw4BktpMjCkKKlHZ8YcsL63_DL3e1s8oIlsR2g_Ccz_07nefvqOfAoTEc-MG8IDCVSGp-sVExFSA5BrxjVB4XpiS1tNueZXa_2=s558&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;367&quot; data-original-width=&quot;558&quot; height=&quot;210&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj4OlLoEMW12Wf9sm9W8UQCNrpzaylY0WEJO7POIvn45IQM_sVEtdknAtV4EK4CJj_zSU2140oeizKJcRowqVUqglRw4BktpMjCkKKlHZ8YcsL63_DL3e1s8oIlsR2g_Ccz_07nefvqOfAoTEc-MG8IDCVSGp-sVExFSA5BrxjVB4XpiS1tNueZXa_2=s320&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: red; font-family: verdana;&quot;&gt;3. Star Topology&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Star topology is an arrangement of the network in which every node is connected to the central device like hub, switch or router or a central computer.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The central computer is known as a server as a server, and the peripheral devices attached to the server are known as clients.&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Coaxial cable or RJ-45 cables are used to connect the computer.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;As in Bus topology, hub acts as single point of failure. If hub fails, connectivity of all hosts to all other hosts fails. Every communication between hosts, takes place through only the hub.Star topology is not expensive as to connect one more host, only one cable is required and configuration is simple.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;/p&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/a/AVvXsEgwUI07PNiU1CzAzNTWtngnTkUTgmdnGWHrLN201OLD-5BEFDoStIo9H_t-XNFado6GEf1SJeVTIDcixTt6yB9fn4xiJ5BP4cem5c56BMG82dzdqxtueVv9dQQuWQxRiQqgIKgNovUpXsmPROW3P9IVY-9S6cWHDW0FrnewRUvKyEZ4jl62byu1f3w5=s567&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;436&quot; data-original-width=&quot;567&quot; height=&quot;246&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgwUI07PNiU1CzAzNTWtngnTkUTgmdnGWHrLN201OLD-5BEFDoStIo9H_t-XNFado6GEf1SJeVTIDcixTt6yB9fn4xiJ5BP4cem5c56BMG82dzdqxtueVv9dQQuWQxRiQqgIKgNovUpXsmPROW3P9IVY-9S6cWHDW0FrnewRUvKyEZ4jl62byu1f3w5=s320&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;&lt;span style=&quot;color: red; font-family: verdana;&quot;&gt;4. Tree Topology&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Tree topology combines the characteristics&amp;nbsp;of bus topology and star topology.A tree topology is a type of structure in which all the computers are connected with each other in hierarchical fashion so it is also know as &lt;span style=&quot;color: #2b00fe;&quot;&gt;Hierarchical Topology&lt;/span&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The top most node in tree topology is know as root node, and all the other nodes are the descendants of the root node. There is only one path exist between two nodes for the data transmission. Thus it forms a parent-child hierarchy.&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; margin: 0.5em 0.2em 0.6em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;This topology divides the network in to multiple levels/layers of network. Mainly in LAN&#39;s, a network is bifurcated into three types of network devices. The lowermost is access-layer where computers are attached. The middle layer is known as distribution layer, which works as mediator between upper layer and lower layer. The highest layer is known as core layer, and is central point of the network, i.e. root of the tree from which all nodes fork.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font-size: 16px; margin: 0.5em 0.2em 0.6em; padding: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;All neighboring hosts have point-to-point connection between them.Similar to the Bus topology, if the root goes down, then the entire network suffers even.though it is not the single point of failure. Every connection serves as point of failure, failing of which divides the network into unreachable segment.&lt;/span&gt;&lt;/span&gt;&lt;/p&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/a/AVvXsEhLlpEK7coghreb0oS6t8dvfB52hzYXPr32HOx6JJVZjwseWulyQf8RFkb1AbEvDBYeZYpBqAiW6ntOzK648BPlRrIbawDj1y29fPq5Rg-Jo-7uX_zomAUwoKaSpttiO0r_GvGAfAlRoZxbJsIMeNgrwtT6PoqOcL1_Nsp47b3BPZ0aLetAdUQCeEI3=s560&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;313&quot; data-original-width=&quot;560&quot; height=&quot;228&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhLlpEK7coghreb0oS6t8dvfB52hzYXPr32HOx6JJVZjwseWulyQf8RFkb1AbEvDBYeZYpBqAiW6ntOzK648BPlRrIbawDj1y29fPq5Rg-Jo-7uX_zomAUwoKaSpttiO0r_GvGAfAlRoZxbJsIMeNgrwtT6PoqOcL1_Nsp47b3BPZ0aLetAdUQCeEI3=w386-h228&quot; width=&quot;386&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;color: red; font-family: verdana;&quot;&gt;5. Mesh Topology&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Mesh topology is an arrangement of the network in which computers are interconnected with each other through various redundant connections. there are multiple paths from one computer to another computer. It does not contain the switch, hub or any central computer which act as a central point of communication.&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The internet is the example of Mesh topology.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial, Verdana, Tahoma; font-size: 16px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 16px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Hosts in Mesh topology also work as relay for other hosts which do not have direct point-to-point links. Mesh technology comes into two types:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: rgba(0, 0, 0, 0.87); font-size: 16px; font-weight: bolder;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;&lt;span style=&quot;font-size: 16px; font-weight: bolder;&quot;&gt;Full Mesh&lt;/span&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgba(0, 0, 0, 0.87); font-size: 16px;&quot;&gt; All hosts have a point-to-point connection to every other host in the network. Thus for every new host n(n-1)/2 connections are required. It provides the most reliable network structure among all network topologies.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: rgba(0, 0, 0, 0.87); font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;color: #800180;&quot;&gt;&lt;span style=&quot;font-size: 16px; font-weight: bolder;&quot;&gt;Partially Mesh&lt;/span&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgba(0, 0, 0, 0.87); font-size: 16px;&quot;&gt; Not all hosts have point-to-point connection to every other host. Hosts connect to each other in some arbitrarily fashion. This topology exists where we need to provide reliability to some hosts out of all.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: rgba(0, 0, 0, 0.87); font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&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/a/AVvXsEgWAmRwU4qtWWiB_nSCogQ5ilPCTrUBnTE3UsJGeIGpw0t_1OS84PnR7HRjOKDC6xvc877bZlPa7yaIw8uFxDYMUCF76vOx8VRGkTxFSsHK0oA3IoueoWURcTxJx44tSMUUJ32E-a6Ud5x7Pe1Psh3L_AlKXoN_VRKBXg_8cTybIJ87EzHSB7PMlgxV=s560&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;365&quot; data-original-width=&quot;560&quot; height=&quot;209&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgWAmRwU4qtWWiB_nSCogQ5ilPCTrUBnTE3UsJGeIGpw0t_1OS84PnR7HRjOKDC6xvc877bZlPa7yaIw8uFxDYMUCF76vOx8VRGkTxFSsHK0oA3IoueoWURcTxJx44tSMUUJ32E-a6Ud5x7Pe1Psh3L_AlKXoN_VRKBXg_8cTybIJ87EzHSB7PMlgxV=s320&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;color: red; font-family: verdana;&quot;&gt;6. Hybrid Topology&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;A network structure whose design contains more than one topology is said to be hybrid topology. Hybrid topology inherits merits and demerits of all the incorporating topologies.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;When two or more different topologies are combined together is termed as Hybrid topology.&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;The above picture represents an arbitrarily hybrid topology. The combining topologies may contain attributes of Star, Ring,and Bus topologies. Internet&amp;nbsp;is the best example of largest Hybrid topology.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&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/a/AVvXsEjx1U0QDUAUH0hLu7GNm29UbaGi3atIFExLq5R4ZTQ78fng_P7omYfFCOWhtq37O1ex2Bue6jsknR0JzK4EGndQIvCYaK2GeqhD5cKvUGSdZOTd7lA_81xKXr8stXK2vgko_TpCGE4keCe7d3DiIN9o19hxZIB4SI1RYH5b4MpUXjGuJG5mW7Gs4dIH=s560&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;404&quot; data-original-width=&quot;560&quot; height=&quot;335&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjx1U0QDUAUH0hLu7GNm29UbaGi3atIFExLq5R4ZTQ78fng_P7omYfFCOWhtq37O1ex2Bue6jsknR0JzK4EGndQIvCYaK2GeqhD5cKvUGSdZOTd7lA_81xKXr8stXK2vgko_TpCGE4keCe7d3DiIN9o19hxZIB4SI1RYH5b4MpUXjGuJG5mW7Gs4dIH=w393-h335&quot; width=&quot;393&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red; font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;font-size: 16px; margin: 0.5em 0.2em 0.6em; padding: 0px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/8191606738626974980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/11/topology.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/8191606738626974980'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/8191606738626974980'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/11/topology.html' title='Topology in Computer Network '/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEiFW3Ao7AWh4npmC9ZA7k8sM5BLDLIzSIZXjmp-l66FDlDFigwwRqcDOlSCuluJgOGwASMJCxcg2iGqZHE2Gmr3Sc1auLfh8YXjDkJxR3L7yDlZccER9AlqGz6Fg9qiKfVIWrg7WaEEMpt77b73XMaF-8zK_obQIkLPOWa1bUN6JEkRdIMt6N2JfFbE=s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-3306701316095585321</id><published>2021-11-01T11:11:00.001+05:30</published><updated>2021-11-12T11:44:08.811+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Computer Network Unit 1"/><title type='text'>Data Flow</title><content type='html'>&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Devices communicate with each other by sending and receiving data. The data can flow between the two devices in the following ways.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;1. &lt;/span&gt;&lt;span style=&quot;color: #800180; font-family: verdana;&quot;&gt;Simplex Mode&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In simplex mode, communication is unidirectional. Only one of the devices sends the data and the other one only receives the data.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;A CPU send data while a monitor only receive data.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;2.&lt;span style=&quot;color: #800180;&quot;&gt; Half Duplex Mode&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span&gt;In half duplex mode both the stations can transmit as well as receive but not at the same time. When one device is sending other can only receive and vice-versa.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Example :&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;walkie-talkie&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;3. &lt;span style=&quot;color: #800180;&quot;&gt;Full-Duplex Mode&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In the full duplex mode, both stations can transmit and recieve at the same time.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #2b00fe; font-family: verdana;&quot;&gt;Example : &lt;/span&gt;&lt;span style=&quot;color: red; font-family: verdana;&quot;&gt;Mobile phones&lt;/span&gt;&lt;/h3&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/3306701316095585321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/10/data-flow.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/3306701316095585321'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/3306701316095585321'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/10/data-flow.html' title='Data Flow'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-5846341804851290444</id><published>2021-10-27T10:34:00.002+05:30</published><updated>2021-11-12T11:44:08.811+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Computer Network Unit 1"/><title type='text'>Data Representation</title><content type='html'>&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;Data is a collection of row facts which is processed to deduce information. There may be different forms in which data may be presented. Some of the forms of data used in communication are as follows-&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;1.&lt;span style=&quot;color: #800180;&quot;&gt; Text :&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;font-weight: normal;&quot;&gt;Text includes combination of&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;alphabets in small case as well as upper case. It is stored as a pattern of bits.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;2.&lt;span style=&quot;color: #800180;&quot;&gt; Numbers :&lt;/span&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&amp;nbsp;Numbers include combinations of digits from 0 to 9. It is stored as a pattern of bits.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;3.&lt;span style=&quot;font-weight: 400;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #800180;&quot;&gt;Images : &lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;A image is a worth of thousand words. In computers images are digitally stored. A pixel is the smallest element of an image. A picture or an image is a matrix of pixel elements.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #2b00fe; font-family: verdana;&quot;&gt;The pixels are represented in the form of bits. depending upon the type of an image(Black &amp;amp; White or color) each pixel would require different numbers of bits to represent the value of a pixel.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;4.&lt;/span&gt;&lt;span style=&quot;color: #800180; font-family: verdana;&quot;&gt; Audio : &lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Data can also be in the form of sound which can be recorded and &lt;/span&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;broadcasted&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;. Audio data is &lt;/span&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;continuous&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;not discrete. Example what we hear on the radio is a source of data or information.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;5.&lt;/span&gt;&lt;span style=&quot;color: #800180; font-family: verdana;&quot;&gt; Video :&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;video&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;refers to broadcasting of data in the form of picture or movie.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/5846341804851290444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/10/data-representation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/5846341804851290444'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/5846341804851290444'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/10/data-representation.html' title='Data Representation'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8657465464897069103.post-8719897689385505964</id><published>2021-10-23T10:45:00.004+05:30</published><updated>2021-11-12T11:44:08.811+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Computer Network Unit 1"/><title type='text'>Data Communication in Computer Network</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: #800180; font-size: large;&quot;&gt;Data Communication&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: verdana;&quot;&gt;The term &lt;b&gt;data communication&lt;/b&gt; comprises two words : &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Data&lt;/span&gt;&lt;/b&gt; and &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Communication&lt;/span&gt;&lt;/b&gt;.Data can be any text, image, audio, video and any multimedia files. and the communication is an act of sending and receiving data.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Thus data communication refers to the exchange of the data between two or more networked or connected devices. example of such devices include personal computers, mobile phones, laptops etc.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Data communication refers to the exchange of data between a source and a receiver via form of transmission medium such as wired cable.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The data communication is said to be local if communicating devices are in the same building or a similarly restricted geographical area.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The device that transmits the data is known as source and the device that receives the transmitted data is known as receiver.&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana; font-size: medium;&quot;&gt;Components of data communication&lt;/span&gt;&lt;/h2&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;A communication system has following components :-&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;1. &lt;span style=&quot;color: #800180;&quot;&gt;Sender&lt;/span&gt; :&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;A sender is a device which is capable of sending data over a network. It can be a computer, mobile phone, laptop, smart watch etc.&amp;nbsp;&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/h3&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;2. &lt;span style=&quot;color: #800180;&quot;&gt;Receiver&lt;/span&gt; :&lt;span style=&quot;font-weight: 400;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;It is a destination where finally message sent by source has arrived. It is a device that receives message same as sender. receiver&amp;nbsp;can also be in form of a computer, telephone, mobile , workstation etc.&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;3.&lt;span style=&quot;color: #800180;&quot;&gt; Message :&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;It is the data or information that needs to be exchanged between the sender and the receiver. Message can be in the form of text, image, audio, video, multimedia files etc.&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;4.&lt;span style=&quot;color: #800180;&quot;&gt; Transmission Medium :&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;font-weight: normal;&quot;&gt;It is the channel or physical path through which the message is carried&amp;nbsp;from sender to the receiver. The medium can be wired like twisted pair cable, fiber-optic cable etc. or wireless like laser, radio waves and microwaves.&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana; text-align: justify;&quot;&gt;5.&lt;span style=&quot;color: #800180;&quot;&gt; Protocol :&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;It is a set of rules that govern the communication between the devices. Both sender and receiver&amp;nbsp;follow same protocols to communicate with each other.&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;To govern data communication, various set of rules had been already designed by the designers of the communication system, which represent a kind of agreement between communicating devices. These are defines as protocol.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;Example&lt;/b&gt; of a data communication system is sending an email. The user which send email act as &lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;sender&lt;/b&gt;&lt;/span&gt;, &lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;message&lt;/b&gt;&lt;/span&gt; is data which user wants to send, &lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;receiver&lt;/b&gt;&lt;/span&gt; is one whom user wants to send a message, there are many protocols involved in this entire process, like SMTP(Simple Mail Transfer Protocol), both sender and receiver must have an internet connection which uses a wireless medium to send and receive email.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #800180; font-family: verdana;&quot;&gt;Characteristics of Data Communication&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The effectiveness depends on four fundamental characteristics of data communication.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red; font-family: verdana;&quot;&gt;1. Delivery : &lt;/span&gt;&lt;span style=&quot;font-family: verdana; font-weight: normal;&quot;&gt;The data must be deliver in correct order with correct destination.&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: red; font-family: verdana;&quot;&gt;2. Accuracy : &lt;/span&gt;&lt;span style=&quot;font-family: verdana; font-weight: normal;&quot;&gt;The data must be deliver accurately means no change in the content of message sent by the sender during the transmission.&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: red; font-family: verdana;&quot;&gt;3. Timeliness : &lt;/span&gt;&lt;span style=&quot;font-family: verdana; font-weight: normal;&quot;&gt;The data must be deliver in a timely manner late delivered data useless.&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: red; font-family: verdana;&quot;&gt;4. Jitter : &lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;It is the uneven delay in the packet arrival time that cause uneven &lt;/span&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;quality. Jitter&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;refers to the variation in the packet arrival time.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;b&gt;Example :&lt;/b&gt; Let us assume that video&amp;nbsp;packets are sent every 30 m.s If some of the packets arrive with 30 ms and others with 40 ms delay, an uneven quality in the video&amp;nbsp;id result.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://technicalgupta2021.blogspot.com/feeds/8719897689385505964/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/10/data-communication-in-computer-network.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/8719897689385505964'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/8657465464897069103/posts/default/8719897689385505964'/><link rel='alternate' type='text/html' href='https://technicalgupta2021.blogspot.com/2021/10/data-communication-in-computer-network.html' title='Data Communication in Computer Network'/><author><name>technical class</name><uri>http://www.blogger.com/profile/07784859424748630779</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXfc9Nd5u1Zue-h9gAhfPLxq6lRHCn2i0VbuqsrTxzCRICajOtGx01HOAEv2MNfwoT_s0gRlAGWI8WmXZuqjfjUAMMo3KeXZb3bHvZpYrNS4I00IMssgSdLh0GjXYkHs/s113/6764400d-81f3-434c-8cca-d27da990fe63.jpg'/></author><thr:total>0</thr:total></entry></feed>