<?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-2377822193400863181</id><updated>2024-09-04T20:01:03.635-07:00</updated><category term="Computer Networks"/><category term="RDBMS"/><category term="Software Engineering"/><category term="C Programming"/><category term="Algorithms"/><title type='text'>My Answerz</title><subtitle type='html'>free tutorials and answers</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>78</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-2509645687375897764</id><published>2015-05-16T09:28:00.001-07:00</published><updated>2015-05-16T09:30:53.071-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algorithms"/><title type='text'>Characteristics of an Algorithm</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;While designing an algorithm as a solution to a given problem, we must take care of the following five important &lt;strong&gt;characteristics of an algorithm&lt;/strong&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;1. Finiteness &lt;/h3&gt;An algorithm must terminate after a finite number of steps and further each step must be executable in finite amount of time. In order to establish a sequence of steps as an algorithm, it should be established that it terminates (in finite number of steps) on all allowed inputs.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;2. Definiteness (no ambiguity)&lt;/h3&gt;Each step of an algorithm must be precisely defined; the action to be carried out must be rigorously and unambiguously specified for each case. Through the next example, we show how an instruction may not be definite.&lt;br /&gt;
&lt;b&gt;Example:&lt;/b&gt; Method which is effective (to be explained later) but not definite.&lt;br /&gt;
The following is a program fragment for the example method:&lt;br /&gt;
x ← 1&lt;br /&gt;
Toss a coin,&lt;br /&gt;
If the result is Head then x ←3 else x ← 4&lt;br /&gt;
{In the above, the symbol ‘←’ denotes that the value on its R.H.S is assigned to the variable on its L.H.S. Detailed discussion under (i) of Section 1.6.1}&lt;br /&gt;
All the steps, like tossing the coin etc., can be (effectively) carried out. However, the method is not definite, as two different executions may yield different outputs.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;3. Inputs&lt;/h3&gt;An algorithm has zero or more, but only finite, number of inputs.&lt;br /&gt;
Examples of algorithms requiring zero inputs:&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Print the largest integer, say MAX, representable in the computer system being used.&lt;/li&gt;
&lt;li&gt;Print the ASCII code of each of the letter in the alphabet of the computer system being used.&lt;/li&gt;
&lt;li&gt;Find the sum S of the form 1+2+3+…, where S is the largest integer less than or equal to MAX defined in Example (i) above.&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;h3&gt;4. Output&lt;/h3&gt;An algorithm has one or more outputs. The requirement of at least one output is obviously essential, because, otherwise we cannot know the answer/solution provided by the algorithm.&lt;br /&gt;
&lt;br /&gt;
The outputs have specific relation to the inputs, where the relation is defined by the algorithm.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;5. Effectiveness&lt;/h3&gt;An algorithm should be effective. This means that each of the operation to be performed in an algorithm must be sufficiently basic that it can, in principle, be done exactly and in a finite length of time, by a person using pencil and paper. It may be noted that the ‘FINITENESS’ condition is a special case of ‘EFFECTIVENESS’. If a sequence of steps is not finite, then it cannot be effective also.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/2509645687375897764/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2015/05/characteristics-of-algorithm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/2509645687375897764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/2509645687375897764'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2015/05/characteristics-of-algorithm.html' title='Characteristics of an Algorithm'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-3725417744792313763</id><published>2015-05-16T08:12:00.000-07:00</published><updated>2015-05-16T08:12:35.788-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algorithms"/><title type='text'>Difference between Problems and Instances</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;The difference between the two concepts viz., ‘problem’ and ‘instance’, can be understood in terms of the following example. An instance of a problem is also called a question. We know that the roots of a general quadratic equation&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_-e-xg03rbXuI8i0YtfeLOmSng5jRYqX_8R_hdXXob4XSnhvfH5W6Z4xdDR4kYKvF9WgLGe2zdZBj53Fl-dHXPaLNnfIpMVfWtPdymu0Wol3aqI9VTbEO3yFogiknXarEDHsoZlZkaek/s1600/problems-instances.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_-e-xg03rbXuI8i0YtfeLOmSng5jRYqX_8R_hdXXob4XSnhvfH5W6Z4xdDR4kYKvF9WgLGe2zdZBj53Fl-dHXPaLNnfIpMVfWtPdymu0Wol3aqI9VTbEO3yFogiknXarEDHsoZlZkaek/s1600/problems-instances.png&quot; /&gt;&lt;/a&gt;&amp;nbsp;(1)&lt;/div&gt;&lt;br /&gt;
are given by the equation&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRxP7ZdHyvoV2l7QwdChujRF43HgIXG0rX8BcwsnWqrqjNina9ku-J_TLZ7RzlBeJGHDgyEadRWjrNGZ02WRW4d9CiDCxxiM0GNUcvKkfDDXpkvGktMDMdXx281noutPnKIhOa1jZ8mrA/s1600/problems-instances-2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRxP7ZdHyvoV2l7QwdChujRF43HgIXG0rX8BcwsnWqrqjNina9ku-J_TLZ7RzlBeJGHDgyEadRWjrNGZ02WRW4d9CiDCxxiM0GNUcvKkfDDXpkvGktMDMdXx281noutPnKIhOa1jZ8mrA/s1600/problems-instances-2.png&quot; /&gt;&lt;/a&gt;&amp;nbsp;(2)&lt;/div&gt;&lt;br /&gt;
where a, b, c may be any real numbers except the restriction that a ≠ 0.&lt;br /&gt;
&lt;br /&gt;
Now, if we take a = 3, b = 4 and c = 1, we get the particular equation&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOWxFhvvXvv4VHSsYo25mTaUUr2_Eyjj5Wen5l3KvdPGuEKRqMxxXeyFS28P2j0bTsMGNrk76dPp4Yl08nO97oWmG2002eu1_ZAVtiH5PqYVANCtIdSXuaz5vCuO3Xv-AG5N33PNT3hEU/s1600/problems-instances-3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOWxFhvvXvv4VHSsYo25mTaUUr2_Eyjj5Wen5l3KvdPGuEKRqMxxXeyFS28P2j0bTsMGNrk76dPp4Yl08nO97oWmG2002eu1_ZAVtiH5PqYVANCtIdSXuaz5vCuO3Xv-AG5N33PNT3hEU/s1600/problems-instances-3.png&quot; /&gt;&lt;/a&gt;&amp;nbsp;(3)&lt;/div&gt;&lt;br /&gt;
Using (2), the roots of (3) are given by&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitNm_401USL5q1W1JCglbPGmuWPF9weExjf36CoVWLpE0G7cqHuLmqm-YSKXHJE-Vl-7lK1MHP9LLTkjEKpqba879untraVpBr6Fz8VXZDHAyvWrkLhaUSEIYISlghCtLI8Ep3tnek3_8/s1600/problems-instances-4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitNm_401USL5q1W1JCglbPGmuWPF9weExjf36CoVWLpE0G7cqHuLmqm-YSKXHJE-Vl-7lK1MHP9LLTkjEKpqba879untraVpBr6Fz8VXZDHAyvWrkLhaUSEIYISlghCtLI8Ep3tnek3_8/s1600/problems-instances-4.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
With reference to the above discussion, the issue of finding roots of the general quadratic equation ax2 + bx + c = 0, with a ≠ 0 is called a problem, whereas the issue&lt;br /&gt;
of finding the roots of the particular equation &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOWxFhvvXvv4VHSsYo25mTaUUr2_Eyjj5Wen5l3KvdPGuEKRqMxxXeyFS28P2j0bTsMGNrk76dPp4Yl08nO97oWmG2002eu1_ZAVtiH5PqYVANCtIdSXuaz5vCuO3Xv-AG5N33PNT3hEU/s1600/problems-instances-3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOWxFhvvXvv4VHSsYo25mTaUUr2_Eyjj5Wen5l3KvdPGuEKRqMxxXeyFS28P2j0bTsMGNrk76dPp4Yl08nO97oWmG2002eu1_ZAVtiH5PqYVANCtIdSXuaz5vCuO3Xv-AG5N33PNT3hEU/s1600/problems-instances-3.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
is called a question or an instance of the (general) problem.&lt;br /&gt;
&lt;br /&gt;
In general, a problem may have a large, possibly infinite, number of instances. The above-mentioned problem of finding the roots of the quadratic equation&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0R4BUShVHG6Um2uxZllg1SdsTvrrELFPyZIGS-V6PnBvSHIjH4nu1Mfd74B2BT4_j5G4NqUW8Bk8DHr4Sc9IC6hN_MMzpe6FzRQz-v9xggJ1Ni2kJEfP4OPClI1t-1fV865RTRVrjux4/s1600/problems-instances-5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0R4BUShVHG6Um2uxZllg1SdsTvrrELFPyZIGS-V6PnBvSHIjH4nu1Mfd74B2BT4_j5G4NqUW8Bk8DHr4Sc9IC6hN_MMzpe6FzRQz-v9xggJ1Ni2kJEfP4OPClI1t-1fV865RTRVrjux4/s1600/problems-instances-5.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
with a ≠ 0, b and c as real numbers, has infinitely many instances, each obtained by giving some specific real values to a, b and c, taking care that the value assigned to a is not zero. However, all problems may not be of generic nature. For some problems, there may be only one instance/question corresponding to each of the problems. For example, the problem of finding out the largest integer that can be stored or can be arithmetically operated on, in a given computer, is a single-instance problem. Many of the interesting problems like the ones given below, are just single-instance problems.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/3725417744792313763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2015/05/difference-between-problems-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/3725417744792313763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/3725417744792313763'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2015/05/difference-between-problems-and.html' title='Difference between Problems and Instances'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_-e-xg03rbXuI8i0YtfeLOmSng5jRYqX_8R_hdXXob4XSnhvfH5W6Z4xdDR4kYKvF9WgLGe2zdZBj53Fl-dHXPaLNnfIpMVfWtPdymu0Wol3aqI9VTbEO3yFogiknXarEDHsoZlZkaek/s72-c/problems-instances.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-2107184605592333595</id><published>2015-05-16T07:46:00.000-07:00</published><updated>2015-05-17T04:52:49.593-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algorithms"/><title type='text'>Euclid’s Algorithm for Finding G.C.D. of two Natural Numbers m &amp; n</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;E1. {Find Remainder}. Divide m by n and let r be the (new) remainder {r have 0≤r&amp;lt;n}&lt;br /&gt;
E2. {Is r zero?} If r = 0, the algorithm terminates and n is the answer. Otherwise,&lt;br /&gt;
E3. {Interchange}. Let the new value of m be the current value of n and the new value of n be the current value of r. Go back to Step E1.&lt;br /&gt;
&lt;br /&gt;
The termination of the above method is guaranteed, as m and n must reduce in each iteration and r must become zero in finite number of repetitions of steps E1, E2 and E3.&lt;br /&gt;
&lt;br /&gt;
The great Greek mathematician Euclid sometimes between fourth and third century BC, at least knew and may be the first to suggest, the above algorithm. The algorithm is considered as among the first non-trivial algorithms. However, the word ‘algorithm’ itself came into usage quite late. The word is derived from the name of the Persian mathematician Mohammed al-Khwarizmi who lived during the ninth century A.D. The word ‘al-khowarizmi’ when written in Latin became ‘Algorismus’, from which ‘algorithm’ is a small step away.&lt;br /&gt;
&lt;br /&gt;
In order to familiarise ourselves with the notation usually used to express algorithms, next, we express the Euclid’s Algorithm in a pseudo-code notation which is closer to a programming language.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Algorithm GCD-Euclid (m, n)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre name=&quot;code&quot; class=&quot;c-sharp&quot;&gt;{This algorithm computes the greatest common divisor of two given positive integers}
begin {of algorithm}
while n ≠ 0 do
begin {of while loop}
r ← m mod n;
{a new variable is used to store the remainder which is obtained by dividing m by n, with 0≤ r &amp;lt; m}
m ←n;
{the value of n is assigned as new value of m; but at this stage value of n remains unchanged}
n← r;
{the value of r becomes the new value of n and the value of r remains unchanged}
end {of while loop}
return (n).
end; {of algorithm}
&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/2107184605592333595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2015/05/euclids-algorithm-for-finding-gcd-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/2107184605592333595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/2107184605592333595'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2015/05/euclids-algorithm-for-finding-gcd-of.html' title='Euclid’s Algorithm for Finding G.C.D. of two Natural Numbers m &amp; n'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-7154079278296143422</id><published>2015-05-16T07:24:00.000-07:00</published><updated>2015-05-16T07:24:15.904-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algorithms"/><title type='text'>Notation for expressing algorithms</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This issue of notation for representations of algorithms will be discussed in some detail, later. However, mainly, some combinations of mathematical symbols, English phrases and sentences, and some sort of pseudo-high-level language notations, shall be used for the purpose.&lt;br /&gt;
&lt;br /&gt;
Particularly, the symbol ‘←’ is used for assignment. For example, x←y + 3, means that 3 is added to the value of the variable y and the resultant value becomes the new value of the variable x. However, the value of y remains unchanged.&lt;br /&gt;
&lt;br /&gt;
If in an algorithm, more than one variables are required to store values of the same type, notation of the form A[1..n] is used to denote n variables A[1], A[2], … A[n].&lt;br /&gt;
&lt;br /&gt;
In general, for the integers m, n with m ≤ n, A [m..n] is used to denote the variables A[m], A[m+1], …, A[n]. However, we must note that another similar notation A[m, n] is used to indicate the element of the matrix (or twodimensional array) A, which is in mth row and nth column.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Role and Notation for Comments&lt;/h3&gt;
The comments do not form that part of an algorithm, corresponding to which there is an (executable) action in the process. However, the comments help the human reader of the algorithm to better understand the algorithm. In different programming languages, there are different notations for incorporating comments in algorithms. We use the convention of putting comments between pair of braces, i.e., { } . The comments may be inserted at any place within an algorithm. For example, if an algorithm finds roots of a quadratic equation, then we may add the following comments, somewhere in the beginning of the algorithm, to tell what the algorithm does:&lt;br /&gt;
&lt;br /&gt;
{this algorithm finds the roots of a quadratic equation in which the coefficient of x2 is assumed to be non-zero}.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/7154079278296143422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2015/05/notation-for-expressing-algorithms.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/7154079278296143422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/7154079278296143422'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2015/05/notation-for-expressing-algorithms.html' title='Notation for expressing algorithms'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-175595845437105694</id><published>2012-12-19T15:32:00.000-08:00</published><updated>2012-12-19T15:32:09.671-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Software Engineering"/><title type='text'>Capability Maturity Models, Maturity Levels &amp; their Key Process Areas</title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNObrE2bdf_sG7Bs0R2Q7-N3yCkhIyyAClA8nowYKxZJ2t6VOrVIu-7EH1zswbAA516tDLHDlDi_COyGz6nYnJhN2BJcAhnAgLtsny-4cpZsZp4mD0Zhk9v7lJdMff9c2Zs6-J_HOqFcw/s1600/Capability_Maturity_Models.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img alt=&quot;Capability Maturity Models, Maturity Levels &amp; their Key Process Areas&quot; border=&quot;0&quot; height=&quot;370&quot; width=&quot;440&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNObrE2bdf_sG7Bs0R2Q7-N3yCkhIyyAClA8nowYKxZJ2t6VOrVIu-7EH1zswbAA516tDLHDlDi_COyGz6nYnJhN2BJcAhnAgLtsny-4cpZsZp4mD0Zhk9v7lJdMff9c2Zs6-J_HOqFcw/s600/Capability_Maturity_Models.gif&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The process models are based on various software development phases whereas the capability models have an entirely different basis of development. They are based upon the capabilities of software. It was developed by Software Engineering Institute (SEI). In this model, significant emphasis is given to the techniques to improve the “software quality” and “process maturity”. In this model a strategy for improving Software process is devised. It is not concerned which life cycle mode is followed for development. SEI has laid guidelines regarding the capabilities an organization should have to reach different levels of process maturity. This approach evaluates the global effectiveness of a software company.&lt;br /&gt;
&lt;h3&gt;Maturity Levels&lt;/h3&gt;It defines five maturity levels as described below. Different organizations are certified for different levels based on the processes they follow.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Level 1 (Initial): &lt;/b&gt;At this maturity level, software is developed an ad hoc basis and no strategic approach is used for its development. The success of developed software entirely depends upon the skills of the team members. As no sound engineering approach is followed, the time and cost of the project are not critical issues. In Maturity Level 1 organizations, the software process is unpredictable, because if the developing team changes, the process will change. The testing of software is also very simple and accurate predictions regarding software quality are not possible.&lt;br /&gt;
&lt;br /&gt;
SEI’s assessment indicates that the vast majority of software organizations are Level 1 organizations.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Level 2 (Repeatable):&lt;/b&gt; The organization satisfies all the requirements of level-1. At this level, basic project management policies and related procedures are established.&lt;br /&gt;
&lt;br /&gt;
The institutions achieving this maturity level learn with experience of earlier projects and reutilize the successful practices in on-going projects. The effective process can be characterized as practiced, documented, implemented and trained. In this maturity level, the manager provides quick solutions to the problem encountered in software development and corrective action is immediately taken. Hence, the process of development is much disciplined in this maturity level. Thus, without measurement, sufficiently realistic estimates regarding cost, schedules and functionality are performed. The organizations of this maturity level have installed basic management controls.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Level 3 (Defined): &lt;/b&gt;The organization satisfies all the requirements of level-2. At this maturity level, the software development processes are well defined, managed and documented. Training is imparted to staff to gain the required knowledge. The standard practices are simply tailored to create new projects.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Level 4 (Managed):&lt;/b&gt; The organization satisfies all the requirements of level-3. At this level quantitative standards are set for software products and processes. The project analysis is done at integrated organizational level and collective database is created.&lt;br /&gt;
&lt;br /&gt;
The performance is measured at integrated organization level. The Software development is performed with well defined instruments. The organization’s capability at Level 4 is “predictable” because projects control their products and processes to ensure their performance within quantitatively specified limits. The quality of software is high.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Level 5 (Optimizing):&lt;/b&gt; The organization satisfies all the requirements of level-4. This is last level. The organization at this maturity level is considered almost perfect. At this level, the entire organization continuously works for process improvement with the help of quantitative feedback obtained from lower level. The organization analyses its weakness and takes required corrective steps proactively to prevent the errors.&lt;br /&gt;
&lt;br /&gt;
Based on the cost benefit analysis of new technologies, the organization changes their Software development processes.&lt;br /&gt;
&lt;h3&gt;Key Process Areas&lt;/h3&gt;The SEI has associated key process areas (KPAs) with each maturity level. The KPA is an indicative measurement of goodness of software engineering functions like project planning, requirements management, etc. The KPA consists of the following parameters:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Goals: &lt;/b&gt;Objectives to be achieved.&lt;br /&gt;
&lt;b&gt;Commitments: &lt;/b&gt;The requirements that the organization should meet to ensure the claimed quality of product.&lt;br /&gt;
&lt;b&gt;Abilities: &lt;/b&gt;The capabilities an organization has.&lt;br /&gt;
&lt;b&gt;Activities:&lt;/b&gt; The specific tasks required to achieve KPA function.&lt;br /&gt;
&lt;b&gt;Methods for varying implementation:&lt;/b&gt; It explains how the KPAs can be verified.&lt;br /&gt;
&lt;br /&gt;
18 KPAs are defined by SEI and associated with different maturity levels. These are described below:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Level 1 KPAs:&lt;/b&gt; There is no key process area at Level 1.&lt;br /&gt;
&lt;b&gt;Level 2 KPAs:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Software Project Planning: Gives concrete plans for software management.&lt;/li&gt;
&lt;li&gt;Software Project Tracing &amp;amp; Oversight: Establish adequate visibility into actual process to enable the organization to take immediate corrective steps if Software performance deviates from plans.&lt;/li&gt;
&lt;li&gt;Requirements Management: The requirements are well specified to develop a contract between developer and customer.&lt;/li&gt;
&lt;li&gt;Software Subcontract Management: Select qualified software subcontractors and manage them effectively.&lt;/li&gt;
&lt;li&gt;Software Quality Assurance (SQA): To Assure the quality of developed product.&lt;/li&gt;
&lt;li&gt;Software Configuration Management (SCM): Establish &amp;amp; maintain integrity throughout the lifecycle of project.&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Level 3 KPAs:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Organization Process Focus (OPF): The organizations responsibility is fixed for software process activities that improve the ultimate software process capability.&lt;/li&gt;
&lt;li&gt;Training Program (TP): It imparts training to develop the skills and knowledge of organization staff.&lt;/li&gt;
&lt;li&gt;Organization Process Definition (OPD): It develops a workable set of software process to enhance cumulative long term benefit of organization by improving process performance.&lt;/li&gt;
&lt;li&gt;Integrated Software Management (ISM): The software management and software engineering activities are defined and a tailor made standard and software process suiting to organizations requirements is developed.&lt;/li&gt;
&lt;li&gt;Software Product Engineering (SPE): Well defined software engineering activities are integrated to produce correct, consistent software products effectively and efficiently.&lt;/li&gt;
&lt;li&gt;Inter group co-ordination (IC): To satisfy the customer’s needs effectively and efficiently, Software engineering groups are created. These groups participate actively with other groups.&lt;/li&gt;
&lt;li&gt;Peer reviews (PR): They remove defects from software engineering work products.&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Level 4 KPAs:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Quantitative Process Management (QP): It defines quantitative standards for software process.&lt;/li&gt;
&lt;li&gt;Software Quality Management (SQM): It develops quantitative understanding of the quality of Software products and achieves specific quality goals.&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Level 5 KPAs:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Defect Prevention (DP): It discovers the causes of defects and devises the techniques which prevent them from recurring.&lt;/li&gt;
&lt;li&gt;Technology Change Management (TCM): It continuously upgrades itself according to new tools, methods and processes.&lt;/li&gt;
&lt;li&gt;Process Change Management (PCM): It continually improves the software processes used in organization to improve software quality, increase productivity and decrease cycle time for product development.&lt;/li&gt;
&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/175595845437105694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2012/12/capability-maturity-models-maturity.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/175595845437105694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/175595845437105694'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2012/12/capability-maturity-models-maturity.html' title='Capability Maturity Models, Maturity Levels &amp; their Key Process Areas'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNObrE2bdf_sG7Bs0R2Q7-N3yCkhIyyAClA8nowYKxZJ2t6VOrVIu-7EH1zswbAA516tDLHDlDi_COyGz6nYnJhN2BJcAhnAgLtsny-4cpZsZp4mD0Zhk9v7lJdMff9c2Zs6-J_HOqFcw/s72-c/Capability_Maturity_Models.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-958025818516172464</id><published>2012-12-07T06:30:00.000-08:00</published><updated>2012-12-07T06:30:18.840-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Software Engineering"/><title type='text'>Spiral Model - Software Development Models</title><content type='html'>This model can be considered as the model, which combines the strengths of various other models. Conventional software development processes do not take uncertainties into account. Important software projects have failed because of unforeseen risks.&lt;br /&gt;
&lt;br /&gt;
The other models view the software process as a linear activity whereas this model considers it as a spiral process. This is made by representing the iterative development cycle as an expanding spiral.&lt;br /&gt;
&lt;br /&gt;
The following are the primary activities in this model:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;b&gt;Finalizing Objective:&lt;/b&gt; The objectives are set for the particular phase of the project.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Risk Analysis:&lt;/b&gt; The risks are identified to the extent possible. They are analyzed and necessary steps are taken.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Development: &lt;/b&gt;Based on the risks that are identified, an SDLC model is selected and is followed.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Planning: &lt;/b&gt;At this point, the work done till this time is reviewed. Based on the review, a decision regarding whether to go through the loop of spiral again or not will be decided. If there is need to go, then planning is done accordingly.&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;br /&gt;
In the spiral model, these phases are followed iteratively. The following figure depicts the Boehm’s Spiral Model (IEEE, 1988).&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5opOKP_khI6IAHptiN26s9CdQqykGLk3JOm3Hv7SDWBLx79Y-lIL-YeRIM4ofdpPbzPQdIsqLgN0-2YNrYiw_fm9XSosuOpeUWvnlTJiqYpcGLS0_QpX42G27cnzDCozIF-qswioAprI/s1600/spiral-model-img.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Spiral Model - Software Development Models&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5opOKP_khI6IAHptiN26s9CdQqykGLk3JOm3Hv7SDWBLx79Y-lIL-YeRIM4ofdpPbzPQdIsqLgN0-2YNrYiw_fm9XSosuOpeUWvnlTJiqYpcGLS0_QpX42G27cnzDCozIF-qswioAprI/s1600/spiral-model-img.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
In this model Software development starts with lesser requirements specification, lesser risk analysis, etc. The radical dimension this model represents cumulative cost. The angular dimension represents progress made in completing the cycle.&lt;br /&gt;
&lt;br /&gt;
The inner cycles of the spiral model represent early phases of requirements analysis and after prototyping of software, the requirements are refined.&lt;br /&gt;
&lt;br /&gt;
In the spiral model, after each phase a review is performed regarding all products developed upto that point and plans are devised for the next cycle. This model is a realistic approach to the development of large scale software. It suggests a systematic approach according to classical life cycle, but incorporates it into iterative framework. It gives a direct consideration to technical risks. Thus, for high risk projects, this model is very useful. The risk analysis and validation steps eliminate errors in early phases of development.</content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/958025818516172464/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2012/12/spiral-model-software-development-models.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/958025818516172464'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/958025818516172464'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2012/12/spiral-model-software-development-models.html' title='Spiral Model - Software Development Models'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5opOKP_khI6IAHptiN26s9CdQqykGLk3JOm3Hv7SDWBLx79Y-lIL-YeRIM4ofdpPbzPQdIsqLgN0-2YNrYiw_fm9XSosuOpeUWvnlTJiqYpcGLS0_QpX42G27cnzDCozIF-qswioAprI/s72-c/spiral-model-img.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-2382168070910529338</id><published>2012-12-06T14:01:00.001-08:00</published><updated>2012-12-06T14:02:52.855-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Software Engineering"/><title type='text'>Prototyping Model - Software Development Models</title><content type='html'>In &lt;b&gt;Prototyping Model&lt;/b&gt;, a working model of actual software is developed initially. The prototype is just like sample software having lesser functional capabilities and low reliability and it does not undergo through the rigorous testing phase. Developing a working prototype in the first phase overcomes the disadvantage of the waterfall model where the reporting about serious errors is possible only after completion of software development.&lt;br /&gt;
&lt;br /&gt;
The working prototype is given to the customer for operation. The customer, after its use, gives the feedback. Analyzing the feedback given by the customer, the developer refines, adds the requirements and prepares the final specification document. Once the prototype becomes operational, the actual product is developed using the normal waterfall model.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiybhfYcQDiB18uPrMYj79qggYBUQE_t4Aaz8XT_8Nax2KMUbvj-Bzb5Pu1scZZkQJtmYrcHc-1WFgujs6hbJJCM_uTLVXLc9yqbPyM3A9MCuE5vlEY35xyHvJnnNIp5C8hVtiLaX0heXw/s1600/Prototyping+model.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img alt=&quot;Prototyping Model&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiybhfYcQDiB18uPrMYj79qggYBUQE_t4Aaz8XT_8Nax2KMUbvj-Bzb5Pu1scZZkQJtmYrcHc-1WFgujs6hbJJCM_uTLVXLc9yqbPyM3A9MCuE5vlEY35xyHvJnnNIp5C8hVtiLaX0heXw/s1600/Prototyping+model.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
The prototype model has the following features:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;It helps in determining user requirements more deeply.&lt;/li&gt;
&lt;li&gt;At the time of actual product development, the customer feedback is available.&lt;/li&gt;
&lt;li&gt;It does consider any types of risks at the initial level.&lt;/li&gt;
&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/2382168070910529338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2012/12/prototyping-model-software-development.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/2382168070910529338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/2382168070910529338'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2012/12/prototyping-model-software-development.html' title='Prototyping Model - Software Development Models'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiybhfYcQDiB18uPrMYj79qggYBUQE_t4Aaz8XT_8Nax2KMUbvj-Bzb5Pu1scZZkQJtmYrcHc-1WFgujs6hbJJCM_uTLVXLc9yqbPyM3A9MCuE5vlEY35xyHvJnnNIp5C8hVtiLaX0heXw/s72-c/Prototyping+model.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-48976199952450529</id><published>2012-12-06T13:09:00.000-08:00</published><updated>2012-12-06T14:03:51.904-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Software Engineering"/><title type='text'>Iterative Enhancement Model - Software Development Models</title><content type='html'>&lt;b&gt;Iterative Enhancement Model&lt;/b&gt; was developed to remove the shortcomings of &lt;a href=&quot;http://myanswerz.blogspot.in/2012/12/waterfall-model.html&quot;&gt;waterfall model&lt;/a&gt;. In this model, the phases of software development remain the same, but the construction and delivery is done in the iterative mode. In the first iteration, a less capable product is developed and delivered for use. This product satisfies only a subset of the requirements. In the next iteration, a product with incremental features is developed.&lt;br /&gt;
&lt;br /&gt;
Every iteration consists of all phases of the waterfall model. The complete product is divided into releases and the developer delivers the product release by release.&lt;br /&gt;
&lt;br /&gt;
Figure 1 depicts the Iterative Enhancement Model.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEobrpnCD77I9eVepym61GChRb9AdHMeG0-tstOAHHXNqchsBZ6zOzTgftSBDBZd5gBtycp9ZpZbLWPxRZG9zdRcZFBcXJ3sY5qBAFMnGQkA1bybm4DSe1XdOYOS55Q_fMEYnxGxqsylc/s1600/Iterative+Enhancement+Model.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img alt=&quot;Iterative Enhancement Model&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEobrpnCD77I9eVepym61GChRb9AdHMeG0-tstOAHHXNqchsBZ6zOzTgftSBDBZd5gBtycp9ZpZbLWPxRZG9zdRcZFBcXJ3sY5qBAFMnGQkA1bybm4DSe1XdOYOS55Q_fMEYnxGxqsylc/s1600/Iterative+Enhancement+Model.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
This model is useful when less manpower is available for software development and the release deadlines are tight. It is best suited for in-house product development, where it is ensured that the user has something to start with. The main disadvantage of this model is that iteration may never end, and the user may have to endlessly wait for the final product. The cost estimation is also tedious because it is difficult to relate the software development cost with the number of requirements.&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/48976199952450529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2012/12/iterative-enhancement-model-software.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/48976199952450529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/48976199952450529'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2012/12/iterative-enhancement-model-software.html' title='Iterative Enhancement Model - Software Development Models'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEobrpnCD77I9eVepym61GChRb9AdHMeG0-tstOAHHXNqchsBZ6zOzTgftSBDBZd5gBtycp9ZpZbLWPxRZG9zdRcZFBcXJ3sY5qBAFMnGQkA1bybm4DSe1XdOYOS55Q_fMEYnxGxqsylc/s72-c/Iterative+Enhancement+Model.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-415103495734681459</id><published>2012-12-05T16:10:00.003-08:00</published><updated>2012-12-06T14:04:55.821-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Software Engineering"/><title type='text'>Waterfall Model - Software Development Model</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;It is the simplest, oldest and most widely used process model. In this model, each phase of the life cycle is completed before the start of a new phase. It is actually the first engineering approach of software development.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Figure 1&lt;/i&gt; depicts Water Fall Model.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAA_BMeRDLNAiL3gbb1bppR_9u_-1FLrLpFtaXzB9ftCNfDu-jeY2VY5Je2DNVvwHb4_uUwNXBP_h64LIIO_UnFzAP9l53VDWT4eyspWnLCkLFL_EPxOCFwsjuwz_Oz7ZZ0e180WILjek/s1600/waterfall-model.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAA_BMeRDLNAiL3gbb1bppR_9u_-1FLrLpFtaXzB9ftCNfDu-jeY2VY5Je2DNVvwHb4_uUwNXBP_h64LIIO_UnFzAP9l53VDWT4eyspWnLCkLFL_EPxOCFwsjuwz_Oz7ZZ0e180WILjek/s1600/waterfall-model.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;Figure 1 : Waterfall model&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The functions of various phases are discussed in software process technology.&lt;br /&gt;
&lt;br /&gt;
The waterfall model provides a systematic and sequential approach to software development and is better than the build and fixes approach. But, in this model, complete requirements should be available at the time of commencement of the project, but in actual practice, the requirements keep on originating during different phases. The water fall model can accommodate the new requirements only in maintenance phase. Moreover, it does not incorporate any kind of risk assessment. In waterfall model, a working model of software is not available. Thus, there are no methods to judge the problems of software in between different phases.&lt;br /&gt;
&lt;br /&gt;
A slight modification of the waterfall model is a model with feedback. Once software is developed and is operational, then the feedback to various phases may be given.&lt;br /&gt;
&lt;br /&gt;
Figure 2 depicts the Water Fall Model with feedback.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihgzFZ8IfnpfQLpgIJa53Fnmb32oEHHWbxDsJqrfol5pU6vrkIvb7qB4yIyHLo47l2nUhD9HWMqG4pwSq6uoXg5MGlabeHaiA6vm77tge-rO7x2dj6EndSigSDcz83uW3UW9v_h-YXb8o/s1600/waterfall-model-with-feedback.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihgzFZ8IfnpfQLpgIJa53Fnmb32oEHHWbxDsJqrfol5pU6vrkIvb7qB4yIyHLo47l2nUhD9HWMqG4pwSq6uoXg5MGlabeHaiA6vm77tge-rO7x2dj6EndSigSDcz83uW3UW9v_h-YXb8o/s1600/waterfall-model-with-feedback.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;Figure 2 : Water Fall Model with feedback.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/415103495734681459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2012/12/waterfall-model.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/415103495734681459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/415103495734681459'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2012/12/waterfall-model.html' title='Waterfall Model - Software Development Model'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAA_BMeRDLNAiL3gbb1bppR_9u_-1FLrLpFtaXzB9ftCNfDu-jeY2VY5Je2DNVvwHb4_uUwNXBP_h64LIIO_UnFzAP9l53VDWT4eyspWnLCkLFL_EPxOCFwsjuwz_Oz7ZZ0e180WILjek/s72-c/waterfall-model.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-8978771955902693514</id><published>2012-12-05T15:11:00.000-08:00</published><updated>2012-12-05T15:11:26.318-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Software Engineering"/><title type='text'>Importance of Software Engineering</title><content type='html'>As the application domains of software are becoming complicated and design of big software without a systematic approach is virtually impossible, the field of software engineering is increasingly gaining importance. It is now developing like an industry. Thus, the industry has to answer following or similar queries of clients:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;  &lt;li&gt;What is the best approach to design of software?&lt;/li&gt;
  &lt;li&gt; Why the cost of software is too high?&lt;/li&gt;
  &lt;li&gt; Why can&amp;rsquo;t we find all errors?&lt;/li&gt;
  &lt;li&gt; Why is there always some gap between claimed performance and  actual performance?&lt;/li&gt;
&lt;/ol&gt;To answer all such queries, software development has adopted a systematic approach. Software development should not remain an art. Scientific basis for cost, duration, risks, defects etc. are required. For quality assurance, product qualities and process qualities and must be made measurable as far as possible by developing metrics for them.&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/8978771955902693514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2012/12/importance-of-software-engineering.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/8978771955902693514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/8978771955902693514'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2012/12/importance-of-software-engineering.html' title='Importance of Software Engineering'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-735330538510778810</id><published>2012-12-05T14:26:00.001-08:00</published><updated>2012-12-05T14:26:22.721-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Software Engineering"/><title type='text'>Difference between Software and Other Engineering Products</title><content type='html'>Software Engineering deals with the development of software. Hence, understanding the basic characteristics of software is essential. Software is different from other engineering products in the following ways:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;  &lt;li&gt;Engineering products once developed cannot be changed. To modifications the product, redesigning and remanufacturing is required. In the case of software, ultimately changes are to be done in code for any changes to take effect.&lt;/li&gt;
  &lt;li&gt;The Other Engineering products are visible but the software as such is not visible. That’s why, it is said that software is developed, but not manufactured. Though, like other products, it is first designed, then produced, it cannot be manufactured automatically on an assembly line like other engineering products. Nowadays, CASE (Computer Aided Software Engineering) tools are available for software development. Still it depends on the programmer’s skill and creativity. The creative skills of the programmer are difficult to quantify and standardize. Hence, the same software developed by different programmers may take varying amount of time, resources and may have variable cost.&lt;/li&gt;
  &lt;li&gt;Software does not fail in the traditional sense. The engineering products have wear and tear in the operation. Software can be run any number of times without wear and tear. The software is considered as failed if:&lt;br /&gt;
    a) It does not operate correctly.&lt;br /&gt;
    b) Does not provide the required number of features.&lt;/li&gt;
  &lt;li&gt;Engineering products can be perfectly designed, but in the case of software, however good the design, it can never be 100% error free. Even the best quality software is not completely error free. Software is called good quality software if it performs the required operation, even if it has a few errors.&lt;/li&gt;
  &lt;li&gt;The testing of normal engineering products and software engineering products are on different parameters. In the former, it can be full load testing, etc., whereas in the case of software, testing means identification of test cases in which software may fail. Thus, testing of software means running of software for different inputs. By testing, the presence of errors is identified.&lt;/li&gt;
  &lt;li&gt;Unlike most of the other engineering products, software can be reused. Once a piece of code is written for some application, it can be reused.&lt;/li&gt;
  &lt;li&gt;The management of software development projects is a highly demanding task, since it involves the assessment of the developer’s creative skills. The estimation regarding the time and cost of software needs standardization of developers creativity, which can be a variable quantity. It means that software projects cannot be managed like engineering products. The correction of a bug in the case of software may take hours but, it may not be the case with normal engineering products.&lt;/li&gt;
  &lt;li&gt;The Software is not vulnerable to external factors like environmental effects. But the same external factors may harm hardware. The hardware component may be replaced with spare parts in the case of failure, whereas the failure of a software component may indicate the errors in design.&lt;/li&gt;
&lt;/ol&gt;Thus, the characteristics of software are quite different from other engineering products. Hence, the software industry is quite different from other industries.&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/735330538510778810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2012/12/Difference-between-Software-Other-Engineering-Products.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/735330538510778810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/735330538510778810'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2012/12/Difference-between-Software-Other-Engineering-Products.html' title='Difference between Software and Other Engineering Products'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-8515873734569351596</id><published>2012-12-05T14:00:00.002-08:00</published><updated>2012-12-05T14:01:51.111-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Software Engineering"/><title type='text'>Evolution of Software Engineering</title><content type='html'>Any application on computer runs through software. As computer technologies have changed tremendously in the last five decades, accordingly, the software development has undergone significant changes in the last few decades of 20th century. In the early years, the software size used to be small and those were developed either by a single programmer or by a small programming team. The program development was dependent on the programmer’s skills and no strategic software practices were present. In the early 1980s, the size of software and the application domain of software increased. Consequently, its complexity has also increased. Bigger teams were engaged in the development of Software. The software development became more bit organized and software development management practices came into existence.&lt;br /&gt;
&lt;br /&gt;
In this period, higher order programming languages like PASCAL and COBOL came into existence. The use of these made programming much easier. In this decade, some structural design practices like top down approach were introduced. The concept of quality assurance was also introduced. However, the business aspects like cost estimation, time estimation etc. of software were in their elementary stages.&lt;br /&gt;
&lt;br /&gt;
In the late 1980s and 1990s, software development underwent revolutionary changes. Instead of a programming team in an organization, full-fledged software companies evolved (called software houses). A software houses primary business is to produce software. As software house may offer a range of services, including hiring out of suitably qualified personnel to work within client’s team, consultancy and a complete system design and development service. The output of these companies was ‘Software’. Thus, they viewed the software as a product and its functionality as a process. The concept of software engineering was introduced and Software became more strategic, disciplined and commercial. As the developer of Software and user of Software became separate organization, business concepts like software costing, Software quality, laying of well-defined requirements, Software reliability, etc., came into existence. In this phase an entirely new computing environments based on a knowledge-based systems get created. Moreover, a powerful new concept of object-oriented programming was also introduced.&lt;br /&gt;
&lt;br /&gt;
The production of software became much commercial. The software development tools were devised. The concept of Computer Aided Software Engineering (CASE) tools came into existence. The software development became faster with the help of  CASE tools.&lt;br /&gt;
&lt;br /&gt;
The latest trend in software engineering includes the concepts of software reliability, reusability, scalability etc. More and more importance is now given to the quality of the software product. Just as automobile companies try to develop good quality automobiles, software companies try to develop good quality Software. The software creates the most valuable product of the present era, i.e., information.&lt;br /&gt;
&lt;br /&gt;
The following Table summarizes the evolution of software:&lt;br /&gt;
&lt;table style=&quot;width: 100%px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;     &lt;td&gt;1960s Infancy&lt;/td&gt;     &lt;td&gt;Machine Code&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;1970s Project Years&lt;/td&gt;     &lt;td&gt;Higher Order Languages&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;1980s Project Years&lt;/td&gt;     &lt;td&gt;Project Development&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;1990s Process and Production Era&lt;/td&gt;     &lt;td&gt;Software Reuse&lt;/td&gt;   &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/8515873734569351596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2012/12/evolution-of-software-engineering.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/8515873734569351596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/8515873734569351596'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2012/12/evolution-of-software-engineering.html' title='Evolution of Software Engineering'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-8009855949356219002</id><published>2012-12-05T11:20:00.001-08:00</published><updated>2012-12-05T12:13:40.072-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Software Engineering"/><title type='text'>Introduction to Software Engineering </title><content type='html'>The field of &lt;b&gt;software engineering&lt;/b&gt; is related to the development of software. Large software needs systematic development unlike simple programs which can be developed in isolation and there may not be any systematic approach being followed. In the last few decades, the computer industry has undergone revolutionary changes in hardware. That is, processor technology, memory technology, and integration of devices have changed very rapidly. As the software is required to maintain compatibility with hardware, the complexity of software also has changed much in the recent past. In 1970s, the programs were small, simple and executed on a simple uniprocessor system. The development of software for such systems was much easier. In the present situation, high speed multiprocessor systems are available and the software is required to be developed for the whole organization. Naturally, the complexity of software has increased many folds. Thus, the need for the application of engineering techniques in their development is realized. The applications of engineering approach to software development lead to the evolution of the area of Software Engineering. The IEEE glossary of software engineering terminology defines the Software Engineering as:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;(a) The application of a systematic, disciplined, quantifiable approach to the development, operation and maintenance of software, that is, the application of engineering to software. (b) The study of approaches in (a). &lt;/blockquote&gt;&lt;br /&gt;
There is a difference between programming and Software Engineering. Software Engineering includes activities like cost estimation, time estimation, designing, coding, documentation, maintenance, quality assurance, testing of software etc. whereas programming includes only the coding part. Thus, it can be said that programming activity is only a subset of software development activities. The above mentioned features are essential features of software. Besides these essential features, additional features like reliability, future expansion, software reuse etc. are also considered. Reliability is of utmost importance in real time systems like flight control, medical applications etc. </content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/8009855949356219002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2012/12/introduction-to-software-engineering.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/8009855949356219002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/8009855949356219002'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2012/12/introduction-to-software-engineering.html' title='Introduction to Software Engineering '/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-2190920151208584790</id><published>2012-07-09T12:29:00.000-07:00</published><updated>2012-12-05T07:58:12.608-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C Programming"/><title type='text'>Float Data Types &amp;amp; Variables in C Programming Language</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Integer and character data types are incapable of storing numbers with fractional parts. Depending on the precision required, C provides two variable types for computation with &quot;floating point&quot; numbers, i.e. numbers with a decimal (internally a binary) point. Such numbers are called &lt;b&gt;floats&lt;/b&gt; because the binary point can only be represented in the binary- digits expansion of the number, in which it is made to &quot;float&quot; to the appropriate &quot;position&quot; for optimal precision. (You can immediately see the difficulty of imagining a binary &quot;point&quot; within any particular bit of a floating point word, which can contain only a 0 or a 1!) Typically, some of the leftmost bits of a floating point number store its characteristic (the positive or negative power of two to which it is raised), and the remaining its mantissa, the digits which comprise the number. In base 10, for example, if 2.3 is written as 0.0023 *103, the mantissa is 0.0023, and the characteristic (exponent) is 3.&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;Single precision floating point variables are declared by the float specification, for example:&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;float bank_balance = 1.234567E8;&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;/*En means 10 raised to the power n */&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 scientific notation En, where the lowercase form en is also acceptable, is optional; one may alternatively write:&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;float bank_balance = 123456700.0;&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;Floats are stored in four bytes and are accurate to about seven significant digits; on PCs their range extends over the interval [E-38, E37].&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 must never be lost sight of that the floating point numbers held in a computer&#39;s memory are at best approximations to real numbers. There are two reasons for this shortcoming. First, the finite extent of the word size of any computer forces a truncation or round-off of the value to be stored; whether a storage location is two bytes wide, or four, or even eight, the value stored therein can be precise only to so many binary digits.&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;Second, it is inherently impossible to represent with unlimited accuracy some fractional values as a finite series of digits preceded by a binary or decimal point. For example&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;1/7 = 0. 142857142857142857 ..... ad infinitum&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;As long as a finite number of digits is written after the decimal point, you will be unable to accurately represent the fraction 1/7. But rational fractions that expand into an infinite series of decimals aren&#39;t the only types of floating point numbers that are impossible to store accurately in a computer. Irrational numbers such as the square root of 2 have a periodic (non- repeating) expansions__there&#39;s no way that you can predict the next digit, as you could in the, expansion of 1/7 above, at any point in the series. Therefore it&#39;s inherently impossible to store such numbers infinitely accurately inside the machine. PI, the ratio of the circumference of any circle to its diameter, is another number that you cannot represent as a finite sequence of digits. It&#39;s not merely irrational, it&#39;s a transcendental number. (It cannot be the root of any algebraic equation with rational coefficients.) So an element of imprecision may be introduced by the very nature of the numbers to be stored.&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;Third, in any computation with floating point numbers, errors of round-off or truncation are necessarily introduced. For suppose you multiply two n-bit numbers; the result will in general be a 2n-bit number. If this number (2n) of bits is larger than the number of bits in the location which will hold the result, you will be forcing a large object into a small hole! Ergo, there&#39;ll be a problem! Some of it will just have to be chopped off. Therefore it is wisest to regard with a pinch of salt any number emitted by a computer as the result of a computation, that has a long string of digit-, after the decimal point. It may not be quite as accurate as it seems.&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 %e, %f and %g format conversion characters are used in the scant () and printf () functions to read and print floating point numbers. %e (or %E) is used with floating point numbers in exponent format, while %g (or %G) may be used with floats in either format. %g (or %G) in the printf () outputs a float variable either as a string of decimal numbers including a decimal point, or in exponent notation, whichever is shorter. An uppercase E or G prints an uppercase E in the output. We shall be discussing more about format control in a later Unit.) Program 2.15 below finds the average of five numbers input from the keyboard, and print, it:&lt;/div&gt;&lt;br /&gt;
&lt;pre name=&quot;code&quot; class=&quot;cpp&quot;&gt;/* Program 1 */
#include &amp;lt;stdio.h&amp;gt;  
main()  
{   
 float val_1, val_2, val_3, val_4, val_5, total 0.0, avg;   
 pritf (&amp;quot;\nEnter first number...&amp;quot;);   
 scanf (&amp;quot;%f&amp;quot;, &amp;amp;val_1);   
 printf (&amp;quot;\nEnter third number...&amp;quot;);  
 printf (&amp;quot;\nEnter second number...&amp;quot;);   
 scanf (&amp;quot;%f&#39;, &amp;amp;,val_2);   
 scanf (&amp;quot;%f&#39;, &amp;amp;val_3);   
 printf (&amp;quot;\nEnter fourth number...&amp;quot;);  
 scanf (&amp;quot;%f&amp;quot;, &amp;amp;val_4);   
 avg = total / 5;  
 printf (&amp;quot;\nEnter fifth number...&amp;quot;);   
 scanf (&amp;quot;%f&amp;quot;, &amp;amp;val_5);  
 total = val_1 + val_2 + val_3 + val_4 + val_5;  
 printf (&amp;quot;\nThe average of the numbers you entered is: %f\n&amp;quot;, avg);   
} 
&lt;/pre&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Here&#39;s a sample conversation with the program:&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Enter first number .. 32.4 &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Enter second number .. 56.7 &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Enter third number .. 78.3 &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Enter fourth number .. 67.8 &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Enter fifth number... -93.9&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The average of the numbers you entered is: 28.260000&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/2190920151208584790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2012/07/Float-Data-Types-Variables-in-C-programming-Language.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/2190920151208584790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/2190920151208584790'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2012/07/Float-Data-Types-Variables-in-C-programming-Language.html' title='Float Data Types &amp;amp; Variables in C Programming Language'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-8422637042929660266</id><published>2012-07-09T11:38:00.000-07:00</published><updated>2012-07-09T11:38:04.233-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C Programming"/><title type='text'>Character Data Types in C Programing Language</title><content type='html'>Character Data Types or variables are used to store single characters from the ASCII set. They&#39;re accommodated in a single byte. Character variables are declared and defined as in the statement below:&lt;br /&gt;
&lt;br /&gt;
char bee = &#39;b&#39;, see = &#39;C&#39;, ccc;&lt;br /&gt;
&lt;br /&gt;
This declaratory statement assigns the character constant &#39;b&#39; to the char variable bee, and the character constant &#39;c&#39; to the char variable named see. The char variable ccc is undefined.&lt;br /&gt;
&lt;br /&gt;
Character constants are single characters. They must be enclosed in right single quotes. Escape sequences may be also assigned to character variables in their usual backslash notation, with the &quot;compound character&quot; enclosed in right single quotes. Thus the statement:&lt;br /&gt;
&lt;br /&gt;
char nextline = &#39;\n&#39;;&lt;br /&gt;
&lt;br /&gt;
assigns the escape sequence for the newline character to the char variable nextilne. [In ANSI C a character constant is a sequence of one or more characters enclosed in single quotes. Precisely how the value of such a constant is to be interpreted is left to the implementation.]&lt;br /&gt;
&lt;br /&gt;
Since character variables are accommodated in a byte, C regards chars as being a sub- range of ints, (the subrange that fits inside a byte) and each ASCII character is for all purposes equivalent to the decimal integer value of the bit picture which defines it. Thus &#39;A&#39;, of which the ASCII representation is 01000001, has the arithmetical value of 65 decimal. This is the decimal value of the sequence of bits 01000001, as you may easily verify. In other words, the memory representation of the char constant &#39;A&#39; is indistinguishable from that of the int constant, decimal 65.&lt;br /&gt;
&lt;br /&gt;
The upshot of this is that small int values may be stored in char variables, and char values may he stored in int variables! Character variables are therefore signed quantities restricted to the range [-128, 127]. However, it is a requirement of the language that the decimal equivalent of each of the printing characters be non-negative.&lt;br /&gt;
&lt;br /&gt;
We are assured then that in any C implementation in which a char is stored in an 8-bit byte, the corresponding int value will always be a non-negative quantity, whatever the value of the leftmost (sign) bit may be. Now, identical bit patterns within a byte may be treated as a negative quantity by one machine, as a positive by another. For ensuring portability of programs which store non-character data in char variables the unsigned char declaration is useful: it changes the range of chars to [0, 255]. &lt;br /&gt;
&lt;br /&gt;
[Note :However, the ANSI extension signed char explicitly declares a signed character type to override, if need be, a possible default representation of unsigned chars.]&lt;br /&gt;
&lt;br /&gt;
One consequence of the fact that C does not distinguish between the internal representation of byte-sized ints and chars is that arithmetic operations which are allowed on ints are also allowed on chars! Thus in C, if you wish to, you may multiply one character value by another. &lt;br /&gt;
&lt;br /&gt;
Here are some variables declared as chars, and defined as escape sequences:&lt;br /&gt;
&lt;br /&gt;
char newline = &#39;\n&#39;, &lt;br /&gt;
char single_quote = &#39;\&quot;&#39;;&lt;br /&gt;
&lt;br /&gt;
Character constants can also be defined via their octal ASCII codes. The octal value of the character is preceded by a backslash, and is enclosed in single quotes:&lt;br /&gt;
&lt;br /&gt;
char terminal_bell = &#39;\07&#39;;&lt;br /&gt;
/* 7 = octal ASCII code for beep */&lt;br /&gt;
&lt;br /&gt;
char backspace = &#39;\010&#39;;&lt;br /&gt;
/ *10 = octal code for backspace */&lt;br /&gt;
&lt;br /&gt;
[Note: For ANSI C Compilers character constants may be defined by hex digits instead of octals. Hex digits are preceded by x, unlike 0 in the case of octals. Thus in ANSI C:&lt;br /&gt;
&lt;br /&gt;
char backspace =\x A&#39;;&lt;br /&gt;
&lt;br /&gt;
is an acceptable alternative declaration to&lt;br /&gt;
&lt;br /&gt;
char backspace = &#39;\010&#39;;&lt;br /&gt;
&lt;br /&gt;
Any number of digits may be written, but the value stored is undefined if the resulting character value exceeds the limit of char.]&lt;br /&gt;
&lt;br /&gt;
On an ASCII machine both &#39;\b&#39; and &#39;\010&#39; are equivalent representations. Each will print the backspace character. But the latter form, the ASCII octal equivalent of &#39;\b&#39;, will not work on an EBCDIC machine, typically an IBM mainframe, where the collating sequence of the characters (i.e., their gradation or numerical ordering) is different. In the interests of portability therefore it is preferable to write &#39;\b&#39; for the backspace character, rather than its octal code. Then your program will work as certifiably on an EBCDIC machine as it will on an ASCII.&lt;br /&gt;
&lt;br /&gt;
Note that the character constant &#39;a&#39; is not the same as the string &quot;a&quot;. (We will learn later that a string is really an array of characters, a bunch of characters stored in consecutive memory locations, the last location containing the null character; so the string &quot;a&quot; really contains two chars, &#39;a&#39; immediately followed by &#39;\0&#39;). It is important to realise that the null character is not the same as the decimal digit 0, the ASCII code of which is 00110000.&lt;br /&gt;
&lt;br /&gt;
Just as %d in printf () or scanf () allows us to print and read ints, %c enables the input and output of single characters which are the values of char variables. Let&#39;s look at Programs 2. 10 and 2.11 below:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;/* Program 1 */ 
#include &lt;&lt;stdio.h&gt;stdio.h&gt;
main ( )
{ 
char a = &#39;H&#39;, b = &#39;e&#39;, c &#39;I&#39;, d &#39;o&#39;, newline &#39;\n&#39;;
printf (&quot;%c&quot;, a); 
printf (&quot;%c&quot;, b); 
printf (&quot;%c&quot;, c); 
printf (&quot;%c&quot;, c); 
printf (&quot;%c&quot;, d); 
printf (&quot;%c&quot;, newline); 
}&lt;/pre&gt;&lt;br /&gt;
The output of Program 1 is easily predictable (what is it?).&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;/* Program 2 */ 
#include &lt;&lt;stdio.h&gt;stdio.h&gt;
main ( )
{ 
char val_1, val_2; 
int vai_3; 
printf (&quot;Press any of the keys a - z, then press \n&quot;); 
scanf (&quot;%c&quot;, &amp;val_1); 
printf (&quot;Press another key in a - z, then press \n&quot;); 
scanf (&quot;%c&quot;, &amp;val_2); 
printf (&quot;Assuming you&#39;re working on an ASCII machine, \nthe chars that you typed have decimal equivalents %d and %d, respectively&quot;, val_1, val_2); 
val_3 = val_1 * val_2; 
printf (&quot;Their product is %d\n&quot;, val_3); 
}&lt;/pre&gt;&lt;br /&gt;
Execute the above program to verify that char variables behave like one byte ints in arithmetic operations.&lt;br /&gt;
&lt;br /&gt;
The %c format conversion character in a printf () outputs escape sequences, as you saw in Program 2. Execute Program 3 if you want a little music:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;/* Program 3 */ 

#include &lt;&lt;stdio.h&gt;stdio.h&gt; 
main ( )
{ 
char bell = &#39;\007&#39;; /* octal code of the terminal bell */ 
char x = &#39;Y&#39;, y = &#39;E&#39;, z = &#39;S&#39;, exclam = &#39;!&#39;; 
printf (&quot;Do you hear the bell ? %c%c%c%c%c%c%c&quot;, bell, x, bell, y, bell, z, exclam); 
}&lt;/pre&gt;&lt;br /&gt;
Program 4 assigns a character value to an int variable, an integer value to a char variable, and performs a computation involving these variables. Predict the output of the program, and verify your result by executing it&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;/* Program 4 */ 
#include &lt;&lt;stdio.h&gt;stdio.h&gt; 
main ( )
{ 
int alpha = &#39;A&#39;, beta; 
char gamma = 122; beta = gamma - alpha; 
printf (&quot;beta seen as an int is: %d\n&quot;, beta); 
printf (&quot;beta seen as a char is: %c\n&quot;, beta); 
}&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;End-0f-File (EOF) character&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
One character that is often required to be sensed in C programs is not strictly speaking a character at all: it&#39;s the EOF or End-0f-File character, and its occurrence indicates to a program that the end of terminal or file input has been reached. Because the EOF is not a character, being outside the range of chars, any program that&#39;s written to sense it must declare an int variable to store character values. As we see in Program 2.13, this is always possible to do. An int variable can accommodate all the characters assigned to it, and can also accommodate EOF. We&#39;ll see uses for EOF in later units.&lt;br /&gt;
&lt;br /&gt;
The putcular ( )function (pronounced &quot;put character&quot;), which takes a character variable or constant as its sole argument, is often a more convenient alternative for screen output thin is the printf ( ) When this function is invoked (for which purpose you may need to #include stdio.h), the character equivalent of its argument is output on the terminal, at the current position of the cursor:&lt;br /&gt;
&lt;br /&gt;
putchar (char_var);&lt;br /&gt;
&lt;br /&gt;
Suppose char_var has been assigned the value &#39;A&#39;. Then &#39;A&#39; will be displayed where the cursor was.&lt;br /&gt;
&lt;br /&gt;
Reciprocally, getchar ( ) pronounced &quot;get character&quot;) gets a single character from the keyboard, and can assign it to a char variable. (stdio.h &#39;may have to be #included before getchar ( )can be used.) It has no arguments, and is typically invoked in the following way:&lt;br /&gt;
&lt;br /&gt;
char_var = getchar ( );&lt;br /&gt;
&lt;br /&gt;
When such a statement is encountered, the execution of the program is stayed until a key is pressed. Then char_var is assigned the character value of the key that was pressed.&lt;br /&gt;
&lt;br /&gt;
Program 5 below illustrates the usage of these functions. Your compiler may require the inclusion of stdio.h to invoke getchar ( ) and putchar ( ).&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;/* Program 5 */ 
#include &lt;&lt;stdio.h&gt;stdio.h&gt; 
main ( )
{ 
char key_pressed; 
printf (&quot;Type in a lowercase letter (a - z), press :&quot;); 
key_pressed = getchar ( ); /* get char from keyboard*/ 
printf (&quot;You pressed&quot;); 
putchar (key_pressed - 32); /* put upperease char on Terminal*/ 
putchar (&#39;\n&#39;);

/* this program converts to uppercase because ASCII decimal equivalent is 32 less than for the corresponding lower case character. */
}&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/8422637042929660266/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2012/07/Character-Data-Types-in-C-Programing-Language.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/8422637042929660266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/8422637042929660266'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2012/07/Character-Data-Types-in-C-Programing-Language.html' title='Character Data Types in C Programing Language'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-8795969294259619967</id><published>2012-07-07T16:00:00.000-07:00</published><updated>2012-12-05T07:35:20.458-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C Programming"/><title type='text'>Range Modifiers for Integer Variables in C</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;On occasions you may need to work with strictly non-negative integers, or with integers in a shorter or longer interval than the default for ints. The following types of range modifying declarations are possible:&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;(I) unsigned&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;usage: unsigned int stadium_seats;&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 declaration &quot;liberates&quot; the sign bit, and makes the entire word (including the freed sign bit) available for the storage of non-negative integers. [Note: The sign bit_the leftmost bit of a memory word _ determines the sign of the contents of the word when it&#39;s set to 1, the value stored in the remaining bits is negative. Most architectures use two&#39;s complement arith- metic, in which the sign bit is &quot;weighted&quot;, i.e. it has an associated place value which is nega- tive. Thus on a 16-bit machine its value is -215, or -32,768. So a 16-bit signed number such as 10000000 00111111 would have the value 20 + 21 + 22+ 23 +24 + 25 -215 = -32,705. As an unsigned integer this string of bits would have the value 32831.] On PCs the unsigned decla- ration allows for int variables the range [0, 65535] and is useful when one deals with quan- tities which are known beforehand to be both large and non-negative, e.g. memory addresses, a stadium&#39;s seating capacity, etc.&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;Just as %d in-the printf ( ) prints decimal int values, %u is used to output unsigned ints, as the program below illustrates. Execute the program and determine its output also examine the effect changing the % u format conversion specifiers to %d in the printf Os. Can you explain your results?&lt;/div&gt;&lt;br /&gt;
&lt;pre name=&quot;code&quot; class=&quot;cpp&quot;&gt;#include &amp;lt;stdio.h&amp;gt; 
main()
{
    unsigned int stadium_seats, tickets_sold, standing_viewers;
    stadium_seats = 40000;
    tickets_sold = 50000;
    standing_viewers = tickets_sold - stadium_seats;
    printf (&amp;quot;Tickets sold: %u\n&amp;quot;, tickets_sold);
    printf (&amp;quot;Scats available: %u\n&amp;quot;, stidium_scats);
    printf (&amp;quot;There could be a stajnpede because\,n&amp;quot;);
    printf (&amp;quot;there may be nearly %u standees at the match.\n&amp;quot;, standing_viewers);
}
&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;(II) short&lt;/b&gt;&lt;br /&gt;
usage: short int friends;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;The short int declaration may be useful in instances where an integer variable is known beforehand to be small. The declaration above ensures that the range of friends will not ex- ceed that of ints, but on some computers the range may be shorter (e.g. -128 through 127) friends may be accommodated in a byte, thus saving memory. There.was a time in the olden days of computing,,when main memory was an expensive resource, that programmers tried by such declarations and other stratagems to optimise core usage to the extent possible. (The VAX computer uses two bytes to store short ints, half the amount it uses for ints but for present-day PCs, with memory cheap and plentiful, most compiler writers make no distnc- tion between ints and short ints.)&lt;/div&gt;&lt;br /&gt;
The %d specification in the printf ( ) is also used to output short ints.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;(III) unsigned short&lt;/b&gt;&lt;br /&gt;
usage: unsigned short int books&lt;br /&gt;
&lt;br /&gt;
The range of books will not exceed that of unsigned ints it may be shorter.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;(IV) long&lt;/b&gt;&lt;br /&gt;
usage: long int stars_in_galaxy;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;This declaration is required when you need to use integers larger than the default for ints. On most computers long ints are 4-byte integers ranging over the interval [-2147483648, 2147483647]. When a long integer constant is assigned a value the letter L (or I) must be written immediately after the rightmost digit:&amp;nbsp;long int big_num = 123456789OL;&lt;/div&gt;&lt;br /&gt;
% ld in the printf 0 outputs long decimal ints, as you may verify by executing &lt;br /&gt;
&lt;br /&gt;
&lt;pre name=&quot;code&quot; class=&quot;cpp&quot;&gt;
#include &amp;lt;stdio.h&amp;gt; 
main ( )
{
    long int population-2000 = 123456789OL;
    printf (&amp;quot;The population of this country in 2000 AD\,n&amp;quot;);
    printf (&amp;quot;will exceed %Id if we do\n&amp;quot;, populaton_2000);
    printf (&amp;quot;not take remedial steps now.\n&amp;quot;);
}

&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;(V) unsigned long&lt;/b&gt;&lt;br /&gt;
usage: unsigned long int population_2000&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;The unsigned long declaration transforms the range of long ints to the set of 4-byte non- negative integers. Here population_2000 is allowed to range over [0, 4294967295] (Let&#39;s hope that larger-sized words will not be required to store this value!) unsigned longs are output by the %lu format conversion specifier in the printf 0.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;In the above declarations shorter forms are allowed: thus you may write:&lt;br /&gt;
unsigned letters; /* instead of unsigned int letters*/&lt;br /&gt;
long rope; /* insted of long int rope*/&lt;br /&gt;
unsigned short note; /* instead of unsigned short int note*/ etc.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/8795969294259619967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2012/07/range-modifiers-for-int-variables-in-c.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/8795969294259619967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/8795969294259619967'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2012/07/range-modifiers-for-int-variables-in-c.html' title='Range Modifiers for Integer Variables in C'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-4432345370630248061</id><published>2012-07-07T15:49:00.000-07:00</published><updated>2012-07-09T10:52:03.901-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C Programming"/><title type='text'>Integer Data Types in C Programming Language</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
C program variables and constants are of four types: char, int, float and double. Before an identifier can be used in a C program its type must be explicitly declared. Here&#39;s a declaratory statement of C:&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;pre&gt;int apples;&lt;/pre&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 declares the programmer&#39;s intent that apples will store a signed integer value, i.e. apples may be either a positive or a negative integer within the range set for variables of type int. Now this range can be very much machine dependent; it depends, among other things on the word size of your machine. For most compilers for the IBM PC ints are stored in two consecutive bytes, and are restricted to the range [-32768, 32767]. Compare this with the VAX or the Macintosh, where ints are,4-byte signed integers in the range [-2147483648, 2147483647]. In declaring apples to be an int you are telling the compiler how much space to allocate for its storage. You have also made an assumption of the range in which you expect its value to lie.&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;
In contrast to Pascal, in C it is possible and in fact usual to both declare a variable&#39;s type and, where needed, define its value in the same statement:&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;pre&gt;int salary = 5000;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
It is not correct to assume that a variable which has only been declared e.g.:&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;pre&gt;int volts;&lt;/pre&gt;
/* volts is unpredictable */&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
but has not been defined, i.e. assigned a value, automatically gets the value 0. In fact its value may be anything but 0! Note that the thousands, millions or billions place values are never separated by commas, when constants are defined in C programs.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Let&#39;s 1(x)k at Program 2.1, and its output. The program adds two ints x and y, and prints their sum, z. Don&#39;t worry if you can&#39;t understand everything about the program just yet. Only remember that the printf () can be. used to print numbers just as easily as it prints strings. To print an int x the following printf () will do:&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;pre&gt;printf (&quot;The value of x is: %d\n&quot;, x);&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
The %d signifies that x is to be printed as a decimal integer.&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;pre&gt;#include &amp;lt;&lt;stdio.h&gt;stdio.h&amp;gt;
main()
{ 
int x = 5, y = 7, z; 
z = x + y; 
printf (&quot;The value of x is: %d\n&quot;, x); 
printf (&quot;The value of y is: %d\n&quot;, y); 
printf (&quot;Their sum, z, is: %d\n&quot;, z); 
}

&lt;/stdio.h&gt;&lt;/pre&gt;
&lt;/div&gt;
The output of Program is appended below.&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
The value of x is: 5 &lt;br /&gt;
The value of y is: 7 &lt;br /&gt;
Their sum, z, is: 12&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
To understand the very great importance of using variables in a computation only after having assigned them values, execute the following program and determine its output on your computer:&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;#include &amp;lt;&lt;stdio.h&gt;stdio.h&amp;gt;
main()
{
int x, y, z; /* x, y and z are undefined. */ /* contd. */
z = x + y ; 
printf (&quot;The value of x is: %d\n&quot;, x); 
printf (&quot;The value of y is: %d\n&quot;, y); 
printf (&quot;Their sum, z, is: %d\n&quot;, z);
}
&lt;/stdio.h&gt;&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
On our machine, a VAX 11/780 from Digital Equipment Corporation, U.S.A. the output was:&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
The value of x is: 2146744409 The value of y is: 2146744417 Their sum, z, is: -1478470&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Now, looking at the output of this program, could you possibly have predicted the values x, y and z would get? Moral: Never assume a variable has a meaningful value, unless you give it one.&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/4432345370630248061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2012/07/variable-of-type-int-in-c-programing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/4432345370630248061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/4432345370630248061'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2012/07/variable-of-type-int-in-c-programing.html' title='Integer Data Types in C Programming Language'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-4914836834579563581</id><published>2012-04-03T08:18:00.001-07:00</published><updated>2012-07-07T15:17:58.676-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C Programming"/><title type='text'>Escape Sequences in C Programming Language</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Let’s have a look at a simple C program:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:cpp&quot;&gt;#include
main ( )
{
printf (&quot;This is easy !!\n&quot;);
}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;You might be wondering about the \n (pronounced backslash n) in the string argument of the function printf ( ):&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;blockquote class=&quot;tr_bq&quot;&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&quot;This is easy!!\n&quot;&lt;/div&gt;&lt;/blockquote&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 \n is an example of an escape sequence: it&#39;s used to print the newline character. If You have executed Programs 1.1 or 1.2 you will have noticed that the \n doesn&#39;t appear in the output Each \n in the string argument of a printf ()causes the cursor to be placed at the beginning of die next line of output. Think of an escape sequence as a &quot;substitute character&quot; for printing hard-to-get characters. In an earlier section we learnt that s are not allowed in strings., but including \n&#39;s within one makes it easy to output it in several lines: if you wish to print a string in two or more lines, place the \n wherever you want to insert a new line in the output, as in the example below:&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;blockquote class=&quot;tr_bq&quot;&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;main ( )&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;printf (&quot;This\nstring\nwill\nbe\nprinted\,nin\n9\nlines.\n&quot;);&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;}&lt;/div&gt;&lt;/blockquote&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;Each \n will force the cursor to be positioned at the beginning of the next line on the screen, from where further printing will begin. Here is part of the output from executing the above program:&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;blockquote class=&quot;tr_bq&quot;&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;This&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;string&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;will&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;etc.&lt;/div&gt;&lt;/blockquote&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;If a string does not contain a \n at its end, the next string to be printed will begin in the same line as the last, at the current position of the cursor, i.e. alongside the first string.&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;We have seen that the &quot;double quotes&quot; character is used to mark the beginning and end of a C string. How then can the &quot;double quotes&quot; character itself be included within a string? This time the escape sequence \&quot; comes to our aid: it prints as “ in the output. Similarly, the escape sequence, \\ helps print \, and \&#39; the single quote character,&#39;. All escape sequences in C begin with a backslash.&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;Be careful to remember that &quot;&quot; is not the escape sequence for the &quot;double quote&quot; character (as it is in some versions of BASIC). In C &quot;&quot; is the null string., the null string is not &quot;empty &quot;, as one might have thought; it contains a single character, the null character, ASCII 0 (in which all bits are set to zero). We will see later that the last character of every C string is the (invisible) null character. Its presence helps the computer determine the actual end of the string.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Other escape sequences available in C are:&lt;/div&gt;&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td width=&quot;17%&quot;&gt;&lt;h2&gt;\a&lt;br /&gt;
&lt;/h2&gt;&lt;/td&gt;&lt;td width=&quot;83%&quot;&gt;ring terminal bell (the a is for alert) [ANSI] extension]&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;h2&gt;\?&lt;br /&gt;
&lt;/h2&gt;&lt;/td&gt;&lt;td&gt;question mark [ANSI extension]&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;h2&gt;\b&lt;br /&gt;
&lt;/h2&gt;&lt;/td&gt;&lt;td&gt;Backspace&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;h2&gt;\r&lt;br /&gt;
&lt;/h2&gt;&lt;/td&gt;&lt;td&gt;carriage return&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;h2&gt;\f&lt;br /&gt;
&lt;/h2&gt;&lt;/td&gt;&lt;td&gt;Formfeed&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;h2&gt;\t&lt;br /&gt;
&lt;/h2&gt;&lt;/td&gt;&lt;td&gt;horizontal tab&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;h2&gt;\V&lt;br /&gt;
&lt;/h2&gt;&lt;/td&gt;&lt;td&gt;vertical tab&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;h2&gt;\O&lt;br /&gt;
&lt;/h2&gt;&lt;/td&gt;&lt;td&gt;ASCII null character&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Placing any of these within a string causes either the indicated action, or the related character to be output.&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/4914836834579563581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2012/04/escape-sequences-in-c-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/4914836834579563581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/4914836834579563581'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2012/04/escape-sequences-in-c-programming.html' title='Escape Sequences in C Programming Language'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-2220146869848797153</id><published>2012-04-03T08:01:00.000-07:00</published><updated>2012-12-05T07:44:45.061-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C Programming"/><title type='text'>A Simple C Program</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The best way to learn C or any programming language is to begin writing programs in it; so here&#39;s our first C program:&lt;/div&gt;&lt;br /&gt;
&lt;pre class=&quot;c&quot; name=&quot;code&quot;&gt;# include &amp;lt;stdio.h&amp;gt;
main()
{
     printf (&quot;This is easy !!\n&quot;);
}
&lt;/pre&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;stdio .h=&quot;.h&quot;&gt; There are a few important points to note about this program, points which you will find common to all C programs.&lt;br /&gt;
&lt;br /&gt;
Programs in C consist of &lt;b&gt;functions&lt;/b&gt;, one of which must be main (). When a C program is executed, main ( ) is where the action starts. Then other functions may be &quot;invoked&quot;. Here you can ask a very basic question that what a function is? A function is a sub-program that contains instructions or statements to perform a specific computation on its variables. When its instructions have been executed, the function returns control to the calling program, to which it may optionally he made to return the results of its computations. Because main ( ) is a function, too, from which control returns back to the operating system at program termination, in ANSI C it is customary, although not required, to include a statement in main ( ) which explicitly returns control to the operating environment. In ANSI C the above program is correctly written as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;pre name=&quot;code&quot; class=&quot;cpp&quot;&gt;/*ANSI C Version */ 
#include &amp;lt;stdio.h&amp;gt;
void main (void)
{
    printf (&amp;quot;This is easy!!\n&amp;quot;);
    return 0;
}
&lt;/pre&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;stdio .h=&quot;.h&quot;&gt;&lt;stdio .h=&quot;.h&quot;&gt; We&#39;ll learn more about functions as we go along our C programming tutorial, but for now you may recognize them by the presence of parentheses after their names.&lt;br /&gt;
&lt;br /&gt;
Apart from main ( ), another function in the program above is the printf ( ). printf ( ) is an example of a &quot;library function&quot;. It&#39;s provided by the compiler, ready for you to use. In addition to its variables, a function, including main ( ), may optionally have arguments, which are listed in the parentheses following the function name. The arguments of functions are somewhat different from the arguments that people have: they are values of the parameters in terms of which the function is defined, and are passed to it by the calling program. The instructions which comprise a function are listed in terms of its parameters and its variables.&lt;br /&gt;
&lt;br /&gt;
In the example above, main ( ) has no arguments. printf ( ) has one: it&#39;s the bunch (more properly: string) of characters enclosed in double quotes:&lt;br /&gt;
&lt;/stdio&gt;&lt;/stdio&gt;&lt;/div&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;stdio .h=&quot;.h&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;stdio .h=&quot;.h&quot;&gt; &quot;This is easy!!\n&quot;&lt;/stdio&gt;&lt;/stdio&gt;&lt;br /&gt;
&lt;stdio .h=&quot;.h&quot;&gt;&lt;stdio .h=&quot;.h&quot;&gt;&lt;/stdio&gt;&lt;/stdio&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;stdio .h=&quot;.h&quot;&gt;&lt;stdio .h=&quot;.h&quot;&gt; &lt;br /&gt;
When the printf ( ) is executed, its built-in instructions process this argument. The result is that the string is displayed on the output device, which we will usually assume is a terminal. The output of the program will be:&lt;br /&gt;
&lt;/stdio&gt;&lt;/stdio&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;stdio .h=&quot;.h&quot;&gt;&lt;stdio .h=&quot;.h&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; This is easy!!&lt;/span&gt;&lt;/stdio&gt;&lt;/stdio&gt;&lt;br /&gt;
&lt;stdio .h=&quot;.h&quot;&gt;&lt;stdio .h=&quot;.h&quot;&gt;&lt;/stdio&gt;&lt;/stdio&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;stdio .h=&quot;.h&quot;&gt;&lt;stdio .h=&quot;.h&quot;&gt; &lt;br /&gt;
With the cursor stationed at the beginning of the next line on the screen. In C a string is not a piece of thread: it&#39;s any sequence of characters enclosed in double quotes. A string must not include a &quot;hard&quot; carriage-return (), i.e. all its characters must be keyed in on a single line on the terminal.&lt;br /&gt;
&lt;br /&gt;
&quot;This is most certainly not a C string. It contains a carriage return character.&quot;&lt;br /&gt;
&lt;br /&gt;
As we have seen in the case of printf () when a function is invoked, it is passed (the values of ) its arguments. It then executes its instructions, using these values. On completion the function returns control to the module from which it was invoked. The nice thing about a function is that it may be called as often as required in a program, to perform the same computational steps on the different sets of values that are passed to it. Thus there can be several invocations to printf ( ) within a program, with different string arguments each time.&lt;br /&gt;
&lt;/stdio&gt;&lt;/stdio&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/2220146869848797153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2012/04/simple-c-program.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/2220146869848797153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/2220146869848797153'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2012/04/simple-c-program.html' title='A Simple C Program'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-2638496428895612547</id><published>2012-03-29T09:47:00.000-07:00</published><updated>2012-03-29T09:47:53.832-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C Programming"/><title type='text'>An Overview of C Programming Language</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
C is a general purpose computer programming language. It was originally created by Dennis M. Ritchie (circa 1971) for the specific purpose of rewriting much of the Unix operating system. This now famous operating system was at that time in its infancy: it had recently been written for a discarded DEC PDP - 7 computer by Ken Thompson, an electrical engineer and a colleague of Ritchie&#39;s at Bell Labs. Thompson had written the first UNIX in a language he chose to call B. The intention of these programmers was to port UNIX on to other, architecturally dissimilar machines. Clearly, using any assembly language was out of the question: what was required was a language that would permit assembly-like (i.e. low or hardware level) operations, such as bit manipulation, and at the same time be run able on different computers. None of the languages then available could have served the purpose: a new one was called for, and C was born. The rest is history: UNIX became spectacularly successful, in large measure because of its portability, and C, in which most of it was written, has since come to occupy a pre-eminent position in die development of systems programs.&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 success of UNIX, and the consequent popularity of C for systems programming, forced it on the attention of applications programmers, who came to appreciate the rich variety of its operators and its control structures. These enable, and in fact encourage, the practice of modular programming: the individual sub-tasks that make up a large program can be written in independent blocks or modules, each of manageable size. In other words, the language possesses features which make possible a &quot;divide and conquer&quot; approach to large programming tasks. When programs are organized as modules they are necessarily well-planned, because each module contains only the instructions for a well-defined activity. Such programs are therefore more easily comprehensible by other readers than unstructured programs.&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;
Another desirable, quality of modular Programs is that they may be modified without much difficulty. If changes are required, only a few modules may be affected, leaving the remainder of the program intact.&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;
And last but not least, such programs are easier to debug, because errors can be localized to modules, and removed. For a concrete example suppose that you have to write a program to determine all prime numbers up to ten million which are of the form k * k + 1, where k is an integer (2, 5, 17 and 37 are trivial examples of such primes). Then one module of the program could be written to generate the number k * k + 1 for the next admissible value of k; and another module to test whether the last number generated is a prime. Organized in this way, not only will the program be elegant, it would also be easy to debug, understand or modify.&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/2638496428895612547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2012/03/overview-of-c-programming-language.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/2638496428895612547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/2638496428895612547'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2012/03/overview-of-c-programming-language.html' title='An Overview of C Programming Language'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-7457638230642724977</id><published>2012-02-01T23:19:00.000-08:00</published><updated>2012-02-01T23:19:24.145-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C Programming"/><title type='text'>Find the size of data types in C</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This is a simple program to find the size of different basic data types in C Programming Language. I have added only four data types you can add more if you wish.&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;code&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;span style=&quot;color: #38761d;&quot;&gt; #include &amp;lt;malloc.h&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt; &lt;/code&gt;&lt;br /&gt;
&lt;code&gt; main()&lt;/code&gt;&lt;br /&gt;
&lt;code&gt; {&lt;/code&gt;&lt;br /&gt;
&lt;code&gt; int i;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt; printf(&quot;Size of an Integer \t=\t %d (Bytes)\n&quot;,sizeof(int));&lt;/code&gt;&lt;br /&gt;
&lt;code&gt; printf(&quot;Size of a Character \t=\t %d (Bytes)\n&quot;,sizeof(char));&lt;/code&gt;&lt;br /&gt;
&lt;code&gt; printf(&quot;Size of a Float \t=\t %d (Bytes)\n&quot;,sizeof(float));&lt;/code&gt;&lt;br /&gt;
&lt;code&gt; printf(&quot;Size of a Double \t=\t %d (Bytes)\n&quot;,sizeof(double));&lt;/code&gt;&lt;br /&gt;
&lt;code&gt; }&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;/code&gt;&lt;/blockquote&gt;
&lt;code&gt; &lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;THE OUTPUT WILL BE LIKE THIS:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZYExhowivR0v2ij7oEl82bmwiuC0R0KOcOLlapxJ2Hm4tkOgkjeCC1JVbKsuPQQm4XyyD4LcNWXvEuy3SQLK4ozbfENb3K4BSEFu12afbdVnb-yHE2fHw9MqBkyJvtu1e7stYjJAFK70/s1600/size_output.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZYExhowivR0v2ij7oEl82bmwiuC0R0KOcOLlapxJ2Hm4tkOgkjeCC1JVbKsuPQQm4XyyD4LcNWXvEuy3SQLK4ozbfENb3K4BSEFu12afbdVnb-yHE2fHw9MqBkyJvtu1e7stYjJAFK70/s1600/size_output.png&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/7457638230642724977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/7457638230642724977'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2012/02/find-size-of-data-types-in-c.html' title='Find the size of data types in C'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZYExhowivR0v2ij7oEl82bmwiuC0R0KOcOLlapxJ2Hm4tkOgkjeCC1JVbKsuPQQm4XyyD4LcNWXvEuy3SQLK4ozbfENb3K4BSEFu12afbdVnb-yHE2fHw9MqBkyJvtu1e7stYjJAFK70/s72-c/size_output.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-8584602368233909017</id><published>2011-12-20T11:25:00.000-08:00</published><updated>2011-12-20T11:42:14.899-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Computer Networks"/><title type='text'>What is bridge in computer networking?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Segmenting a large network with a network device has numerous benefits. Among these are reduced collisions (in an Ethernet network), contained bandwidth utilization, and the ability to filter out unwanted packets. However, if the addition of the interconnect device required extensive reconfiguration of stations, the benefits of the device would be outweighed by the administrative overhead required to keep the network running. &lt;b&gt;Bridges&lt;/b&gt; were created to allow network administrators to segment their networks transparently. This means that individual stations need not know whether there is a bridge separating them or not. It is up to the bridge to make sure that packets get properly forwarded to their destinations. This is the fundamental principle underlying all of the bridging behaviors.&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;
Bridges work at the Data Link layer of the OSI model. Since bridges work in the Data Link layer they do not examine the network layer addresses. They just look at the MAC addresses for Ethernet and Token Ring, token bus and determine whether or not to forward or ignore a packet. &lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Functions of a Bridge&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Isolates networks by MAC addresses&lt;/li&gt;
&lt;li&gt;Manages network traffic by filtering packets&lt;/li&gt;
&lt;li&gt;Translates from one MAC protocol to another&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
Now let us examine the functionality of a bridge in detail.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1. Isolates networks by MAC addresses&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
A bridge divides a network into separate collision domains. This reduces congestion as only frames that need to be forwarded are sent across interfaces. All transmissions between nodes connected to same segment are not forwarded and therefore do not load the rest of the network.&lt;br /&gt;
&lt;br /&gt;
Thus bridges effectively improve the bandwidth of the network by reducing the unnecessary traffic in the network.&lt;br /&gt;
&lt;br /&gt;
For example, if you have one segment called Segment 100: it has 50 users (in several departments) using this network segment. The Engineering Department is CAD (Computer Aided Design) - oriented, while the Accounting Department is into heavy number crunching (year end reports, month end statements, etc.). On this network, any traffic between Clients of Accounting Department and the Accounting File Server (in the Accounting Department) will be heard across the Segment 100. Likewise, any traffic between the Engineering Dept clients (to the CAD File Server) will be heard throughout the Network Segment. The result is that “Other” Department accesses to the Generic File Server are incredibly slow: this is because of the unnecessary traffic that’s being generated from other departments (Engineering and Accounting).&lt;br /&gt;
&lt;br /&gt;
The solution is to use one Bridge to isolate the Accounting Department, and another bridge to isolate the Engineering Department. The Bridges will only allow packets to pass through that are not on the local segment. The bridge will first check its “routing” table to see if the packet is on the local segment. If it is, it will ignore the packet, and not forward it to the remote segment. If Client of Accounting Department sends a packet to the Accounting File Server then Bridge #1 will check its routing table (to see if the Accounting File Server is on the local port). If it is on the local port, then Bridge #1 will not forward the packet to the other segments. If a Client of Accounting Department sends a packet to the Generic File Server, Bridge #1 will again check its routing table to see if the Generic File Server is on the local port. If it is not, then Bridge #1 will forward the packet to the remote port.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2. Manages network traffic by filtering packets&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Bridges listen to the network traffic, and build an image of the network on each side of the bridge. This image of the network indicates the location of each node (and the bridge’s port that accesses it). With this information, a bridge can make a decision whether to forward the packet across the bridge - if the destination address is not on the same port - or, it can decide not to forward the packet (if the destination is on the same port). &lt;br /&gt;
&lt;br /&gt;
This process of deciding whether or not to forward a packet is termed “filtering packets.” Network traffic is managed by deciding which packets can pass through the bridge; the bridge filters packets.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3. Translates from one protocol to another&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The MAC layer also contains the bus arbitration method used by the network. This can be CSMA/CD, as used in Ethernet, or Token Passing, as used in Token Ring. Bridges are aware of the Bus Arbitration and special translation bridges can be used to translate between Ethernet and Token Ring LANs.&lt;br /&gt;
&lt;br /&gt;
Bridges physically separate a network segment by managing the traffic (that’s based on the MAC address). Bridges are store and forward devices. They receive a packet on the local segment, store it, and wait for the remote segments to be clear before forwarding the packet. The two physical types of bridges are Local and Remote Bridges. &lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/8584602368233909017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2011/12/what-is-bridge-in-computer-networking.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/8584602368233909017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/8584602368233909017'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2011/12/what-is-bridge-in-computer-networking.html' title='What is bridge in computer networking?'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-8439230666860981204</id><published>2011-12-19T10:51:00.000-08:00</published><updated>2011-12-19T10:51:15.797-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Computer Networks"/><title type='text'>What are the functions of Repeaters</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
All types of network connections suffer from attenuation and pulse distortion. For a given cable specification and bit rate, each has a maximum length of cable. Repeaters can be used to increase the maximum interconnection length and will do the following:&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;Functions of Repeaters&lt;/b&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Clean signal pulses.&lt;/li&gt;
&lt;li&gt;Pass all signals between attached segments.&lt;/li&gt;
&lt;li&gt;Boost signal power.&lt;/li&gt;
&lt;li&gt;Possibly translate between two different media types (e.g., fiber – optic to twisted – pair cable)&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/8439230666860981204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2011/12/what-are-functions-of-repeaters.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/8439230666860981204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/8439230666860981204'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2011/12/what-are-functions-of-repeaters.html' title='What are the functions of Repeaters'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-6658099711859519064</id><published>2011-12-18T12:24:00.000-08:00</published><updated>2011-12-18T12:26:54.086-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Computer Networks"/><title type='text'>Stop and Wait Protocol</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
The sender allows one message to be transmitted, checked for errors and an appropriate ACK (Affirmative Acknowledgement) or NAK (Negative Acknowledgement) returned to the sending station. No other data messages can be transmitted until the receiving station sends back a reply, thus the name STOP and WAIT is derived from the originating station sending a message, stopping further transmission and waiting for a reply.&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;
Its major drawback is the idle line time that results when the stations are in the waiting period. If the ACK is lost then the sending station retransmits the same message to the receiver side. The redundant transmission could possibly create a duplicate frame. A typical approach to solve this problem is the provision for a sequence number in the header of the message. The receiver can then check for the sequence number to determine if the message is a duplicate. The Stop and Wait mechanism requires a very small sequence Number, since only one message is outstanding at any time. The sending and receiving station only use a one bit alternating sequence of 0 and 1 to maintain the relationship of the transmitted message and its ACK/NAK status.&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;a href=&quot;http://www.control.aau.dk/%7Eborch/NetworkDataCommunication/S8/Sessions/Protocols/p2.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;291&quot; src=&quot;http://www.control.aau.dk/%7Eborch/NetworkDataCommunication/S8/Sessions/Protocols/p2.gif&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/6658099711859519064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2011/12/stop-and-wait-protocol.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/6658099711859519064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/6658099711859519064'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2011/12/stop-and-wait-protocol.html' title='Stop and Wait Protocol'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2377822193400863181.post-5220090251086593657</id><published>2011-12-18T11:40:00.000-08:00</published><updated>2011-12-18T11:41:37.745-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Computer Networks"/><title type='text'>Frequency Division &amp; Time Division Multiplexing</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Frequency Division Multiplexing (FDM)&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;
In FDM the frequency spectrum is divided to form logical channels with each user having exclusive possession of the assigned channel.&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;Time Division Multiplexing (TDM)&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;
In TDM, the users take turns (in a round robin); each one is periodically getting the entire bandwidth for the allotted time.&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;
Television broadcasting provides an example of multiplexing. Each TV channel operates in a different frequency range, which is a portion of the allocated spectrum, with the inter-channel separation great enough to prevent interference. This system is an example of FDM. During the transmission of any program (Serial/film), there is an advertisement as well. These two alternate in time on the same frequency. This is an example of TDM.&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://myanswerz.blogspot.com/feeds/5220090251086593657/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://myanswerz.blogspot.com/2011/12/frequency-time-division-multiplexing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/5220090251086593657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2377822193400863181/posts/default/5220090251086593657'/><link rel='alternate' type='text/html' href='http://myanswerz.blogspot.com/2011/12/frequency-time-division-multiplexing.html' title='Frequency Division &amp; Time Division Multiplexing'/><author><name>Admin</name><uri>http://www.blogger.com/profile/13609665406451536455</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>