<?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: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-5238934573315809111</id><updated>2012-01-17T06:56:38.824-08:00</updated><category term='DATA TYPES'/><category term='DECLARE ARRAYS'/><category term='CONTROL STATEMENTS'/><category term='What Is An Identifier'/><category term='SWITCH CASE / SELECT CASE'/><category term='Array in C Language'/><category term='NESTED IF'/><category term='CHARACTER SET'/><category term='Definition of Variables'/><category term='JUMPS STATEMENTS'/><category term='What is a dangling pointer'/><category term='Advantages of C'/><category term='MACRO'/><category term='Algorithms'/><category term='How to write a C program'/><category term='PSEUDO CODE'/><category term='ARRAYS'/><category term='First C Program'/><category term='LOOPING'/><category term='Develop the Algorithm'/><category term='Add Comments in C'/><category term='Data and Variables'/><category term='List.xrel file'/><category term='sscanf()'/><category term='TYPE CASTING'/><category term='CONSTANTS'/><category term='VARIABLES'/><category term='String standard functions'/><category term='HEADER FILES'/><category term='OPERATORS'/><category term='sprintf()'/><category term='Write an algorithm to solve the problem'/><category term='File Handling in C Language'/><category term='Introduction to C Language'/><category term='STRING'/><category term='Rules for creating Variable'/><category term='Return 0 and Exit 0'/><category term='To Print Some Numbers'/><category term='NESTED LOOP'/><category term='DFUNDAMENTAL DATA TYPES'/><category term='DECLARE VARIABLE'/><title type='text'>C-Language Overview - Tutorial &amp; Theory for Beginners</title><subtitle type='html'>Overview of c programming language, Theory, tutorial, notes, basic programming in c for beginners...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://c-overview.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>55</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-3679475079155009902</id><published>2012-01-17T06:56:00.004-08:00</published><updated>2012-01-17T06:56:38.855-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='String standard functions'/><title type='text'>String standard functions</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: none; mso-padding-alt: 0in 5.4pt 0in 5.4pt;"&gt;&lt;tbody&gt;&lt;tr style="height: 12.5pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;"&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;b&gt;&lt;span style="font-size: 10.0pt;"&gt;Functions &lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;b&gt;&lt;span style="font-size: 10.0pt;"&gt;Description &lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 10.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="height: 12.5pt; mso-yfti-irow: 1;"&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Strlen() &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Determines the length of a   string &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="height: 12.5pt; mso-yfti-irow: 2;"&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Strcpy() &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Copies&amp;nbsp; a string from source to destination &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="height: 12.5pt; mso-yfti-irow: 3;"&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Strncpy() &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Copies characters of a string   to another string up to the specified length &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="height: 12.5pt; mso-yfti-irow: 4;"&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Stricmp() &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Compares characters of two   strings &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="height: 12.55pt; mso-yfti-irow: 5;"&gt;   &lt;td style="border: none; height: 12.55pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Strcmp() &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: none; height: 12.55pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Compares characters of two   strings up to the specified length &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="height: 12.5pt; mso-yfti-irow: 6;"&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Strncmp() &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Compares characters of two   strings up to the specified length &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="height: 12.5pt; mso-yfti-irow: 7;"&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Strnicmp() &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Compares characters of two   strings up to the specified length &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="height: 12.5pt; mso-yfti-irow: 8;"&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Strlwr() &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Converts uppercase characters   of a string to lower case &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="height: 12.4pt; mso-yfti-irow: 9;"&gt;   &lt;td style="border: none; height: 12.4pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Strupr() &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: none; height: 12.4pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Converts lowercase characters   of a string to upper case &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="height: 12.5pt; mso-yfti-irow: 10;"&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Strdup() &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Duplicates a string &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="height: 12.5pt; mso-yfti-irow: 11;"&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Strchr() &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Determines the first   occurrence of a given character in a string &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="height: 12.5pt; mso-yfti-irow: 12;"&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Strrchr() &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Determines the last   occurrence of a given character in a string &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="height: 12.5pt; mso-yfti-irow: 13;"&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Strstr() &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Determines the first   occurrence of a given string in another string &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="height: 12.5pt; mso-yfti-irow: 14;"&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Strcat() &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Appends source string to   destination string &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="height: 12.5pt; mso-yfti-irow: 15;"&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Strrev() &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Reverses all characters of a   string &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="height: 12.5pt; mso-yfti-irow: 16;"&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Strset() &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Sets all characters of a   string with a given argument or symbol &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="height: 12.5pt; mso-yfti-irow: 17;"&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Strspn() &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: none; height: 12.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Finds up to what length two   strings are identical &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="height: 24.5pt; mso-yfti-irow: 18; mso-yfti-lastrow: yes;"&gt;   &lt;td style="border: none; height: 24.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Strpbrk() &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: none; height: 24.5pt; padding: 0in 5.4pt 0in 5.4pt;" valign="top"&gt;   &lt;div class="Default"&gt;&lt;span style="font-size: 10.0pt;"&gt;Searches the first occurrence   of the character in a given string and then displays the string starting from   that character &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-3679475079155009902?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/3679475079155009902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/3679475079155009902'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2012/01/string-standard-functions.html' title='String standard functions'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-5050523289770629250</id><published>2012-01-17T06:56:00.002-08:00</published><updated>2012-01-17T06:56:19.223-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sprintf()'/><title type='text'>sprintf()</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;div class="Default"&gt;&lt;span style="color: windowtext;"&gt;&lt;span style="font-size: large;"&gt;This function is similar to the printf() function except for a small difference between them. The printf() function sends the output to the screen whereas the sprint() function writes the values of any data type to an array of characters.&lt;/span&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-5050523289770629250?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/5050523289770629250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/5050523289770629250'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2012/01/sprintf.html' title='sprintf()'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-6057419585686071939</id><published>2012-01-17T06:56:00.000-08:00</published><updated>2012-01-17T06:56:00.405-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sscanf()'/><title type='text'>sscanf()</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;div class="Default"&gt;&lt;span style="color: windowtext;"&gt;&lt;span style="font-size: large;"&gt;This function allows reading characters from a character array and writes them to another array. This function is similar to scanf(), but instead of reading from standard input it reads data from an array.&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-6057419585686071939?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/6057419585686071939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/6057419585686071939'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2012/01/sscanf.html' title='sscanf()'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-7882284072412092516</id><published>2012-01-17T06:52:00.001-08:00</published><updated>2012-01-17T06:53:57.719-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Add Comments in C'/><title type='text'>Add Comments in C</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Load the file comments.c and observe it on your monitor for an example of how comments&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;can be added to a C program.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;/* This is a comment ignored by the compiler */&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;main( ) /* This is another comment ignored by the compiler */&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;printf("We are looking at how comments are "); /* A comment is&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;allowed to be&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;continued on&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;another line */&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;2-3 C Tutorial Getting started in C&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;printf("used in C.\n");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;/* One more comment for effect */&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Comments are added to make a program more readable to you but the compiler must ignore the&amp;nbsp;comments. The slash star combination is used inC for comment delimiters. They are illustrated&amp;nbsp;in the program at hand. Please note that the program does not illustrate good commenting&amp;nbsp;practice, but is intended to illustrate where comments can go in a program. It is a very sloppy&amp;nbsp;looking program.&amp;nbsp;The first slash star combination introduces the first comment and the star at the end of the first&amp;nbsp;line terminates this comment. Note that this comment is prior to the beginning of the program&amp;nbsp;illustrating that a comment can precede the program itself. Good programming practice would&amp;nbsp;include a comment prior to the program with a short introductory description of the program.&amp;nbsp;The next comment is after the "main( )" program entry point and prior to the opening brace for&amp;nbsp;the program code itself.&amp;nbsp;The third comment starts after the first executable statement and continue for four lines. This&amp;nbsp;is perfectly legal because a comment can continue for as many lines as desired until it is terminated.&amp;nbsp;Note carefully that if anything were included in the blank spaces to the left of the three&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;continuation lines of the comment, it would be part of the comment and would not be compiled.&amp;nbsp;The last comment is located following the completion of the program, illustrating that comments&amp;nbsp;can go nearly anywhere in a C program.&amp;nbsp;Experiment with this program be adding comments in other places to see what will happen.&amp;nbsp;Comment out one of the printf statements by putting comment delimiters both before and after&amp;nbsp;it and see that it does not get printed out.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Comments are very important in any programming language because you will soon forget what&amp;nbsp;you did and why you did it. It will be much easier to modify or fix a well commented program&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;a year from now than one with few or no comments. You will very quickly develop your own&amp;nbsp;personal style of commenting.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Somecompilers allow you to "nest" comments which can be very handy if you need to "comment&amp;nbsp;out" a section of code during debugging. Check your compiler documentation for the availability&amp;nbsp;of this feature with your particular compiler. Compile and run comments.c at this time.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-7882284072412092516?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/7882284072412092516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/7882284072412092516'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2012/01/add-comments-in-c.html' title='Add Comments in C'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-7410209739567406012</id><published>2012-01-17T06:51:00.000-08:00</published><updated>2012-01-17T06:51:41.108-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='To Print Some Numbers'/><title type='text'>To Print Some Numbers</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Load the file named oneint.c and display it on the monitor for our first example of how to&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;work with data in a C program.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt;main&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: navy; font-family: 'Courier New';"&gt;(&lt;/span&gt;&lt;/b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: navy; font-family: 'Courier New';"&gt;)&lt;/span&gt;&lt;/b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: navy; font-family: 'Courier New';"&gt;{&lt;/span&gt;&lt;/b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #8000ff; font-family: 'Courier New';"&gt;int&lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt; index&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: navy; font-family: 'Courier New';"&gt;;&lt;/span&gt;&lt;/b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt;index &lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: navy; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;/b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt; &lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #ff8000; font-family: 'Courier New';"&gt;13&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: navy; font-family: 'Courier New';"&gt;;&lt;/span&gt;&lt;/b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt;printf&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: navy; font-family: 'Courier New';"&gt;(&lt;/span&gt;&lt;/b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: grey; font-family: 'Courier New';"&gt;"The value of the index is %d\n"&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: navy; font-family: 'Courier New';"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt;index&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: navy; font-family: 'Courier New';"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt;index &lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: navy; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;/b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt; &lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #ff8000; font-family: 'Courier New';"&gt;27&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: navy; font-family: 'Courier New';"&gt;;&lt;/span&gt;&lt;/b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt;printf&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: navy; font-family: 'Courier New';"&gt;(&lt;/span&gt;&lt;/b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: grey; font-family: 'Courier New';"&gt;"The valve of the index = %d\n"&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: navy; font-family: 'Courier New';"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt;index&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: navy; font-family: 'Courier New';"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt;index &lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: navy; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;/b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt; &lt;/span&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #ff8000; font-family: 'Courier New';"&gt;10&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: navy; font-family: 'Courier New';"&gt;;&lt;/span&gt;&lt;/b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt;printf&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: navy; font-family: 'Courier New';"&gt;(&lt;/span&gt;&lt;/b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: grey; font-family: 'Courier New';"&gt;"The value of the index = %d\n"&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: navy; font-family: 'Courier New';"&gt;,&lt;/span&gt;&lt;/b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt;index&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: navy; font-family: 'Courier New';"&gt;);&lt;/span&gt;&lt;/b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: 'Courier New';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: navy; font-family: 'Courier New';"&gt;}&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-highlight: white;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;The entry point "main" should be clear to you by now as well as the beginning brace. The first&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;new thing we encounter is the line containing "int index;", which is used to define an integer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;variable named "index". The "int" is a reserved word in C, and can therefore not be used for&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;anything else. It defines a variable that can have a value from -32768 to 32767 on most MS-DOS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;microcomputer implementations of C. It defines a variable with a value from -2147483648 to&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;2147483647 in HiTech C. Consult your compiler users manual for the exact definition for your&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;compiler. The variable name, "index", can be any name that follows the rules for an identifier&amp;nbsp;and is not one of the reserved words for C. Consult your manual for an exact definition of an&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;identifier for your compiler. In HiTech C, the construction of identifier names is the same as&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;in UNIX, however 31 characters and both cases are significant. The compiler prepends an&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;underscore to external references in the assembler pass. The final character on the line, the&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;semi-colon, is the statement terminator used in C.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;We will see in a later chapter that additional integers could also be defined on the same line,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;but we will not complicate the present situation.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Observing the main body of the program, you will notice that there are three statements that&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;assign a value to the variable "index", but only one at a time. The first one assigns the value of&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;13 to "index", and its value is printed out. (We will see how shortly.) Later, the value 27 is&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;assigned to "index", and finally 10 is assigned to it, each value being printed out. It should be&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;intuitively clear that "index" is indeed a variable and can store many different values. Please&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;note that many times the words "printed out" are used to mean "displayed on the monitor". You&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;will find that in many cases experienced programmers take this liberty, probably due to the&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;"printf" function being used for monitor display.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-7410209739567406012?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/7410209739567406012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/7410209739567406012'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2012/01/to-print-some-numbers.html' title='To Print Some Numbers'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-3269076859591016213</id><published>2012-01-17T06:41:00.001-08:00</published><updated>2012-01-17T06:41:47.425-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='First C Program'/><title type='text'>First C Program</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;You are looking at the simplest possible C program. There is no way to simplify this program,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;or to leave anything out. Unfortunately, the program doesn’t do anything.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;{}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;The word "main" is very important, and must appear once, and only once, in every C program.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;This is the point where execution is begun when the program is run. We will see later that this&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;does not have to be the first statement in the program, but it must exist as the entry point.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Following the "main" program name is a pair of parentheses, which are an indication to the&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;compiler that this is a function. We will cover exactly what a function is in due time. For now,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;I suggest that you simply include the pair of parentheses.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;The two curly brackets { }, properly called braces, are used to define the limits of the program&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;itself. The actual program statements go between the two braces and in this case, there are no&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;statements because the program does absolutely nothing. Youcan compile and run this program,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;but since it has no executable statements, it does nothing. Keep in mind however, that it is a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;valid C program.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-3269076859591016213?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/3269076859591016213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/3269076859591016213'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2012/01/first-c-program.html' title='First C Program'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-6569401677089755651</id><published>2012-01-17T06:40:00.001-08:00</published><updated>2012-01-17T06:40:51.604-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='List.xrel file'/><title type='text'>List.xrel file</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;This file will list the source files for you with line numbers and filename. To use it, simply type&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;"LIST" followed by the appropriate filename. Type list firstex.c now for an example.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;The C source code is given later in Chapter 14 along with a brief description of its operation.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Applix 1616 users always have the inbuilt edit comand available to them, so this program&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;isn’t really essential.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-6569401677089755651?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/6569401677089755651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/6569401677089755651'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2012/01/listxrel-file.html' title='List.xrel file'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-592706437851699851</id><published>2012-01-17T06:38:00.001-08:00</published><updated>2012-01-17T06:38:57.099-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='What Is An Identifier'/><title type='text'>What Is An Identifier</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Before you can do anything in any language, you must at least know how you name an identifier.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;An indentifier is used for any variable, function, data definition, etc. In the programming language&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;C, an identifier is a combination of alphanumeric characters, the first being a letter of the&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;alphabet or an underline, and the remaining being any letter of the alphabet, any numeric digit,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;or the underline. Two rules must be kept in mind when naming identifiers.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;1. The case of alphabetic characters is significant. Using "INDEX" for a variable is not&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;the same as using "index" and neither of them is the same as using "InDex" for a variable. All&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;three refer to different variables.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;2. As C is defined, up to eight significant characters can be used and will be considered&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;significant. If more than eight are used, they may be ignored by the compiler. This may or may&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;not be true of your compiler. You should check your reference manual to find out how many&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;characters are significant for your compiler. The HiTech C compiler used with the Applix 1616&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;allows 31 significant characters, and prepends an underscore (_)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;It should be pointed out that some C compilers allow use of a dollar sign in an identifier name,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;but since it is not universal, it will not be used anywhere in this tutorial. Check your documentation&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;to see if it is permissible for your particular compiler.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-592706437851699851?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/592706437851699851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/592706437851699851'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2012/01/what-is-identifier.html' title='What Is An Identifier'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-7500695333902124560</id><published>2012-01-16T06:13:00.000-08:00</published><updated>2012-01-16T06:13:56.785-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Return 0 and Exit 0'/><title type='text'>Difference between return 0 and exit(0)</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="color: black;"&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="font-size: large;"&gt;return 0 is used when a funtion has return type of int n we do not return any variable , where as exit(0) is used to terminate the program abruptly, it can take values in miliseconds.&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;return:&lt;/b&gt; control return to a function.&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;exit():&lt;/b&gt;Use to terminate a process.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-7500695333902124560?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/7500695333902124560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/7500695333902124560'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2012/01/difference-between-return-0-and-exit0.html' title='Difference between return 0 and exit(0)'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-3206628077031643556</id><published>2011-08-18T13:26:00.000-07:00</published><updated>2011-08-18T13:26:23.961-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='File Handling in C Language'/><title type='text'>File Handling in C Language</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;In this section, we will discuss about files which are very important for storing information permanently. We store information in files for many purposes, like data processing by our programs.&lt;/div&gt;&lt;h1 style="color: #333333; font-family: Verdana, Geneva, sans-serif; font-size: 18px; font-style: normal; line-height: 24px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;What is a File?&lt;/h1&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Abstractly, a file is a collection of bytes stored on a secondary storage device, which is generally a disk of some kind. The collection of bytes may be interpreted, for example, as characters, words, lines, paragraphs and pages from a textual document; fields and records belonging to a database; or pixels from a graphical image. The meaning attached to a particular file is determined entirely by the data structures and operations used by a program to process the file. It is conceivable (and it sometimes happens) that a graphics file will be read and displayed by a program designed to process textual data. The result is that no meaningful output occurs (probably) and this is to be expected. A file is simply a machine decipherable storage media where programs and data are stored for machine usage.&lt;/div&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Essentially there are two kinds of files that programmers deal with text files and binary files. These two classes of files will be discussed in the following sections.&lt;/div&gt;&lt;h2 style="color: #333333; font-family: Verdana, Geneva, sans-serif; font-size: 1.25em; font-style: normal; margin-bottom: 0em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;ASCII Text files&lt;/h2&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;A text file can be a stream of characters that a computer can process sequentially. It is not only processed sequentially but only in forward direction. For this reason a text file is usually opened for only one kind of operation (reading, writing, or appending) at any given time.&lt;/div&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Similarly, since text files only process characters, they can only read or write data one character at a time. (In C Programming Language, Functions are provided that deal with lines of text, but these still essentially process data one character at a time.) A text stream in C is a special kind of file. Depending on the requirements of the operating system, newline characters may be converted to or from carriage-return/linefeed combinations depending on whether data is being written to, or read from, the file. Other character conversions may also occur to satisfy the storage requirements of the operating system. These translations occur transparently and they occur because the programmer has signalled the intention to process a text file.&lt;/div&gt;&lt;h2 style="color: #333333; font-family: Verdana, Geneva, sans-serif; font-size: 1.25em; font-style: normal; margin-bottom: 0em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Binary files&lt;/h2&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;A binary file is no different to a text file. It is a collection of bytes. In C Programming Language a byte and a character are equivalent. Hence a binary file is also referred to as a character stream, but there are two essential differences.&lt;/div&gt;&lt;ol style="margin-bottom: 0px; margin-left: 25px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;No special processing of the data occurs and each byte of data is transferred to or from the disk unprocessed.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;C Programming Language places no constructs on the file, and it may be read from, or written to, in any manner chosen by the programmer.&lt;/li&gt;&lt;/ol&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Binary files can be either processed sequentially or, depending on the needs of the application, they can be processed using random access techniques. In C Programming Language, processing a file using random access techniques involves moving the current file position to an appropriate place in the file before reading or writing data. This indicates a second characteristic of binary files.&lt;br /&gt;They a generally processed using read and write operations simultaneously.&lt;/div&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;For example, a database file will be created and processed as a binary file. A record update operation will involve locating the appropriate record, reading the record into memory, modifying it in some way, and finally writing the record back to disk at its appropriate location in the file. These kinds of operations are common to many binary files, but are rarely found in applications that process text files.&lt;/div&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;h2 style="color: #333333; font-family: Verdana, Geneva, sans-serif; font-size: 1.25em; font-style: normal; margin-bottom: 0em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;Creating a file and output some data&lt;/span&gt;&lt;/h2&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;In order to create files we have to learn about File I/O i.e. how to write data into a file and how to read data from a file. We will start this section with an example of writing data to a file. We begin as before with the include statement for stdio.h, then define some variables for use in the example including a rather strange looking new type.&lt;/span&gt;&lt;/div&gt;&lt;pre style="border-bottom-color: rgb(216, 216, 216); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(216, 216, 216); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(216, 216, 216); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(216, 216, 216); border-top-style: solid; border-top-width: 1px; color: seagreen; display: block; font-family: Monaco, 'Andale Mono', 'Courier New', Courier, mono; font-size: 0.9em; font-style: normal; font-variant: normal; height: auto; line-height: 1.3em; margin-bottom: 2px; margin-top: 2px; max-height: 200px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;/* Program to create a file and write some data the file */&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;main( )&lt;br /&gt;{&lt;br /&gt;     FILE *fp;&lt;br /&gt;     char stuff[25];&lt;br /&gt;     int index;&lt;br /&gt;     fp = fopen("TENLINES.TXT","w"); /* open for writing */&lt;br /&gt;     strcpy(stuff,"This is an example line.");&lt;br /&gt;     for (index = 1; index &amp;lt;= 10; index++)&lt;br /&gt;     	fprintf(fp,"%s Line number %d\n", stuff, index);&lt;br /&gt;     fclose(fp); /* close the file before ending program */&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;The type FILE is used for a file variable and is defined in the stdio.h file. It is used to define a file pointer for use in file operations. Before we can write to a file, we must open it. What this really means is that we must tell the system that we want to write to a file and what the file name is. We do this with the fopen() function illustrated in the first line of the program. The file pointer, fp in our case, points to the file and two arguments are required in the parentheses, the file name first, followed by the file type.&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;The file name is any valid DOS file name, and can be expressed in upper or lower case letters, or even mixed if you so desire. It is enclosed in double quotes. For this example we have chosen the name TENLINES.TXT. This file should not exist on your disk at this time. If you have a file with this name, you should change its name or move it because when we execute this program, its contents will be erased. If you donâ€™t have a file by this name, that is good because we will create one and put some data into it. You are permitted to include a directory with the file name.The directory must, of course, be a valid directory otherwise an error will occur. Also, because of the way C handles literal strings, the directory separation character â€˜\â€™ must be written twice. For example, if the file is to be stored in the \PROJECTS sub directory then the file name should be entered as “\\PROJECTS\\TENLINES.TXT”. The second parameter is the file attribute and can be any of three letters, r, w, or a, and must be lower case.&lt;/span&gt;&lt;/div&gt;&lt;h3 style="color: #333333; font-family: Verdana, Geneva, sans-serif; font-size: 1.25em; font-style: normal; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 1.3em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;Reading (r)&lt;/span&gt;&lt;/h3&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;When an r is used, the file is opened for reading, a w is used to indicate a file to be used for writing, and an a indicates that you desire to append additional data to the data already in an existing file. Most C compilers have other file attributes available; check your Reference Manual for details. Using the r indicates that the file is assumed to be a text file. Opening a file for reading requires that the file already exist. If it does not exist, the file pointer will be set to NULL and can be checked by the program.&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;Here is a small program that reads a file and display its contents on screen.&lt;/span&gt;&lt;/div&gt;&lt;pre style="border-bottom-color: rgb(216, 216, 216); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(216, 216, 216); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(216, 216, 216); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(216, 216, 216); border-top-style: solid; border-top-width: 1px; color: seagreen; display: block; font-family: Monaco, 'Andale Mono', 'Courier New', Courier, mono; font-size: 0.9em; font-style: normal; font-variant: normal; height: auto; line-height: 1.3em; margin-bottom: 2px; margin-top: 2px; max-height: 200px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;/* Program to display the contents of a file on screen */&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;void main()&lt;br /&gt;{&lt;br /&gt;   FILE *fopen(), *fp;&lt;br /&gt;   int c;&lt;br /&gt;   fp = fopen("prog.c","r");&lt;br /&gt;   c = getc(fp) ;&lt;br /&gt;   while (c!= EOF)&lt;br /&gt;   {&lt;br /&gt;   		putchar(c);&lt;br /&gt;		c = getc(fp);&lt;br /&gt;   }&lt;br /&gt;   fclose(fp);&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;h3 style="color: #333333; font-family: Verdana, Geneva, sans-serif; font-size: 1.25em; font-style: normal; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 1.3em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;Writing (w)&lt;/span&gt;&lt;/h3&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;When a file is opened for writing, it will be created if it does not already exist and it will be reset if it does, resulting in the deletion of any data already there. Using the w indicates that the file is assumed to be a text file.&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;Here is the program to create a file and write some data into the file.&lt;/span&gt;&lt;/div&gt;&lt;pre style="border-bottom-color: rgb(216, 216, 216); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(216, 216, 216); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(216, 216, 216); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(216, 216, 216); border-top-style: solid; border-top-width: 1px; color: seagreen; display: block; font-family: Monaco, 'Andale Mono', 'Courier New', Courier, mono; font-size: 0.9em; font-style: normal; font-variant: normal; height: auto; line-height: 1.3em; margin-bottom: 2px; margin-top: 2px; max-height: 200px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt; FILE *fp;&lt;br /&gt; file = fopen("file.txt","w");&lt;br /&gt; /*Create a file and add text*/&lt;br /&gt; fprintf(fp,"%s","This is just an example :)"); /*writes data to the file*/&lt;br /&gt; fclose(fp); /*done!*/&lt;br /&gt; return 0;&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;h3 style="color: #333333; font-family: Verdana, Geneva, sans-serif; font-size: 1.25em; font-style: normal; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 1.3em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0.5em;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;Appending (a)&lt;/span&gt;&lt;/h3&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;When a file is opened for appending, it will be created if it does not already exist and it will be initially empty. If it does exist, the data input point will be positioned at the end of the present data so that any new data will be added to any data that already exists in the file. Using the a indicates that the file is assumed to be a text file.&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;Here is a program that will add text to a file which already exists and there is some text in the file.&lt;/span&gt;&lt;/div&gt;&lt;pre style="border-bottom-color: rgb(216, 216, 216); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(216, 216, 216); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(216, 216, 216); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(216, 216, 216); border-top-style: solid; border-top-width: 1px; color: seagreen; display: block; font-family: Monaco, 'Andale Mono', 'Courier New', Courier, mono; font-size: 0.9em; font-style: normal; font-variant: normal; height: auto; line-height: 1.3em; margin-bottom: 2px; margin-top: 2px; max-height: 200px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;    FILE *fp&lt;br /&gt;    file = fopen("file.txt","a");&lt;br /&gt;    fprintf(fp,"%s","This is just an example :)"); /*append some text*/&lt;br /&gt;    fclose(fp);&lt;br /&gt;    return 0;&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;h2 style="color: #333333; font-family: Verdana, Geneva, sans-serif; font-size: 1.25em; font-style: normal; margin-bottom: 0em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;Outputting to the file&lt;/span&gt;&lt;/h2&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;The job of actually outputting to the file is nearly identical to the outputting we have already done to the standard output device. The only real differences are the new function names and the addition of the file pointer as one of the function arguments. In the example program, fprintf replaces our familiar printf function name, and the file pointer defined earlier is the first argument within the parentheses. The remainder of the statement looks like, and in fact is identical to, the printf statement.&lt;/span&gt;&lt;/div&gt;&lt;h2 style="color: #333333; font-family: Verdana, Geneva, sans-serif; font-size: 1.25em; font-style: normal; margin-bottom: 0em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;Closing a file&lt;/span&gt;&lt;/h2&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;To close a file you simply use the function fclose with the file pointer in the parentheses. Actually, in this simple program, it is not necessary to close the file because the system will close all open files before returning to DOS, but it is good programming practice for you to close all files in spite of the fact that they will be closed automatically, because that would act as a reminder to you of what files are open at the end of each program.&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;You can open a file for writing, close it, and reopen it for reading, then close it, and open it again for appending, etc. Each time you open it, you could use the same file pointer, or you could use a different one. The file pointer is simply a tool that you use to point to a file and you decide what file it will point to. Compile and run this program. When you run it, you will not get any output to the monitor because it doesnâ€™t generate any. After running it, look at your directory for a file named TENLINES.TXT and type it; that is where your output will be. Compare the output with that specified in the program; they should agree! Do not erase the file named TENLINES.TXT yet; we will use it in&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;some of the other examples in this section.&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;Reading from a text file&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="background-color: white; color: seagreen; font-family: Monaco, 'Andale Mono', 'Courier New', Courier, mono; font-size: 12px; line-height: 15px; white-space: pre;"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Now for our first program that reads from a file. This program begins with the familiar include, some data definitions, and the file opening statement which should require no explanation except for the fact that an r is used here because we want to read it.&lt;/div&gt;&lt;pre style="border-bottom-color: rgb(216, 216, 216); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(216, 216, 216); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(216, 216, 216); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(216, 216, 216); border-top-style: solid; border-top-width: 1px; color: seagreen; display: block; font-family: Monaco, 'Andale Mono', 'Courier New', Courier, mono; font-size: 0.9em; font-style: normal; font-variant: normal; height: auto; line-height: 1.3em; margin-bottom: 2px; margin-top: 2px; max-height: 200px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;"&gt;main( )&lt;br /&gt;   {&lt;br /&gt;     FILE *fp;&lt;br /&gt;     char c;&lt;br /&gt;     funny = fopen("TENLINES.TXT", "r");&lt;br /&gt;     if (fp == NULL)&lt;br /&gt;		printf("File doesn't exist\n");&lt;br /&gt;     else {&lt;br /&gt;      do {&lt;br /&gt;       c = getc(fp); /* get one character from the file&lt;br /&gt;       */&lt;br /&gt;         putchar(c); /* display it on the monitor&lt;br /&gt;       */&lt;br /&gt;       } while (c != EOF); /* repeat until EOF (end of file)&lt;br /&gt;     */&lt;br /&gt;     }&lt;br /&gt;    fclose(fp);&lt;br /&gt;   }&lt;/pre&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;In this program we check to see that the file exists, and if it does, we execute the main body of the program. If it doesn’t, we print a message and quit. If the file does not exist, the system will set the pointer equal to NULL which we can test. The main body of the program is one do while loop in which a single character is read from the file and output to the monitor until an EOF (end of file) is detected from the input file. The file is then closed and the program is terminated. At this point, we have the potential for one of the most common and most perplexing problems of programming in C. The variable returned from the getc function is a character, so we can use a char variable for this purpose. There is a problem that could develop here if we happened to use an unsigned char however, because C usually returns a minus one for an EOF – which an unsigned char type variable is not&lt;br /&gt;capable of containing. An unsigned char type variable can only have the values of zero to 255, so it will return a 255 for a minus one in C. This is a very frustrating problem to try to find. The program can never find the EOF and will therefore never terminate the loop. This is easy to prevent: always have a char or int type variable for use in returning an EOF. There is another problem with this program but we will worry about it when we get to the next program and solve it with the one following that.&lt;/div&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;After you compile and run this program and are satisfied with the results, it would be a good exercise to change the name of TENLINES.TXT and run the program again to see that the NULL test actually works as stated. Be sure to change the name back because we are still not finished with TENLINES.TXT.&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-3206628077031643556?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/3206628077031643556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/3206628077031643556'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2011/08/file-handling-in-c-language.html' title='File Handling in C Language'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-539915354184325169</id><published>2011-08-18T13:23:00.001-07:00</published><updated>2011-08-18T13:24:20.289-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Array in C Language'/><title type='text'>Array in C Language</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;h2 style="color: #333333; font-family: Verdana, Geneva, sans-serif; font-size: 1.25em; font-style: normal; margin-bottom: 0em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;What is an Array in C Language?&lt;/h2&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;An array in C Programing Language can be defined as number of memory locations, each of which can store the same data type and which can be references through the same variable name.&lt;/div&gt;&lt;div style="line-height: 19px; margin-bottom: 1em; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;An array is a collective name given to a group of similar quantities. These similar quantities could be percentage marks of 100 students, number of chairs in home, or salaries of 300 employees or ages of 25 students. Thus an array is a collection of similar elements. These similar elements could be all integers or all floats or all characters etc. Usually, the array of characters is called a “string”, where as an array of integers or floats is called simply an array. All elements of any given array must be of the same type i.e we can’t have an array of 10 numbers, of which 5 are ints and 5 are floats.&lt;/div&gt;&lt;div id="quoteright" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Arrays and pointers have a special relationship as arrays use pointers to reference memory locations.&lt;/div&gt;&lt;div id="quoteright" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Declaration of an Array&lt;br /&gt;&lt;br /&gt;Arrays must be declared before they can be used in the program. Standard array declaration is as&lt;br /&gt;&lt;br /&gt;type variable_name[lengthofarray];&lt;br /&gt;&lt;br /&gt;Here type specifies the variable type of the element which is going to be stored in the array. In C programmin language we can declare the array of any basic standard type which C language supports. For example&lt;br /&gt;&lt;br /&gt;double height[10];&lt;br /&gt;float width[20];&lt;br /&gt;int min[9];&lt;br /&gt;char name[20];&lt;br /&gt;&lt;br /&gt;In C Language, arrays starts at position 0. The elements of the array occupy adjacent locations in memory. C Language treats the name of the array as if it were a pointer to the first element This is important in understanding how to do arithmetic with arrays. Any item in the array can be accessed through its index, and it can be accesed any where from with in the program. So&lt;br /&gt;&lt;br /&gt;m=height[0];&lt;br /&gt;&lt;br /&gt;variable m will have the value of first item of array height.&lt;br /&gt;&lt;br /&gt;The program below will declare an array of five integers and print all the elements of the array.&lt;br /&gt;&lt;br /&gt;int myArray [5] = {1,2,3,4,5};&lt;br /&gt;/* To print all the elements of the array&lt;br /&gt;for (int i=0;i&amp;lt;5;i++){&lt;br /&gt;&amp;nbsp; &amp;nbsp;printf("%d", myArray[i]);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Initializing Arrays&lt;br /&gt;&lt;br /&gt;Initializing of array is very simple in c programming. The initializing values are enclosed within the curly braces in the declaration and placed following an equal sign after the array name. Here is an example which declares and initializes an array of five elements of type int. Array can also be initialized after declaration. Look at the following C code which demonstrate the declaration andÂ initialization of an array.&lt;br /&gt;&lt;br /&gt;int myArray[5] = {1, 2, 3, 4, 5}; //declare and initialize the array in one statement&lt;br /&gt;int studentAge[4];&lt;br /&gt;studentAge[0]=14;&lt;br /&gt;studentAge[1]=13;&lt;br /&gt;studentAge[2]=15;&lt;br /&gt;studentAge[3]=16;&lt;br /&gt;&lt;br /&gt;Performing operations on Arrays&lt;br /&gt;&lt;br /&gt;Here is a program that will demonstrate the simple operations of the array.&lt;br /&gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;void oneWay(void);&lt;br /&gt;void anotherWay(void);&lt;br /&gt;int main(void) {&lt;br /&gt;&amp;nbsp; &amp;nbsp;printf("\noneWay:\n");&lt;br /&gt;&amp;nbsp; &amp;nbsp;oneWay();&lt;br /&gt;&amp;nbsp; &amp;nbsp;printf("\nantherWay:\n");&lt;br /&gt;&amp;nbsp; &amp;nbsp;anotherWay();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/*Array initialized with aggregate */&lt;br /&gt;void oneWay(void) {&lt;br /&gt;&amp;nbsp; &amp;nbsp;int vect[10] = {1,2,3,4,5,6,7,8,9,0};&lt;br /&gt;&amp;nbsp; &amp;nbsp;int i;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (i=0; i&amp;lt;10; i++){&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("i = %2d vect[i] = %2d\n", i, vect[i]);&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/*Array initialized with loop */&lt;br /&gt;void anotherWay(void) {&lt;br /&gt;&amp;nbsp; &amp;nbsp;int vect[10];&lt;br /&gt;&amp;nbsp; &amp;nbsp;int i;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (i=0; i&amp;lt;10; i++)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vect[i] = i+1;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (i=0; i&amp;lt;10; i++)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf("i = %2d vect[i] = %2d\n", i, vect[i]);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* The output of this program is&lt;br /&gt;&amp;nbsp; &amp;nbsp;oneWay:&lt;br /&gt;&amp;nbsp; &amp;nbsp;i = 0 vect[i] = 1&lt;br /&gt;&amp;nbsp; &amp;nbsp;i = 1 vect[i] = 2&lt;br /&gt;&amp;nbsp; &amp;nbsp;i = 2 vect[i] = 3&lt;br /&gt;&amp;nbsp; &amp;nbsp;i = 3 vect[i] = 4&lt;br /&gt;&amp;nbsp; &amp;nbsp;i = 4 vect[i] = 5&lt;br /&gt;&amp;nbsp; &amp;nbsp;i = 5 vect[i] = 6&lt;br /&gt;&amp;nbsp; &amp;nbsp;i = 6 vect[i] = 7&lt;br /&gt;&amp;nbsp; &amp;nbsp;i = 7 vect[i] = 8&lt;br /&gt;&amp;nbsp; &amp;nbsp;i = 8 vect[i] = 9&lt;br /&gt;&amp;nbsp; &amp;nbsp;i = 9 vect[i] = 0&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;antherWay:&lt;br /&gt;&amp;nbsp; &amp;nbsp;i = 0 vect[i] = 1&lt;br /&gt;&amp;nbsp; &amp;nbsp;i = 1 vect[i] = 2&lt;br /&gt;&amp;nbsp; &amp;nbsp;i = 2 vect[i] = 3&lt;br /&gt;&amp;nbsp; &amp;nbsp;i = 3 vect[i] = 4&lt;br /&gt;&amp;nbsp; &amp;nbsp;i = 4 vect[i] = 5&lt;br /&gt;&amp;nbsp; &amp;nbsp;i = 5 vect[i] = 6&lt;br /&gt;&amp;nbsp; &amp;nbsp;i = 6 vect[i] = 7&lt;br /&gt;&amp;nbsp; &amp;nbsp;i = 7 vect[i] = 8&lt;br /&gt;&amp;nbsp; &amp;nbsp;i = 8 vect[i] = 9&lt;br /&gt;&amp;nbsp; &amp;nbsp;i = 9 vect[i] = 10&lt;br /&gt;&amp;nbsp; &amp;nbsp;*/&lt;br /&gt;&lt;br /&gt;Here is a more complex program that will demonstrate how to read, write and traverse the integer arrays&lt;br /&gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;void intSwap(int *x, int *y);&lt;br /&gt;int getIntArray(int a[], int nmax, int sentinel);&lt;br /&gt;void printIntArray(int a[], int n);&lt;br /&gt;void reverseIntArray(int a[], int n);&lt;br /&gt;&lt;br /&gt;int main(void) {&lt;br /&gt;&amp;nbsp; &amp;nbsp;int x[10];&lt;br /&gt;&amp;nbsp; &amp;nbsp;int hmny;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;hmny = getIntArray(x, 10, 0);&lt;br /&gt;&amp;nbsp; &amp;nbsp;printf("The array was: \n");&lt;br /&gt;&amp;nbsp; &amp;nbsp;printIntArray(x,hmny);&lt;br /&gt;&amp;nbsp; &amp;nbsp;reverseIntArray(x,hmny);&lt;br /&gt;&amp;nbsp; &amp;nbsp;printf("after reverse it is:\n");&lt;br /&gt;&amp;nbsp; &amp;nbsp;printIntArray(x,hmny);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void intSwap(int *x, int *y)&lt;br /&gt;/* It swaps the content of x and y */&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp;int temp = *x;&lt;br /&gt;&amp;nbsp; &amp;nbsp;*x = *y;&lt;br /&gt;&amp;nbsp; &amp;nbsp;*y = temp;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* n is the number of elements in the array a.&lt;br /&gt;* These values are printed out, five per line. */&lt;br /&gt;void printIntArray(int a[], int n){&lt;br /&gt;&amp;nbsp; &amp;nbsp;int i;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for (i=0; i&amp;lt;n; ){&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; printf("\t%d ", a[i++]);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; if (i%5==0)&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; printf("\n");&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp; &amp;nbsp;printf("\n");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* It reads up to nmax integers and stores then in a; sentinel&lt;br /&gt;* terminates input. */&lt;br /&gt;int getIntArray(int a[], int nmax, int sentinel)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp;int n = 0;&lt;br /&gt;&amp;nbsp; &amp;nbsp;int temp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;do {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;printf("Enter integer [%d to terminate] : ", sentinel);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;scanf("%d", &amp;amp;temp);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if (temp==sentinel) break;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if (n==nmax)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("array is full\n");&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;a[n++] = temp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;}while (1);&lt;br /&gt;&amp;nbsp; &amp;nbsp;return n;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* It reverse the order of the first n elements of array */&lt;br /&gt;void reverseIntArray(int a[], int n)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp;int i;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for(i=0;i&amp;lt;n/2;i++){&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;intSwap(&amp;amp;a[i],&amp;amp;a[n-i-1]);&lt;br /&gt;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Copy one array into another&lt;br /&gt;&lt;br /&gt;There is no such statement in C language which can directly copy an array into another array. So we have to copy each item seperately into another array.&lt;br /&gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp;int iMarks[4];&lt;br /&gt;&amp;nbsp; &amp;nbsp;short newMarks[4];&lt;br /&gt;&amp;nbsp; &amp;nbsp;iMarks[0]=78;&lt;br /&gt;&amp;nbsp; &amp;nbsp;iMarks[1]=64;&lt;br /&gt;&amp;nbsp; &amp;nbsp;iMarks[2]=66;&lt;br /&gt;&amp;nbsp; &amp;nbsp;iMarks[3]=74;&lt;br /&gt;&amp;nbsp; &amp;nbsp;for(i=0; i&amp;lt;4; i++)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;newMarks[i]=iMarks[i];&lt;br /&gt;&amp;nbsp; &amp;nbsp;for(j=0; j&amp;lt;4; j++)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;printf("%d\n", newMarks[j]);&lt;br /&gt;&amp;nbsp; &amp;nbsp;return 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;To summarize, arrays are provides a simple mechanism where more than one elements of same type are to be used. We can maintain, manipulate and store multiple elements of same type in one array variable and access them through index.&lt;br /&gt;&lt;br /&gt;Multidimensional Arrays&lt;br /&gt;&lt;br /&gt;In C Language one can have arrays of any dimensions. To understand the concept&lt;br /&gt;of multidimensional arrays let us consider the following 4 X 5 matrix&lt;br /&gt;&lt;br /&gt;Row number (i)&lt;br /&gt;&lt;br /&gt;Column numbers (j)&lt;br /&gt;&lt;br /&gt;0&lt;br /&gt;&lt;br /&gt;11&lt;br /&gt;&lt;br /&gt;3&lt;br /&gt;&lt;br /&gt;5&lt;br /&gt;&lt;br /&gt;-9&lt;br /&gt;&lt;br /&gt;-6&lt;br /&gt;&lt;br /&gt;1&lt;br /&gt;&lt;br /&gt;5&lt;br /&gt;&lt;br /&gt;6&lt;br /&gt;&lt;br /&gt;-8&lt;br /&gt;&lt;br /&gt;7&lt;br /&gt;&lt;br /&gt;24&lt;br /&gt;&lt;br /&gt;2&lt;br /&gt;&lt;br /&gt;-8&lt;br /&gt;&lt;br /&gt;9&lt;br /&gt;&lt;br /&gt;2&lt;br /&gt;&lt;br /&gt;12&lt;br /&gt;&lt;br /&gt;45&lt;br /&gt;&lt;br /&gt;3&lt;br /&gt;&lt;br /&gt;10&lt;br /&gt;&lt;br /&gt;13&lt;br /&gt;&lt;br /&gt;-10&lt;br /&gt;&lt;br /&gt;4&lt;br /&gt;&lt;br /&gt;5&lt;br /&gt;&lt;br /&gt;Let us assume the name of matrix is x&lt;br /&gt;&lt;br /&gt;To access a particular element from the array we have to use two subscripts on for row number and other for column number the notation is of the form X [i] [j] where i stands for row subscripts and j stands for column subscripts. Thus X [0] [0] refers to 10, X [2] [1] refers to 16 and so on In short multi dimensional arrays are defined more or less in the same manner as single dimensional arrays, except that for subscripts you require two squire two square brackets. We will restrict our decision to two dimensional arrays.&lt;br /&gt;&lt;br /&gt;Below given are some typical two-dimensional array definitions&lt;br /&gt;&lt;br /&gt;float table [50] [50];&lt;br /&gt;char line [24] [40];&lt;br /&gt;&lt;br /&gt;The first example defines tables as a floating point array having 50 rows and 50 columns. the number of elements will be 2500 (50 X50).&lt;br /&gt;&lt;br /&gt;The second declaration example establishes an array line of type character with 24 rows and 40 columns. The number of elements will be (24 X 40) 1920 consider the following two dimensional array definition int values [3] [4] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10. 11, 12, };&lt;br /&gt;&lt;br /&gt;Values [0] [0] = 1 Values [0] [1] = 2 Values [0] [2] = 3 Values [0] [3] = 4&lt;br /&gt;Values [1] [0] = 5 Values [1] [1] = 6 Values [1] [2] = 7 Values [1] [3] = 8&lt;br /&gt;Values [2] [0] = 9 Values [2] [1] = 10 Values [2] [2] = 11 Values [2] [3] = 12&lt;br /&gt;&lt;br /&gt;Here the first subscript stands for the row number and second one for column number. First subscript ranges from 0 to 2 and there are altogether 3 rows second one ranges from 0 to 3 and there are altogether 4 columns.&lt;br /&gt;&lt;br /&gt;Alternatively the above definition can be defined and initialised as&lt;br /&gt;&lt;br /&gt;int values [3] [4] = {&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;{&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;		&lt;/span&gt;1, 2, 3, 4&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;{&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;		&lt;/span&gt;5, 6, 7, 8&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;{&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;		&lt;/span&gt;9, 10, 11, 12&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;}&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;Here the values in first pair of braces are initialised to elements of first row, the values of second pair of inner braces are assigned to second row and so on. Note that outer pair of curly braces is required. If there are two few values within a pair of braces the remaining elements will be assigned as zeros.&lt;br /&gt;&lt;br /&gt;Here is a sample program that stores roll numbers and marks obtained by a student side by side in matrix&lt;br /&gt;&lt;br /&gt;main ( )&lt;br /&gt;{&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;int stud [4] [2];&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;int i, j;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;for (i =0; i &amp;lt; =3; i ++)&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;{&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;		&lt;/span&gt;printf ("\n Enter roll no. and marks");&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;		&lt;/span&gt;scanf ("%d%d", &amp;amp;stud [i] [0], &amp;amp;stud [i] [1] );&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;for (i = 0; i &amp;lt; = 3; i ++)&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;printf ("\n %d %d", stud [i] [0], stud [i] [1]);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;The above example illustrates how a two dimensional array can be read and how the values stored in the array can be displayed on screen.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-539915354184325169?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/539915354184325169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/539915354184325169'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2011/08/array-in-c-language.html' title='Array in C Language'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-6901717723842836907</id><published>2011-05-08T11:04:00.001-07:00</published><updated>2011-05-08T11:04:34.807-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='What is a dangling pointer'/><title type='text'>What is a dangling pointer</title><content type='html'>A dangling pointer arises when you use the address of an object after its lifetime is over. This&lt;br /&gt;may occur in situations like returning addresses of the automatic variables from a function or&lt;br /&gt;using the address of the memory block after it is freed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-6901717723842836907?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/6901717723842836907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/6901717723842836907'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2011/05/what-is-dangling-pointer.html' title='What is a dangling pointer'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-1342049595925296589</id><published>2011-05-08T11:01:00.003-07:00</published><updated>2011-05-08T11:01:48.386-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='How to write a C program'/><title type='text'>How to write a C program</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica; font-size: small; "&gt;&lt;p&gt;We specified the algorithm using English statements. However, these statements are sufficiently ‘computer-oriented’ for a computer program to be written directly from them. Before we do this, let us see how we expect the program to work from the user’s point of view.&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;First, the program will type the request for the length of a side; we say the program &lt;em&gt;&lt;span&gt;prompts&lt;/span&gt;&lt;/em&gt; the user to supply data. The screen display might look like this:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;Enter length of side:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;The computer will then wait for the user to type the length. Suppose the user types 12. The display will look like this:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;Enter length of side: 12&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;The program will then accept (we say &lt;em&gt;&lt;span&gt;read&lt;/span&gt;&lt;/em&gt;) the number typed, calculate the area and print the result. The display may look like this:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;Enter length of side: 12&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;Area of square is 144&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;Here we have specified what the &lt;em&gt;&lt;span&gt;output&lt;/span&gt;&lt;/em&gt; of the program should look like. For instance, there is a blank line between the prompt line and the line that gives the answer; we have also specified the exact form of the answer. This is a simple example of &lt;em&gt;&lt;span&gt;output design&lt;/span&gt;&lt;/em&gt;. This is necessary since the programmer cannot write the program unless he knows the precise output required.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;In order to write the computer program from the algorithm, a suitable &lt;em&gt;&lt;span&gt;programming language&lt;/span&gt;&lt;/em&gt; must be chosen. We can think of a &lt;em&gt;&lt;span&gt;program&lt;/span&gt;&lt;/em&gt; as a set of instructions, &lt;em&gt;&lt;span&gt;written in a programming language&lt;/span&gt;&lt;/em&gt;, which, when executed, will produce a solution to a given problem or perform some specified task.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;The major difference between an algorithm and a program is that an algorithm can be written using informal language without having to follow any special rules (though some &lt;em&gt;&lt;span&gt;conventions&lt;/span&gt;&lt;/em&gt; are usually followed) whereas a program is written in a programming language and &lt;em&gt;&lt;span&gt;must&lt;/span&gt;&lt;/em&gt; follow all the rules (the &lt;em&gt;&lt;span&gt;syntax&lt;/span&gt;&lt;/em&gt; rules) of the language. (Similarly, if we wish to write correct English, we must follow the syntax rules of the English language).&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;In this series, we will be showing you how to write programs in C, the programming language developed by Ken Thompson and Dennis Ritchie of Bell Laboratories, and one of the most popular and widely used today. &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;A program written in a high-level language such as C is usually referred to as a &lt;em&gt;source program&lt;/em&gt; or &lt;em&gt;source code&lt;/em&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;The C program which requests the user to enter the length of a side and prints the area of the square is shown here:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;#include &lt;stdio.h&gt;&lt;br /&gt;    main() {  &lt;br /&gt;    int a, s;&lt;br /&gt;    printf("Enter length of side: ");&lt;br /&gt;    scanf("%d", &amp;amp;s); //store length in s&lt;br /&gt;    a = s * s; //calculate area; store in a&lt;br /&gt;    printf("\nArea of square is %d\n", a);&lt;br /&gt;}&lt;/stdio.h&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;It is not too important that you understand everything about this program at this time. But you can observe that a C program has something (a function) called &lt;em&gt;main&lt;/em&gt; followed by opening and closing brackets. Between the left brace &lt;/span&gt;&lt;/span&gt;&lt;span&gt;{&lt;/span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt; &lt;/span&gt;and the right brace &lt;/span&gt;&lt;/span&gt;&lt;span&gt;} we have what is called the &lt;em&gt;body&lt;/em&gt; of the function. &lt;/span&gt;&lt;span&gt;&lt;span&gt;The statement&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;int a, s;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;is called a &lt;em&gt;declaration&lt;/em&gt;. The parts of a line after double slashes ( // )are &lt;em&gt;comments&lt;/em&gt; which help to explain the program but have no effect when the program is run. The asterisk ( * ) is used to denote multiplication.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;All of these terms will be explained in detail in due course.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-1342049595925296589?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/1342049595925296589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/1342049595925296589'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2011/05/how-to-write-c-program.html' title='How to write a C program'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-438802872480328390</id><published>2011-05-08T11:01:00.001-07:00</published><updated>2011-05-08T11:01:10.125-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Develop the Algorithm'/><title type='text'>Develop the Algorithm</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica; font-size: small; "&gt;&lt;h2&gt;Develop the Algorithm&lt;/h2&gt;&lt;div class="KonaBody" style="word-wrap: break-word; "&gt;&lt;p&gt;&lt;span&gt;Using the notion of an algorithm and the concept of a variable, we develop the following algorithm for calculating the area of a square, given one side:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span&gt;Algorithm for calculating area of square, given one side&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;(1)&lt;span&gt; &lt;/span&gt;Ask the user for the length of a side&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;(2)&lt;span&gt; &lt;/span&gt;Store the value in the box &lt;/span&gt;&lt;span&gt;s&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;(3)&lt;span&gt; &lt;/span&gt;Calculate the area of the square (&lt;/span&gt;&lt;span&gt;s&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;times&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;s&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;(4)&lt;span&gt; &lt;/span&gt;Store the area in the box &lt;/span&gt;&lt;span&gt;a&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;(5)&lt;span&gt; &lt;/span&gt;Print the value in box &lt;/span&gt;&lt;span&gt;a&lt;/span&gt;&lt;span&gt;, appropriately labelled&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;(6)&lt;span&gt; &lt;/span&gt;Stop&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;When an algorithm is developed, it must be checked to make sure that it is doing its intended job correctly. We can test an algorithm by ‘playing computer,' that is, we execute the instructions by hand, using appropriate data values. This process is called &lt;em&gt;dry running&lt;/em&gt; or &lt;em&gt;desk checking&lt;/em&gt; the algorithm. It is used to pinpoint any errors in logic before the computer program is actually written. We should &lt;em&gt;never&lt;/em&gt; start to write programming code unless we are confident that the algorithm is correct. Here, the algorithm is fairly simple, so it is easy to check that it is indeed correct.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-438802872480328390?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/438802872480328390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/438802872480328390'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2011/05/develop-algorithm.html' title='Develop the Algorithm'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-1662398272713644183</id><published>2011-05-08T11:00:00.000-07:00</published><updated>2011-05-08T11:01:02.268-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Data and Variables'/><title type='text'>Data and Variables</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica; font-size: small; "&gt;&lt;div class="KonaBody" style="word-wrap: break-word; "&gt;&lt;p&gt;&lt;span&gt;All computer programs, except the most trivial, are written to operate on &lt;em&gt;data&lt;/em&gt;. For example:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;•&lt;span&gt; &lt;/span&gt;the data for an action game might be keys pressed or the position of the cursor when the mouse is clicked;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;•&lt;span&gt; &lt;/span&gt;the data for a word processing program are the keys pressed while you are typing a letter;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;•&lt;span&gt; &lt;/span&gt;the data for an accounting program would include, among other things, expenses and income;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;•&lt;span&gt; &lt;/span&gt;the data for a program that teaches Spanish could be an English word that you type in response to a question.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;For a program to be run, it must be stored in the computer’s memory. When data is supplied to a program, that data is also stored in memory. Thus we think of memory as a place for holding programs and data. One of the nice things about programming in a high-level language (like C or Java) is that you don’t have to worry about &lt;em&gt;which&lt;/em&gt; memory locations are used to store your data. But how do we refer to an item of data, given that there may be many data items in memory?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;Think of memory as a set of boxes (or storage locations). Each box can hold one item of data, for example, one number. We can give a name to a box, and we will be able to refer to that box by the given name. In our example, we will need two boxes, one to hold the side of the square and one to hold the area. We will call these boxes &lt;/span&gt;&lt;span&gt;s&lt;/span&gt;&lt;span&gt; and &lt;/span&gt;&lt;span&gt;a&lt;/span&gt;&lt;span&gt;, respectively.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;If we wish, we can change the value in a box at any time; since the values can vary, &lt;/span&gt;&lt;span&gt;s&lt;/span&gt;&lt;span&gt; and &lt;/span&gt;&lt;span&gt;a&lt;/span&gt;&lt;span&gt; are called variable names, or simply &lt;em&gt;variables. &lt;/em&gt;Thus a variable is a name associated with a particular memory location or, if you wish, it is a &lt;em&gt;label&lt;/em&gt; for the memory location. We can speak of giving a variable a value, or setting a variable to a specific value, such as &lt;/span&gt;&lt;/span&gt;&lt;span&gt;1, for instance. Important points to remember are:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;•&lt;span&gt; &lt;/span&gt;a box can hold only one value at a time; if we put in a new value, the old one is lost;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;•&lt;span&gt; &lt;/span&gt;we must not assume that a box contains &lt;em&gt;any&lt;/em&gt; value unless we specifically store a value in the box. In particular, we must not assume that the box contains &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Variables are a common feature of computer programs. It is very difficult to imagine what programming would be like without them. In everyday life, we often use variables. For example, we speak of an ‘address’. Here, ‘address’ is a variable whose value depends on the person under consideration. Other common variables are telephone number, name of school, subject, size of population, type of car, television model, etc. (What are some possible values of these variables?)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Now that we know a little bit about variables, we are ready to develop the algorithm for calculating the area of a square.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-1662398272713644183?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/1662398272713644183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/1662398272713644183'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2011/05/data-and-variables.html' title='Data and Variables'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-8161238951122521309</id><published>2011-05-08T10:59:00.001-07:00</published><updated>2011-05-08T10:59:55.265-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Write an algorithm to solve the problem'/><title type='text'>Write an algorithm to solve the problem</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica; font-size: small; "&gt;&lt;p&gt;An &lt;em&gt;algorithm&lt;/em&gt; is a set of instructions which, if faithfully followed, will produce a solution to a given problem or perform some specified task. When an instruction is followed, we say it is &lt;em&gt;executed&lt;/em&gt;. We can speak of an algorithm for finding a word in a dictionary, for changing a punctured tyre or for playing a video game.&lt;/p&gt;&lt;p&gt;For any problem, there will normally be more than one algorithm to solve it. Each algorithm will have its own advantages and disadvantages. When we are searching for a word in the dictionary, one method would be to start at the beginning and look at each word in turn. A second method would be to start at the end and search backwards. Here, an advantage of the first method is that it would find a word faster if it were at the beginning, while the second method would be faster if the word were towards the end.&lt;/p&gt;&lt;p&gt;Another method for searching for the word would be one which used the fact that the words in a dictionary are in alphabetical order—this is the method we all use when looking up a word in a dictionary. In any situation, a programmer would usually have a choice of algorithms, and it is one of her more important jobs to decide which algorithm is the best, and why this is so.&lt;/p&gt;&lt;p&gt;In our example, we must write the instructions in our algorithm in such a way that they can be easily converted into a form which the computer can follow. Computer instructions fall into three main categories:&lt;/p&gt;&lt;p&gt;(1)&lt;span&gt; &lt;/span&gt;&lt;em&gt;Input&lt;/em&gt; instructions, used for supplying data from the ‘outside world’ to a program; this is usually done via the keyboard or a file.&lt;/p&gt;&lt;p&gt;(2)&lt;span&gt; &lt;/span&gt;&lt;em&gt;Processing&lt;/em&gt; instructions, used for manipulating data inside the computer. These instructions allow us to add, subtract, multiply and divide; they also allow us to compare two values, and act according to the result of the comparison. Also, we can move data from one location in the computer’s memory to another location.&lt;/p&gt;&lt;p&gt;(3)&lt;span&gt; &lt;/span&gt;&lt;em&gt;Output&lt;/em&gt; instructions, used for getting information out of the computer to the outside world.&lt;/p&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-8161238951122521309?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/8161238951122521309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/8161238951122521309'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2011/05/write-algorithm-to-solve-problem.html' title='Write an algorithm to solve the problem'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-8877768710554943875</id><published>2010-12-12T01:49:00.000-08:00</published><updated>2010-12-12T03:35:51.874-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Rules for creating Variable'/><title type='text'>Conventions (Rules) for creating Variable</title><content type='html'>&lt;span class="Apple-style-span"&gt;1. First Character of  variable should be an alphabet&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;2. The name of &lt;a href="http://c-overview.blogspot.com/search/label/VARIABLES"&gt;&lt;b&gt;&lt;span class="Apple-style-span" &gt;variables&lt;/span&gt; &lt;/b&gt;&lt;/a&gt;can be in lower case as well as upper case.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;3. Two or more variables cannot have same name.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;4. It Cannot contain any  space in between variable name.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;5. It cannot contain Period Sign ( . )&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;6. We cannot use keywords as variable names i.e. variable name like int, float, if are invalid.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;7. No special symbol is allowed in variable name.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;8. A &lt;a href="http://c-overview.blogspot.com/search/label/DECLARE%20VARIABLE"&gt;variable name&lt;/a&gt; should not be more than 40 characters, but it is safer to declare variable name as short as possible&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://c-overview.blogspot.com/search/label/DECLARE%20VARIABLE"&gt;&lt;span class="Apple-style-span"&gt;Example&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;int a,b,c;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;OR&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;int a=10, b=20, c;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-8877768710554943875?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/8877768710554943875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/8877768710554943875'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2010/12/conventions-rules-for-creating-variable.html' title='Conventions (Rules) for creating Variable'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-2598905429280799703</id><published>2010-12-12T01:41:00.000-08:00</published><updated>2010-12-12T01:48:45.033-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Definition of Variables'/><title type='text'>Definition of Variables</title><content type='html'>&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: verdana; "&gt;&lt;b&gt;Variable&lt;/b&gt; is a quantity, which my vary during program execution. Basically variable are name given to the location in the &lt;b&gt;memory of computer&lt;/b&gt;, where different constants are stored. If a program works on some variables then we need to&lt;b&gt; &lt;a href="http://c-overview.blogspot.com/search/label/DECLARE%20VARIABLE"&gt;declare these variables&lt;/a&gt;&lt;/b&gt; with the help of data types&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-2598905429280799703?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/2598905429280799703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/2598905429280799703'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2010/12/definition-of-variables.html' title='Definition of Variables'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-5683609261826028371</id><published>2010-12-06T11:14:00.000-08:00</published><updated>2010-12-06T11:23:21.703-08:00</updated><title type='text'>Histoy of C Language</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_urRtV3T_f1g/TP03IXjNb4I/AAAAAAAAAmM/OuupMlpDCUw/s1600/ritchie.jpeg"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 231px; height: 320px;" src="http://2.bp.blogspot.com/_urRtV3T_f1g/TP03IXjNb4I/AAAAAAAAAmM/OuupMlpDCUw/s320/ritchie.jpeg" alt="" id="BLOGGER_PHOTO_ID_5547650932890496898" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;font-size:180%;" &gt;Histoy of C Language&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The development of Unix in the C language made it uniquely portable and improvable.&lt;br /&gt;&lt;br /&gt;The first version of Unix was written in the low-level PDP-7 assembler language. Soon after, a language called TMG was created for the PDP-7 by R. M. McClure. Using TMG to develop a FORTRAN compiler, Ken Thompson instead ended up developing a compiler for a new high-level language he called B, based on the earlier BCPL language developed by Martin Richard. Where it might take several pages of detailed PDP-7 assembly code to accomplish a given task, the same functionality could typically be expressed in a higher level language like B in just a few lines. B was thereafter used for further development of the Unix system, which made the work much faster and more convenient.&lt;br /&gt;&lt;br /&gt;When the PDP-11 computer arrived at Bell Labs, Dennis Ritchie built on B to create a new language called C which inherited Thompson's taste for concise syntax, and had a powerful mix of high-level functionality and the detailed features required to program an operating system. Most of the components of Unix were eventually rewritten in C, culminating with the kernel itself in 1973. Because of its convenience and power, C went on to become the most popular programming language in the world over the next quarter century.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-5683609261826028371?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/5683609261826028371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/5683609261826028371'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2010/12/histoy-of-c-language.html' title='Histoy of C Language'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_urRtV3T_f1g/TP03IXjNb4I/AAAAAAAAAmM/OuupMlpDCUw/s72-c/ritchie.jpeg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-7893280803825356507</id><published>2010-12-02T09:01:00.003-08:00</published><updated>2010-12-02T09:10:11.887-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Algorithms'/><title type='text'>Definition of Algorithms OR What are Algorithms</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; color: rgb(34, 34, 34); line-height: 18px; "&gt;&lt;span class="Apple-style-span" style="font-size: medium; "&gt;&lt;b&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Definition of Algorithms OR What are Algorithms&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; color: rgb(34, 34, 34); line-height: 18px; "&gt;&lt;span class="Apple-style-span" style="font-size: medium; "&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;Algorithms&lt;/b&gt; are used to solve a problem step by step using english language. It is the part of &lt;b&gt;software designing&lt;/b&gt;. An algorithm defines as the step by step procedure or method that can be carried out for solving&lt;b&gt;programming problems&lt;/b&gt;. An algorithm tells computer that how to solve problem systematically to get desired output. Mainly we follow following steps to design an algorithm.&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium; "&gt;&lt;b&gt;Step 1 - START&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium; "&gt;&lt;i&gt;It represents beginning of the algorithm.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium; "&gt;&lt;b&gt;Step 2 - DECLARE&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium; "&gt;&lt;i&gt;The variables used in algorithm are declared in this step.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium; "&gt;&lt;b&gt;Step 3 - INPUT&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium; "&gt;&lt;i&gt;Here we input the values&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium; "&gt;&lt;b&gt;Step 4 - FORMULA&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium; "&gt;&lt;i&gt;The required result is generated in this step.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium; "&gt;&lt;b&gt;Step 5 - OUTPUT&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium; "&gt;&lt;i&gt;It displays the output or result.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium; "&gt;&lt;b&gt;Step 6 - STOP&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: medium; "&gt;&lt;i&gt;It is an end of Algorithm&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-7893280803825356507?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/7893280803825356507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/7893280803825356507'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2010/12/definition-of-algorithms-or-what-are.html' title='Definition of Algorithms OR What are Algorithms'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-2183248341595053369</id><published>2010-12-02T09:01:00.001-08:00</published><updated>2010-12-02T09:01:31.361-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advantages of C'/><title type='text'>Advantages of C</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; color: rgb(34, 34, 34); line-height: 18px; "&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;C is Portable&lt;/span&gt;&lt;/b&gt;&lt;div&gt;This means a program written for one computer may run successfully on other computer also.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;C is fast&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;This means that the&lt;b&gt; executable program&lt;/b&gt; obtained after compiling and linking runs very fast.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;C is compact&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;The statements in&lt;b&gt; C Language&lt;/b&gt; are generally short but very powerful.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;Simple / Easy&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;The C Language has both the simplicity of &lt;b&gt;High Level Language&lt;/b&gt; and speed of&lt;b&gt;Low Level Language&lt;/b&gt;. So it is also known as Middle Level Language&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;C has only 32 Keywords&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;C Compiler is easily available&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;C has ability to extend itself. Users can add their own functions to the C Library&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-2183248341595053369?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/2183248341595053369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/2183248341595053369'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2010/12/advantages-of-c.html' title='Advantages of C'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-5795848150430043757</id><published>2010-12-02T08:58:00.000-08:00</published><updated>2010-12-02T09:01:04.284-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Introduction to C Language'/><title type='text'>Introduction to C Language</title><content type='html'>&lt;p class="MsoNormal" style="line-height:16.85pt"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: 18px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span class="Apple-style-span"&gt;&lt;b&gt;&lt;p class="MsoNormal" style="line-height:16.85pt"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: 18px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-weight: normal; font-size: medium; "&gt;The &lt;span style="font-weight: bold; "&gt;C Language&lt;/span&gt; is one of the most powerful language. In the beginning due to the different architectures available, the programmer had to learn different languages to create different types of applications. To overcome this problem in 1972, &lt;b&gt;Dennis Ritche&lt;/b&gt; at the&lt;b&gt;AT &amp;amp; T Bell Laboratories, USA &lt;/b&gt;developed C Language.&lt;br /&gt;&lt;br /&gt;It is a combination of&lt;b&gt; BCPL&lt;/b&gt; and &lt;b&gt;B Language&lt;/b&gt;. The problem with &lt;b&gt;Low Level Languages&lt;/b&gt; is that they are very difficult for the humans to understand and developed. On the other hand, &lt;b&gt;High Level Languages&lt;/b&gt; are easy for the humans to understand but slow in speed.&lt;br /&gt;&lt;br /&gt;The &lt;b&gt;C Language&lt;/b&gt; is high speed and easy to understand, so it is also term as &lt;b&gt;Middle Level Language.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/b&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-5795848150430043757?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/5795848150430043757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/5795848150430043757'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2010/12/introduction-to-c-language.html' title='Introduction to C Language'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-1541074488908366843</id><published>2007-08-28T21:36:00.005-07:00</published><updated>2010-12-02T09:03:05.422-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DECLARE ARRAYS'/><title type='text'>DECLARE ARRAYS</title><content type='html'>&lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;An array      must be declared with type of variable or data type&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;An array      contains same type of data&lt;br /&gt;    e.g. – int a [10]&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;The name      of array cannot be same as that of any other variable within the function.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;The size      of array is specified using sub-script notation (index)&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;THE sub-script      indicates that how many elements are to be allocated to an array.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;A sub-script      used to declare an array is called dimension&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-1541074488908366843?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/1541074488908366843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/1541074488908366843'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/declare-arrays.html' title='DECLARE ARRAYS'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-5686076905640536661</id><published>2007-08-28T21:36:00.003-07:00</published><updated>2010-12-02T09:03:11.279-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ARRAYS'/><title type='text'>ARRAYS</title><content type='html'>&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;Arrays are widely used data type in ‘C’ language. It is a collection of elements of similar data type. These similar elements could be of all integers, all floats or all characters. An array of character is called as string whereas and array of integer or float is simply called as an array. So array may be defined as a group of elements that share a common name and that are defined by position or index. The elements of an arrays are store in sequential order in memory.&lt;/p&gt;  &lt;span style="font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;br /&gt;&lt;/span&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;span style="font-size: 14pt;"&gt;WAP to input your name and display it&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;span style="font-size: 14pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;#include &lt;stdio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/stdio.h&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;void main ( )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;char nm [15];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;clrscr ( );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;printf (“enter your name”);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;gets (nm);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;printf (“name is %s”,name);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;getch ( );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-5686076905640536661?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/5686076905640536661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/5686076905640536661'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/arrays.html' title='ARRAYS'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-3236821018370207591</id><published>2007-08-28T21:36:00.001-07:00</published><updated>2010-12-02T09:03:16.986-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STRING'/><title type='text'>STRING</title><content type='html'>&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;String are the combination of number of characters these are used to store any word in any variable of constant. A string is an array of character. It is internally represented in system by using ASCII value. Every single character can have its own ASCII value in the system. A character string is stored in one array of character type. &lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;e.g. “Ram” contains ASCII value per location, when we are using strings and then these strings are always terminated by character ‘\0’. We use conversion specifier %s to set any string we can have any string as follows:-&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;char nm [25]&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;When we store any value in nm variable then it can hold only 24 character because at the end of the string one character is consumed automatically by ‘\0’.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;1.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;i style=""&gt;strlen&lt;/i&gt;&lt;/b&gt;&lt;i style=""&gt;&lt;span style=""&gt;   &lt;/span&gt;-&lt;span style=""&gt;           &lt;/span&gt;string length&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;2.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;i style=""&gt;strcp&lt;/i&gt;&lt;/b&gt;&lt;i style=""&gt;y&lt;span style=""&gt;  &lt;/span&gt;-&lt;span style=""&gt;           &lt;/span&gt;string copy&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;3.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;i style=""&gt;strcm&lt;/i&gt;&lt;/b&gt;&lt;i style=""&gt;p&lt;span style=""&gt; &lt;/span&gt;-&lt;span style=""&gt;           &lt;/span&gt;string compare&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;4.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;i style=""&gt;strup&lt;/i&gt;&lt;/b&gt;&lt;i style=""&gt;s&lt;span style=""&gt;  &lt;/span&gt;-&lt;span style=""&gt;           &lt;/span&gt;string upper&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;5.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;i style=""&gt;strlw&lt;/i&gt;&lt;/b&gt;&lt;i style=""&gt;r&lt;span style=""&gt;  &lt;/span&gt;-&lt;span style=""&gt;           &lt;/span&gt;string lower&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;6.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;i style=""&gt;strca&lt;/i&gt;&lt;/b&gt;&lt;i style=""&gt;t&lt;span style=""&gt;   &lt;/span&gt;-&lt;span style=""&gt;           &lt;/span&gt;string concatenate&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;7.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;i style=""&gt;strstr&lt;/i&gt;&lt;/b&gt;&lt;i style=""&gt;&lt;span style=""&gt;    &lt;/span&gt;-&lt;span style=""&gt;           &lt;/span&gt;string string&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-3236821018370207591?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/3236821018370207591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/3236821018370207591'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/string.html' title='STRING'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-2854609775709322189</id><published>2007-08-28T21:34:00.004-07:00</published><updated>2010-12-02T09:03:22.614-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JUMPS STATEMENTS'/><title type='text'>JUMPS STATEMENTS</title><content type='html'>&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;These are also called as branching statements. These statements transfer control to another part of the program. When we want to break any loop condition or to continue any loop with skipping any values then we use these statements. There are three types of jumps statements.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;1. Continue&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;2. Break&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;3. Goto&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008374"&gt;Continue&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;This statement is used within the body of the loop. The continue statement moves control in the beginning of the loop means to say that is used to skip any particular output.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;Example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;WAP to print series from 1 to 10 and skip only 5 and 7.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;#include &lt;stdio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/stdio.h&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;void main ( )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;int a;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;clrscr ( );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;for (a=1; a&lt;=10; a++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;if (a= =5 | | a= = 7)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;continue;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;printf (“%d \n”,a);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;getch ( );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008375"&gt;Break&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;This statement is used to terminate any sequence or sequence of statement in switch statement. This statement enforce indicate termination. In a loop when a break statement is in computer the loop is terminated and a cursor moves to the next statement or block;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;Example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;WAP to print series from 1 to 10 and break on 5&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;#include &lt;stdio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/stdio.h&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;void main ( )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;int a;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;clrscr ( );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;for (a=1; a&lt;=10; a++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;if (a= =5)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;printf (“%d \n”,a);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;getch ( );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008376"&gt;Goto statement&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;It is used to alter or modify the normal sequence of program execution by transferring the control to some other parts of the program. the control may be move or transferred to any part of the program when we use goto statement we have to use a label.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;  &lt;div style="text-align: left;"&gt;&lt;b style=""&gt;WAP TO FIND IF NUMBER=10&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;b style=""&gt; THEN GOOD ELSE BAD&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;#include&lt;stdio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/stdio.h&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;void main ()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;int a;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;clrscr ();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;printf ("Enter any Number: ");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;scanf ("%d",&amp;amp;a);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;if (a= =10)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;goto g;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;goto b;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;g:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;printf ("Good");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;goto end;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;b:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;printf ("Bad");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;goto end;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;end:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;getch ();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;  &lt;p class="MsoNormal" style="text-align: left;"&gt;&lt;b style=""&gt;WAP TO PRINT SERIES&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;b style=""&gt; FROM 1 TO 10&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="text-align: left;"&gt;  &lt;/p&gt;&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;#include&lt;stdio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/stdio.h&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;void main ()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;int a;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;clrscr ();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;a=1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;check:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;if (a&lt; =10)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;goto inc;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;goto end;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;inc:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;printf (“%d \n”,a);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;goto check;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;end:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;getch ( );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align: left;"&gt;&lt;br /&gt;&lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-2854609775709322189?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/2854609775709322189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/2854609775709322189'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/jumps-statements.html' title='JUMPS STATEMENTS'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-3149291219198367459</id><published>2007-08-28T21:34:00.003-07:00</published><updated>2010-12-02T09:03:32.513-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NESTED LOOP'/><title type='text'>NESTED LOOP</title><content type='html'>&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;These loops are the loops which contain another looping statement in a single loop. These types of loops are used to create matrix. Any loop can contain a number of loop statements in itself. If we are using loop within loop that is called nested loop. In this the outer loop is used for counting rows and the internal loop is used for counting columns&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;SYNTAX:-&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;for (initializing ; test condition ; increment / decrement)&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;statement;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;for (initializing ; test condition ; increment / decrement)&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;body of inner loop;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;statement;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;PROGRAM&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;#include &lt;stdio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/stdio.h&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;void main ( )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;int i, j;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;clrscr ( );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;for (j=1; j&lt;=4; j++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;for (i=1; i&lt;=5; i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;printf (“*”)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;printf (“\n”);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;getch ( );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;OUTPUT OF THIS PROGRAM IS&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;          &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;br /&gt;* * * *&lt;br /&gt;* * * *&lt;br /&gt;* * * *&lt;br /&gt;* * * *&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-3149291219198367459?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/3149291219198367459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/3149291219198367459'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/nested-loop.html' title='NESTED LOOP'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-8359521251163238677</id><published>2007-08-28T21:34:00.001-07:00</published><updated>2010-12-02T09:03:40.707-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LOOPING'/><title type='text'>LOOPING</title><content type='html'>&lt;div class="Section1"&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;These statements are used to control the flow of the program and repeat any process multiple times according to user’s requirement. We can have three types of looping control statements.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;1. While&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;2. Do-while&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;3. For&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008369"&gt;While&lt;/a&gt; &lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;It is an entry control loop statement, because it checks the condition first and then if the condition is true the statements given in while loop will be executed.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;SYNTAX:-&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;i style=""&gt;Initialization;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;i style=""&gt;while&lt;/i&gt;&lt;/b&gt;&lt;i style=""&gt; (condition)&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;i style=""&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;i style=""&gt;Statements;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;i style=""&gt;Incremental / decrement;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;i style=""&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008370"&gt;Do-while&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;Do-while loop is also called exit control loop. It is different from while loop because in this loop the portion of the loop is executed minimum once and then at the end of the loop the condition is being checked and if the value of any given condition is true or false the structure of the loop is executed and the condition is checked after the completion of true body part of the loop.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;SYNTAX:-&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;Initialization&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;i style=""&gt;do&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;Statement;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;Increment / decrement;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;i style=""&gt;while&lt;/i&gt;&lt;/b&gt;&lt;i style=""&gt; (condition)&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008371"&gt;For loop&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;It is another looping statement or construct used to repeat any process according to user requirement but it is different from while and do-while loop because in this loop all the three steps of constructions of a loop are contained in single statement. It is also an entry control loop. We can have three syntaxes to create for loop:-&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;span style="font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;br /&gt;&lt;/span&gt;  &lt;div class="Section2"&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;for (initialization;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;Test condition; Increment / decrement)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;Statement;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;&lt;br /&gt;&lt;/span&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;for (; test condition; increment / decrement)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;Statement;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;&lt;br /&gt;&lt;/span&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;for (; test condition;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;Statement;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;Increment / decrement&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;#include &lt;stdio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/stdio.h&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;void main ( )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;int a;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;clrscr ( );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;for (a=1; a&lt;=10; a++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;printf (“%d \n”,a);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;getch ( );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-8359521251163238677?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/8359521251163238677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/8359521251163238677'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/looping.html' title='LOOPING'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-1311048244849340071</id><published>2007-08-28T21:33:00.002-07:00</published><updated>2010-12-02T09:04:32.107-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SWITCH CASE / SELECT CASE'/><title type='text'>SWITCH CASE / SELECT CASE</title><content type='html'>&lt;div class="Section1"&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;These statements are used with the replacement of if-else and these statements are used when we have multiple options or choices. These choices can be limited and when we use switch case we can use only integer or character variable as expression.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;span style="font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;br /&gt;&lt;/span&gt;  &lt;div class="Section2"&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;#include &amp;lt;stdio.h&gt;&lt;stdio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/stdio.h&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;void main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;int,ch qty;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;long tb,dis,nb;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;clrscr();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;printf("1.BPL\n2.Onida\n3.Sony\n4.Samsung\n5.LG\n");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;printf("\nEnter Your Choice: ");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;fflush(stdin);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;scanf("%d",&amp;amp;ch);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;printf("Enter Qty: ");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;scanf("%d",&amp;amp;qty);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;switch(ch)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;case 1:tb=(long)qty*10000;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;printf("\nBPL is %ld",tb);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;case 2:tb=(long)qty*12000;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;printf("\nOnida is %ld",tb);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;case 3:tb=(long)qty*11500;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;printf("\nSony is %ld ",tb);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;br /&gt;&lt;/span&gt;  &lt;div class="Section3"&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;case 4:tb=(long)qty*11000;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;printf("\nSamsung is %ld ",tb);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;case 5:tb=(long)qty*13000;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;printf("\nLG is %ld ",tb);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;default:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;printf("Wrong Choice...");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;dis=(tb*10)/100;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;nb=tb-dis;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;printf("\nDiscount is %ld",dis);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;printf("\nNet bill is %ld",nb);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;getch();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;span style="font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-1311048244849340071?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/1311048244849340071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/1311048244849340071'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/switch-case-select-case.html' title='SWITCH CASE / SELECT CASE'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-8299534038822216192</id><published>2007-08-28T21:33:00.001-07:00</published><updated>2010-12-02T09:04:52.405-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NESTED IF'/><title type='text'>NESTED IF</title><content type='html'>&lt;div class="Section1"&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;If within if is called nested if and it is used when we have multiple conditions to check and when any if condition contains another if statement then that is called ‘nested if’.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;If the external condition is true, then the internal if condition or condition are executed and if the condition is false then the else portion is executed of the external if statement&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;SYTAX&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/div&gt;&lt;i style=""&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/i&gt;  &lt;div class="Section2"&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;if (condition)&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;…….&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;…….&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;if (condition)&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;…….&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;…….&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;else if (condition)&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;…….&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;…….&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;else if (condition)&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;…….&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;…….&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;else &lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;…….&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;……. }&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;else &lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;…….&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;…….&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;b&gt;&lt;span style="font-size: 16pt; font-family: Arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-8299534038822216192?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/8299534038822216192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/8299534038822216192'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/nested-if.html' title='NESTED IF'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-3640096027405985539</id><published>2007-08-28T21:32:00.000-07:00</published><updated>2010-12-02T09:04:57.736-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CONTROL STATEMENTS'/><title type='text'>CONTROL STATEMENTS</title><content type='html'>&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;These statements are used to control the flow of program by using these statements. We can jump from one statement to another statement in C language. We can have four types of control statements:-&lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;decision making&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;case control      statement or switch statement&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;looping /      iteration statement&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;jump /      branching statement&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/li&gt;&lt;/ol&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008365"&gt;Decision making&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;These statements are used when we want to take any decision according to the condition or user requirement. These statements work on a particular condition. These conditions are used by using ‘if’ statement. We can have four types of conditional statements&lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;if&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;if-else&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;if – else if&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;nested if&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/li&gt;&lt;/ol&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;if&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;if statement is simple decision making statement, which is used to take any decision when the condition is true.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;i style=""&gt;if &lt;/i&gt;&lt;/b&gt;&lt;i style=""&gt;(statement)&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;Statement;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;i style=""&gt;if&lt;/i&gt;&lt;/b&gt;&lt;i style=""&gt; (expression / condition)&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;Statement;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;If-else&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;This statement is used to make decision in C language. If the given condition is true then the cursor will move to the true portion else it will move to the false portion.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;i style=""&gt;if&lt;/i&gt;&lt;/b&gt; (condition)&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;Statement;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;i style=""&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;Statement;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;If else-if&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;This is another control statement which is used to take any decision according to the given condition. If the condition is true then the cursor will move to the true portion and if the condition is false the cursor will move to the false or else-if portion and then checks another condition. If this condition is true then it will move and run the second true portion and if the condition is false then cursor will move the next portion of if condition which is another else-if or else portion.&lt;/p&gt;    &lt;div class="Section1"&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;i style=""&gt;if&lt;/i&gt;&lt;/b&gt;&lt;i style=""&gt; (condition)&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;Statement;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;i style=""&gt;else if &lt;/i&gt;&lt;/b&gt;&lt;i style=""&gt;(condition)&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;Statement;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;i style=""&gt;else if &lt;/i&gt;&lt;/b&gt;&lt;i style=""&gt;(condition)&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;Statement;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;i style=""&gt;else &lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;Statement;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;span style="font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;br /&gt;&lt;/span&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-3640096027405985539?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/3640096027405985539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/3640096027405985539'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/control-statements.html' title='CONTROL STATEMENTS'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-7711253795705224435</id><published>2007-08-28T21:28:00.008-07:00</published><updated>2010-12-02T09:05:17.272-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OPERATORS'/><title type='text'>OPERATORS</title><content type='html'>Every language contains variable and data types and also support the concept of operators. C language has over forty operators, but hardly all they are used. These are divided onto nine categories:-  &lt;p class="MsoNormal" style="margin-left: 0.2in; text-align: justify; text-indent: 0in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;i style=""&gt;&lt;span style=""&gt;(1)&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;!--[endif]--&gt;&lt;i style=""&gt;Arithmetic&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.2in; text-align: justify; text-indent: 0in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;i style=""&gt;&lt;span style=""&gt;(2)&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;!--[endif]--&gt;&lt;i style=""&gt;Assignment&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.2in; text-align: justify; text-indent: 0in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;i style=""&gt;&lt;span style=""&gt;(3)&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;!--[endif]--&gt;&lt;i style=""&gt;Logical&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.2in; text-align: justify; text-indent: 0in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;i style=""&gt;&lt;span style=""&gt;(4)&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;!--[endif]--&gt;&lt;i style=""&gt;Relational&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.2in; text-align: justify; text-indent: 0in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;i style=""&gt;&lt;span style=""&gt;(5)&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;!--[endif]--&gt;&lt;i style=""&gt;Modulas&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.2in; text-align: justify; text-indent: 0in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;i style=""&gt;&lt;span style=""&gt;(6)&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;!--[endif]--&gt;&lt;i style=""&gt;Increment / Decrement&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.2in; text-align: justify; text-indent: 0in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;i style=""&gt;&lt;span style=""&gt;(7)&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;!--[endif]--&gt;&lt;i style=""&gt;Conditional&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.2in; text-align: justify; text-indent: 0in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;i style=""&gt;&lt;span style=""&gt;(8)&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;!--[endif]--&gt;&lt;i style=""&gt;Bit wise&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.2in; text-align: justify; text-indent: 0in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;i style=""&gt;&lt;span style=""&gt;(9)&lt;span style=";font-family:&amp;quot;;font-size:7;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;!--[endif]--&gt;&lt;i style=""&gt;Special&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="margin-left: 0.2in; text-align: justify; text-indent: 0in;"&gt;  &lt;/p&gt;&lt;h3&gt;&lt;a name="_Toc158008355"&gt;Arithmetic Operators (+ - * /)&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;These are the common operators used to perform any arithmetic calculations. These are basically used on minimum two variables or constants. These operators contain +, -, *, /.&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008356"&gt;Assignment Operators&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;These operators are used to assign any value to the variable or constant. The main assignment operator is ‘=’.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;We have some short assignment operators. Suppose &lt;b style=""&gt;a=10&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_urRtV3T_f1g/RtT2RWrnTMI/AAAAAAAAAIM/1hadT3xRC3o/s1600-h/output.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp2.blogger.com/_urRtV3T_f1g/RtT2RWrnTMI/AAAAAAAAAIM/1hadT3xRC3o/s400/output.JPG" alt="" id="BLOGGER_PHOTO_ID_5103975055724334274" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;a name="_Toc158008357"&gt;Logical operators&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;These are used to test more than one condition or we can say conditional expression, so that you can make a decision on the basis of that condition. These operators are&lt;/p&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_urRtV3T_f1g/RtT2dWrnTNI/AAAAAAAAAIU/pKbQa9nm7ig/s1600-h/output.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp2.blogger.com/_urRtV3T_f1g/RtT2dWrnTNI/AAAAAAAAAIU/pKbQa9nm7ig/s400/output.JPG" alt="" id="BLOGGER_PHOTO_ID_5103975261882764498" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;a name="_Toc158008358"&gt;Relational operators&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;These operators are also called comparison operators. You can use relational operators, whenever you want to compare two quantities and variables or constants and you want to take decision on the basis of that condition. Then these operators are used.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;We have following types of operators:-&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&gt;=&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;=&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;==&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;!=&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008359"&gt;Modulas Operator&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;This operator is used to find out the reminder of any value.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;R=25%10&lt;span style=""&gt;        &lt;/span&gt;R=5&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008360"&gt;Increment / Decrement operators&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;These operators are also called unary operators. These operators are used when we want to perform any action on single operand. These operators are used when we want to increase or decrease value of any variable by one.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;Increment operator is&lt;span style=""&gt;    &lt;/span&gt; ++&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;Decrement operator is&lt;span style=""&gt;  &lt;/span&gt; –&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;We have two types of unary operators&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Post fix&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;This operator is used to assign any value of variable to another variable according to use requirement. In this operator firstly the value of a variable is copied to another variable and then the value is increased or decreased.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;a=10&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;a++&lt;span style=""&gt;      &lt;/span&gt;a=11&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Pre-fix&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;This operator is used to assign value to any variable according to user requirement, so that the same value is copied to another variable. Firstly the value of variable is increased or decreased and then it is copied to any other variable.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;a=10&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;++a&lt;span style=""&gt;      &lt;/span&gt;a=11&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008361"&gt;Conditional operators&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;These operators are also called ternary operators. These are used to check any condition or expression and can be used to compare two conditional expressions and produce a result if the condition is true or false. Operators used for conditional operators are “?” and “:” &lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;Syntax:-&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;(expression / condition)? True statement (if) &lt;span style=""&gt; &lt;/span&gt;: false statement (else)&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008362"&gt;Bit wise operators&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;C is known as assembly language because it provides us bit wise operators, which are normally associated with assembly language programming. C language has a powerful set of special operators which are capable of manipulating data at bit level. These are as follows:-&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;1) &amp;amp;&lt;span style=""&gt;     &lt;/span&gt;-&lt;span style=""&gt;           &lt;/span&gt;Bit wise (and)&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;2) !&lt;span style=""&gt;       &lt;/span&gt;-&lt;span style=""&gt;           &lt;/span&gt;Bit wise (or)&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;3) ^&lt;span style=""&gt;      &lt;/span&gt;-&lt;span style=""&gt;           &lt;/span&gt;Bit wise (exponent)&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;4) &lt;&lt;&lt;span style=""&gt;   &lt;/span&gt;-&lt;span style=""&gt;           &lt;/span&gt;Shift left&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;5) &gt;&gt;&lt;span style=""&gt;   &lt;/span&gt;-&lt;span style=""&gt;           &lt;/span&gt;Shift right&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008363"&gt;Special operators&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;Special operators are provided by C. these operators are as follows:-&lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;commas      operators (,)&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;pointer      operators (*, &amp;amp;)&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;sizeof      ( ) &lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;a name="_Toc158008358"&gt;Relational operators&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;These operators are also called comparison operators. You can use relational operators, whenever you want to compare two quantities and variables or constants and you want to take decision on the basis of that condition. Then these operators are used.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;We have following types of operators:-&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&gt;=&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;=&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;==&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;!=&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008359"&gt;Modulas Operator&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;This operator is used to find out the reminder of any value.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;R=25%10&lt;span style=""&gt;        &lt;/span&gt;R=5&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008360"&gt;Increment / Decrement operators&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;These operators are also called unary operators. These operators are used when we want to perform any action on single operand. These operators are used when we want to increase or decrease value of any variable by one.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;Increment operator is&lt;span style=""&gt;    &lt;/span&gt; ++&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;Decrement operator is&lt;span style=""&gt;  &lt;/span&gt; –&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;We have two types of unary operators&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Post fix&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;This operator is used to assign any value of variable to another variable according to use requirement. In this operator firstly the value of a variable is copied to another variable and then the value is increased or decreased.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;a=10&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;a++&lt;span style=""&gt;      &lt;/span&gt;a=11&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Pre-fix&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;This operator is used to assign value to any variable according to user requirement, so that the same value is copied to another variable. Firstly the value of variable is increased or decreased and then it is copied to any other variable.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;a=10&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;++a&lt;span style=""&gt;      &lt;/span&gt;a=11&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008361"&gt;Conditional operators&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;These operators are also called ternary operators. These are used to check any condition or expression and can be used to compare two conditional expressions and produce a result if the condition is true or false. Operators used for conditional operators are “?” and “:” &lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;Syntax:-&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;(expression / condition)? True statement (if) &lt;span style=""&gt; &lt;/span&gt;: false statement (else)&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008362"&gt;Bit wise operators&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;C is known as assembly language because it provides us bit wise operators, which are normally associated with assembly language programming. C language has a powerful set of special operators which are capable of manipulating data at bit level. These are as follows:-&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;1) &amp;amp;&lt;span style=""&gt;     &lt;/span&gt;-&lt;span style=""&gt;           &lt;/span&gt;Bit wise (and)&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;2) !&lt;span style=""&gt;       &lt;/span&gt;-&lt;span style=""&gt;           &lt;/span&gt;Bit wise (or)&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;3) ^&lt;span style=""&gt;      &lt;/span&gt;-&lt;span style=""&gt;           &lt;/span&gt;Bit wise (exponent)&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;4) &lt;&lt;&lt;span style=""&gt;   &lt;/span&gt;-&lt;span style=""&gt;           &lt;/span&gt;Shift left&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;5) &gt;&gt;&lt;span style=""&gt;   &lt;/span&gt;-&lt;span style=""&gt;           &lt;/span&gt;Shift right&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008363"&gt;Special operators&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;Special operators are provided by C. these operators are as follows:-&lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;commas      operators (,)&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;pointer      operators (*, &amp;amp;)&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;sizeof      ( ) &lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_urRtV3T_f1g/RtT22WrnTOI/AAAAAAAAAIc/rNWNa-nuXC8/s1600-h/output.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp2.blogger.com/_urRtV3T_f1g/RtT22WrnTOI/AAAAAAAAAIc/rNWNa-nuXC8/s400/output.JPG" alt="" id="BLOGGER_PHOTO_ID_5103975691379494114" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-7711253795705224435?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/7711253795705224435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/7711253795705224435'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/operators.html' title='OPERATORS'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_urRtV3T_f1g/RtT2RWrnTMI/AAAAAAAAAIM/1hadT3xRC3o/s72-c/output.JPG' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-4214917217563026996</id><published>2007-08-28T21:28:00.007-07:00</published><updated>2010-12-02T09:05:59.704-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MACRO'/><title type='text'>MACRO</title><content type='html'>&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;Macro is a substitution of a string that is placed in a program. It is placed by the definition when program is compiled and we have to use (#) symbol in front of this. We can have different macros like:-&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;#define, #if, #else.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;It is different from preprocessor directive, because pre processor directive is used to link files with the object code and macro is used to define any string and we always or maximum use #define macro.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;#include &amp;lt;stdio.h&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;#define wait getch ( )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;# define flot float&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;void main ( )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;…….&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;…….&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;flot f,c;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;…….&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;…….&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;…….&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;…….&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;wait;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;} &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-4214917217563026996?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/4214917217563026996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/4214917217563026996'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/macro.html' title='MACRO'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-4421258107714362720</id><published>2007-08-28T21:28:00.005-07:00</published><updated>2010-12-02T09:06:14.054-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TYPE CASTING'/><title type='text'>TYPE CASTING</title><content type='html'>&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;It is used to convert on data at a time. It is required to used different type of constants and variables in expression then we have convert that expression into another data type, but certain rules are used during conversion of data type the computer consider one operand at a time involving two operands. We can have two types of type casting.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;1.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;Implicit&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;2.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;Explicit&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008351"&gt;Implicit&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;When we are converting any data type which contains shorter values then along data type that conversion is called implicit or in simple language we can say when user do not need to convert any data type into another data type and it is automatically done through computer system that is called implicit type conversion. The conversion is not transparent to the user or the programmer and is done by the compiler. This converts narrow type to wider type so that use can avoid the information to the system.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;#include&lt;stdio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/stdio.h&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;void main ()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;float c,f;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;clrscr ();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;printf ("Enter the value of celcius: ");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;scanf ("%f",&amp;amp;c);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;f=9.0/5.0*c+32;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;printf ("\Fehranite is %.2f",f);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;getch ();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008352"&gt;Explicit&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;Explicit type casting is done by the programmer manually. When the programmer wants a result of an expression to be in particular type, then we use explicit type casting. This type casting is done by casting operators ‘( )’ and data type.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;#include&lt;stdio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/stdio.h&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;void main ()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;float c,f;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;clrscr ();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;printf ("Enter the value of celcius: ");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;scanf ("%f",&amp;amp;c);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;f=(float) 9/5*c+32;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;printf ("\Fehranite is %.2f",f);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;getch ();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-4421258107714362720?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/4421258107714362720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/4421258107714362720'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/type-casting.html' title='TYPE CASTING'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-4848506791223938977</id><published>2007-08-28T21:28:00.003-07:00</published><updated>2010-12-02T09:06:21.507-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HEADER FILES'/><title type='text'>HEADER FILES</title><content type='html'>&lt;h3&gt;&lt;a name="_Toc158008348"&gt;Conio.h&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;It is a library file which is included in the program this is used to use&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Clrscr ( )&lt;/p&gt;  &lt;p class="MsoNormal"&gt;getch ( )&lt;/p&gt;  &lt;p class="MsoNormal"&gt;getchar ( ) etc.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;We do not need to include this file in C program. It is necessary for C++ programs. Conio stands for &lt;b style=""&gt;CON&lt;/b&gt;sole &lt;b style=""&gt;I&lt;/b&gt;nput &lt;b style=""&gt;O&lt;/b&gt;utput header file.&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008349"&gt;Math .h&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;This file is used for mathematical functions. These functions are like excel functions:-&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Eg. pow( ), sqrt ( ), sin ( ), tan ( ) etc.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-4848506791223938977?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/4848506791223938977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/4848506791223938977'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/header-files.html' title='HEADER FILES'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-4487055553561743999</id><published>2007-08-28T21:28:00.001-07:00</published><updated>2010-12-02T09:06:36.187-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DECLARE VARIABLE'/><title type='text'>DECLARE VARIABLE</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;When we want to declare any variable, then we decide that what is a data type of the variable? And how it should declare? Variable can eight characters long only.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-4487055553561743999?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/4487055553561743999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/4487055553561743999'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/declare-variable.html' title='DECLARE VARIABLE'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-8915128402849868960</id><published>2007-08-28T21:27:00.005-07:00</published><updated>2010-12-02T09:06:42.465-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VARIABLES'/><title type='text'>VARIABLES</title><content type='html'>&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;It is the name given to stored reason of the memory and it provides us the facility to change the value of it during the execution. Variable names are the name given to the location in memory of a computer where different values are stored. The location which contains these constants can be an integer, character, real numbers.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-8915128402849868960?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/8915128402849868960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/8915128402849868960'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/variables.html' title='VARIABLES'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-8652506936141157213</id><published>2007-08-28T21:27:00.003-07:00</published><updated>2010-12-02T09:06:46.469-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CONSTANTS'/><title type='text'>CONSTANTS</title><content type='html'>&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;A constant represents that what a value is stored in it cannot be changed anytime. We use “const” keyword for declaring any variable as constant. This keyword is a guideline to a compiler that the value of variable is not changeable at any time during the execution of the program.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-8652506936141157213?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/8652506936141157213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/8652506936141157213'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/constants.html' title='CONSTANTS'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-8728561327091954407</id><published>2007-08-28T21:27:00.001-07:00</published><updated>2010-12-02T09:06:50.876-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CHARACTER SET'/><title type='text'>CHARACTER SET</title><content type='html'>&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;A character contains any alphabet, digit or special symbol to represent information. The set or character which is valid in C program is called character set. The set includes some graphic characters. Graphic characters contain alphabets, digits and some special symbols. C language uses case letters (a to z), the digit (0 to 9) and certain special characters like constants, variables, operators etc. and some special symbols:- $, &lt;, &gt;, &lt;=, =, !, # etc.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;Non graphical character sets contain white spaces these are also called escape sequences.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-8728561327091954407?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/8728561327091954407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/8728561327091954407'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/character-set.html' title='CHARACTER SET'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-6528783372013646732</id><published>2007-08-28T21:26:00.006-07:00</published><updated>2010-12-02T09:06:55.823-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DFUNDAMENTAL DATA TYPES'/><title type='text'>DFUNDAMENTAL DATA TYPES</title><content type='html'>&lt;h3&gt;&lt;a name="_Toc158008337"&gt;Integer data type&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;It is a data type which is used to hold data in whole number e.g. 40, 4, 97, 80 and its range is from -32768 to 32767. When we want to use integer data type, we have to specify “int” keyword. It takes two bytes in memory and the conversion specifier is %d.&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008338"&gt;Float type&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;This data type is used to store fractional numbers or these numbers are also called real numbers. In simple language we can say, this data type contains decimal value upto six decimal places. When we use decimal values to store then we can use it.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;e.g. 49.797, 79718.80&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;it can hold either positive or negative value with or without decimal the conversion specifier used for float is %f. the range of float is -3.4*10&lt;sup&gt;-38&lt;/sup&gt; to 3.4*10&lt;sup&gt;38&lt;/sup&gt;. it consumes 4 bytes in memory.&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008339"&gt;Character data type&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;This data type is used to store character enclosed in a pair of single quotes. E.g. ‘A’, ‘B’, ‘a’or even a blank space can be used as a character. This data type contains one byte on memory and the conversion specifier is %c.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;STRING&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;We can also store number of characters in char data type within the range of -128 to 127. so when we store number of characters in char data type then it is converted into string data type. And we use conversion specifier %s.&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008340"&gt;Double data type&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;This data type is also used to store real type numbers and the keyword “double’ is used. It can hold values upto 16 decimal places and it consumes 8 bytes of memory. The conversion specifier is %lf. Its range is from 1.7*10&lt;sup&gt;-308&lt;/sup&gt; to 1.7*10&lt;sup&gt;308&lt;/sup&gt;.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008341"&gt;Long type&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;It contains whole number bigger than integer value is much bigger than integer. It consumes 4 bytes of memory and its range is from -2147483648 to 2147483647. Its conversion specifier is %l. e.g. 247894, 4774863.&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008342"&gt;Boolian&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;This data type is used in relational operators. It gives us result in true or false. If the output is false it returns to zero (0) and if output is true it returns to one (1). Its range is from 0 to 1 and it has not any conversion specifier.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-6528783372013646732?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/6528783372013646732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/6528783372013646732'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/dfundamental-data-types.html' title='DFUNDAMENTAL DATA TYPES'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-2702396588746519411</id><published>2007-08-28T21:26:00.005-07:00</published><updated>2010-12-02T09:07:00.292-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DATA TYPES'/><title type='text'>DATA TYPES</title><content type='html'>&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;Data types can be represented in variety of ways in any programming language, so that we can store data in system. C language provides us the way to hold any type of data in it. It is called data type. In C language data types are classified into two categories:-&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;1. Fundamental data type&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;2. Derived data type&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008334"&gt;Fundamental Data Type&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;These can be represented on the particular machine and these are provided by every language because without using data types we can’t save our data and can be called as storage media.&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008335"&gt;Derived Data Type&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;These are those data types which are consisting of combination fundamental data types&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-2702396588746519411?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/2702396588746519411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/2702396588746519411'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/data-types.html' title='DATA TYPES'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-8517476194224554560</id><published>2007-08-28T21:26:00.003-07:00</published><updated>2010-12-02T09:07:06.887-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PSEUDO CODE'/><title type='text'>PSEUDO CODE</title><content type='html'>&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;These are basically the instructions written in plain English to solve any problem. It makes a layman understand the complexity of the problem. Pseudo is a way of describing and algorithm without using any specific programming language. It can be the example of real life examples, but it cannot be implemented in computer. It is written roughly at same level of detail.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-8517476194224554560?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/8517476194224554560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/8517476194224554560'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/pseudo-code.html' title='PSEUDO CODE'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-7744767780540614752</id><published>2007-08-28T21:26:00.001-07:00</published><updated>2007-08-28T21:26:28.735-07:00</updated><title type='text'>WHAT ARE KEYWORDS?</title><content type='html'>&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;These are the words which are used by the compiler and have a specific meaning for the compiler. “C” has 32 keywords. Programs are written in free format; means there is no need or no rule to write instruction in one line. Few keywords are:-&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;else, int, float, const, void etc.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-7744767780540614752?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/7744767780540614752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/7744767780540614752'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/what-are-keywords.html' title='WHAT ARE KEYWORDS?'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-2958460011272026480</id><published>2007-08-28T21:25:00.004-07:00</published><updated>2007-08-28T21:26:15.640-07:00</updated><title type='text'>FUNCTIONS</title><content type='html'>&lt;h3&gt;&lt;a name="_Toc158008326"&gt;&lt;i style=""&gt;#include&lt;/i&gt; (Pre-processor directive)&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;Pre processor directive is a directive which is executed at the starting of the program. This directive contains # symbol and include statement (#include). This include statement is used to include any file in your program. This file can be library file or user defined file. When we use #include&lt;stdio.h&gt;, this statement then pre processor tells the compiler to include the content of stdio.h because this file contains all the standard input and output functions in it.&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008327"&gt;&lt;i style=""&gt;void main ( )&lt;/i&gt;&lt;/a&gt;&lt;i style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;This function tells the compiler for the entry point of the program. Without the main function out program cannot run and the body of the function is written in these curly braces [ {&lt;span style=""&gt;  &lt;/span&gt;} ] and these curly braces contains number of statements, functions and expressions, keyword etc. in it. Void is a data type which tells the compiler that our main function is not returning any value to any other program of functions.&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008328"&gt;&lt;i style=""&gt;printf ( )&lt;/i&gt;&lt;/a&gt;&lt;i style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;This function is pre defined function which is defined in our header file called standard input/output file. By using this function, we can display any constant message or any variable value on the screen. Printf stands for print format.&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008329"&gt;&lt;i style=""&gt;clrscr ( )&lt;/i&gt;&lt;/a&gt;&lt;i style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;This function is used to clear our output screen because it remains or displays the output of last executable program and this function clears our output screen before displaying any message on the screen and this function should be used in main function. Before the declaration of variables this function will not work and this function is in conio.h file.&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008330"&gt;&lt;i style=""&gt;Stdio.h&lt;/i&gt;&lt;/a&gt;&lt;i style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;It stands for standard input output header file. This file includes all type of input/output functions. For example:-&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;printf ( ), scanf ( )&lt;/i&gt; etc.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;//wap to print addition of two constants&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;#include&lt;stdio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;void main ( );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;const int a=20;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;const int b=30;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;int c;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;clrscr ( );&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;c=a+b;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;printf (“Sum is %d”,c);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Lucida Console&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-2958460011272026480?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/2958460011272026480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/2958460011272026480'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/functions.html' title='FUNCTIONS'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-5420630871399195609</id><published>2007-08-28T21:25:00.003-07:00</published><updated>2007-08-28T21:25:52.277-07:00</updated><title type='text'>COMMENTS</title><content type='html'>&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;Comments are non-executable code statements. These are always ignored by the compiler, when we compile our program with the help of comments we can give description about the program or any particular statement number of comments can be given in a program. We can have two types of comments.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;1. Single line comments&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;2. Multi line comments&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008323"&gt;1. Single line comments&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;These comments are used when we want to display any statement or write any statement in the program for the knowledge of user. We can use single line comments by using double slash (//) symbol.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;For example:- &lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;//single line comment&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008324"&gt;2. Multi line comment&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;These are used when we want top write numbers of statements which should be ignored by the compiler and also displayed in the program. To display multi line comments we use slash star (/*) in front of the starting line which should be displayed as comment and star slash (*/) at the end of the statement&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;For example:-&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;/* …………………….&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;……………………….&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;…………………….*/&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-5420630871399195609?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/5420630871399195609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/5420630871399195609'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/comments.html' title='COMMENTS'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-6078736901247706166</id><published>2007-08-28T21:25:00.001-07:00</published><updated>2007-08-28T21:25:39.673-07:00</updated><title type='text'>PROGRAM STRUCTURE</title><content type='html'>&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;'C' is case sensitive language. It differentiates between characters written in lower case and character written in upper case. The program you have typed is also known as source code. In a program many lines of code can be written. In a 'C' program each statement is required to end with semicolon (;). A single statement can be split over multiple lines. 'C' is procedural language and each 'C' program must have function name ‘main’. The program execution starts from this function. T he statements within a function are always enclosed within opening curly bracket and closing curly bracket.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-6078736901247706166?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/6078736901247706166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/6078736901247706166'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/program-structure.html' title='PROGRAM STRUCTURE'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-2739206350402600110</id><published>2007-08-28T21:24:00.000-07:00</published><updated>2007-08-28T21:25:23.686-07:00</updated><title type='text'>ESCAPE SEQUENCES</title><content type='html'>&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;Escape sequences are also called white spaces because they are not displayed on the screen. It consists of back slash followed by a character. The character sequence is always enclosed in the control string.&lt;/p&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_urRtV3T_f1g/RtT1J2rnTLI/AAAAAAAAAIE/UMHdaQ5PT_A/s1600-h/output.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp0.blogger.com/_urRtV3T_f1g/RtT1J2rnTLI/AAAAAAAAAIE/UMHdaQ5PT_A/s400/output.JPG" alt="" id="BLOGGER_PHOTO_ID_5103973827363687602" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-2739206350402600110?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/2739206350402600110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/2739206350402600110'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/escape-sequences.html' title='ESCAPE SEQUENCES'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_urRtV3T_f1g/RtT1J2rnTLI/AAAAAAAAAIE/UMHdaQ5PT_A/s72-c/output.JPG' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-811238516458369538</id><published>2007-08-28T21:22:00.004-07:00</published><updated>2007-08-28T21:24:13.185-07:00</updated><title type='text'>SHORTCUTS</title><content type='html'>&lt;span style="font-weight: bold;"&gt;&lt;a href="http://bp3.blogger.com/_urRtV3T_f1g/RtT0vmrnTKI/AAAAAAAAAH8/HzStpjrMUwc/s1600-h/output.JPG"&gt;Click here&lt;/a&gt; or on the picture to enlarge it&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_urRtV3T_f1g/RtT0vmrnTKI/AAAAAAAAAH8/HzStpjrMUwc/s1600-h/output.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp3.blogger.com/_urRtV3T_f1g/RtT0vmrnTKI/AAAAAAAAAH8/HzStpjrMUwc/s200/output.JPG" alt="" id="BLOGGER_PHOTO_ID_5103973376392121506" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-811238516458369538?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/811238516458369538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/811238516458369538'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/shortcuts.html' title='SHORTCUTS'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_urRtV3T_f1g/RtT0vmrnTKI/AAAAAAAAAH8/HzStpjrMUwc/s72-c/output.JPG' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-7304952365969857283</id><published>2007-08-28T21:22:00.003-07:00</published><updated>2007-08-28T21:22:29.845-07:00</updated><title type='text'>PROGRAMMING TECHNIQUES</title><content type='html'>&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;Programming techniques are required to make the program simple, efficient easy to read and maintain some scientific methods have been developed to design any program. We can have three types of programming techniques.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;i style=""&gt;&lt;span style=""&gt;1.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;!--[endif]--&gt;&lt;i style=""&gt;Top down design&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;i style=""&gt;&lt;span style=""&gt;2.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;!--[endif]--&gt;&lt;i style=""&gt;Bottom up design&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;3.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;i style=""&gt;Modular design&lt;/i&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008316"&gt;1. Top down Approach&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;In this program technique the program is designed by breaking it into smaller blocks, which are interlinked and called whenever needed the programmer designs the program in levels and execute the same by calling any of the level.&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008317"&gt;2. Bottom up approach&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;In this technique program is designed by breaking it into smaller blocks but when called it begins from smaller block to the bigger till the end of the program.&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008318"&gt;3. Modular approach&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;In this programming program is designed in levels where a level consists of one or more modular.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-7304952365969857283?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/7304952365969857283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/7304952365969857283'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/programming-techniques.html' title='PROGRAMMING TECHNIQUES'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-8050583720957666507</id><published>2007-08-28T21:22:00.001-07:00</published><updated>2007-08-28T21:38:37.149-07:00</updated><title type='text'>INSTALLING 'C'</title><content type='html'>&lt;p class="MsoNormal" style="margin-left: 0.25in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;1.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Find turboc.exe file.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;2.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Copy this file and paste it on C: drive.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;3.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Open DOS prompt.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;4.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Type cd\ and then press enter.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;5.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;C:\&gt; Turboc.exe –d.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;6.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;C:\&gt; CD tc then press enter.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;How to invoke in 'C' &lt;/p&gt;  &lt;p class="MsoNormal"&gt;Start &lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;è&lt;/span&gt;&lt;/span&gt; Run &lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;è&lt;/span&gt;&lt;/span&gt; Command &amp;amp; then press enter&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;C:\tc\bin &gt;&lt;b style=""&gt;TC&lt;/b&gt; then press enter&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-8050583720957666507?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/8050583720957666507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/8050583720957666507'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/how-to-install-c-language-on-system.html' title='INSTALLING &apos;C&apos;'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-2897202106643663881</id><published>2007-08-28T21:21:00.000-07:00</published><updated>2007-08-28T21:22:03.664-07:00</updated><title type='text'>WHAT IS 'C' LANGUAGE?</title><content type='html'>&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;'C' language is one of the most powerful language. It is a programming language, which is firstly used to develop operating system. It is the middle level language. It was developed at AT &amp; T BELL LABORTARIES, &lt;st1:place st="on"&gt;&lt;st1:country-region st="on"&gt;USA&lt;/st1:country-region&gt;&lt;/st1:place&gt; by DENID RITCHI in 1972. This is general purpose language.&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008312"&gt;History of 'C' Language&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;Before the development of 'C' language there were many languages but these languages provide the functionality for specific purpose. For example:- for commercial applications where a lot of data is to be used, save and retrieved, then COBOL language is used, for engineering and scientific applications, which needs more calculation power of data storage and retrieval we use FORTRAN language. There was a need for a common language for all these purpose of 'C' language is being developed. It is a combination of BSPL and ‘B’ language. It was basically used for their own purpose. So 'C' language is sometimes refers to as a high level language or a high level assembly language. If you will program in assembly language, you will find that it is look like assembly language. &lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008313"&gt;Advantages of 'C' language&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;1.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;'C' is portable means to say program written in one computer may run on another computer successfully.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;2.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;'C' is fast. It means that the executable program obtained after compiling and linking runs very fast.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;3.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;'C' is compact. It means that the statements written in 'C' language are generally short, but are very powerful. Several operations can be combined together in just one statement.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;4.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;The 'C' language has both simplicity of high level language and low level language&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-2897202106643663881?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/2897202106643663881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/2897202106643663881'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/what-is-c-language.html' title='WHAT IS &apos;C&apos; LANGUAGE?'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-5170659415688862586</id><published>2007-08-28T21:19:00.001-07:00</published><updated>2007-08-28T21:21:50.023-07:00</updated><title type='text'>FLOW CHART</title><content type='html'>&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;Flow char is a graphical representation of algorithm. It is used to represent algorithm steps into graphical format. It also gives us an idea to organize the sequence of steps or events necessary to solve a problem with the computer. In other words flow charts are symbolic diagrams of operations and the sequence, data flow, control flow and processing logic in information processing. These charts are used to understand any working sequence of the program.&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008303"&gt;Advantages of flowchart:-&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;1.&lt;span style=""&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;It provides an easy way of communication because any other person besides the programmer can understand the way they are represented.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;2.&lt;span style=""&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;It represents the data flow.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;3.&lt;span style=""&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;It provides a clear overview of the entire program and problem and solution.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;4.&lt;span style=""&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;It checks the accuracy in logic flow.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;5.&lt;span style=""&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;It documents the steps followed in an algorithm.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;6.&lt;span style=""&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;It provides the facility for coding.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;7.&lt;span style=""&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;It provides the way of modification of running program.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;8.&lt;span style=""&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;They shows all major elements and their relationship.&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;span style="font-weight: bold;"&gt;Click on image to enlarge it..&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_urRtV3T_f1g/RtT0KmrnTJI/AAAAAAAAAH0/TNURNCkbkBQ/s1600-h/untitled.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp3.blogger.com/_urRtV3T_f1g/RtT0KmrnTJI/AAAAAAAAAH0/TNURNCkbkBQ/s200/untitled.JPG" alt="" id="BLOGGER_PHOTO_ID_5103972740736961682" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;  &lt;/p&gt;&lt;h3&gt;&lt;a name="_Toc158008305"&gt;Terminator&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;This symbol represents the beginning and end point in a program. We use start and stop option in it.&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008306"&gt;Input/Output Symbol&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;This symbol is used to take any input or output in the algorithm.&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008307"&gt;Process Symbol&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;A rectangle indicates the processing, calculation and arithmetic operations&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008308"&gt;Decision Symbol&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;It is used when we want to take any decision in the program.&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008309"&gt;Connector Symbol&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;This symbol is used to connect the various portion of a flow chart. This is normally used when the flow chart is split between two pages&lt;/p&gt;  &lt;h3&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;a name="_Toc158008310"&gt;Data Flow Symbol&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;This symbol is used to display the flow of the program. It shows the path of logic flow in a program.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-5170659415688862586?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/5170659415688862586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/5170659415688862586'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/flow-chart.html' title='FLOW CHART'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_urRtV3T_f1g/RtT0KmrnTJI/AAAAAAAAAH0/TNURNCkbkBQ/s72-c/untitled.JPG' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-4572076261640405386</id><published>2007-08-28T21:18:00.002-07:00</published><updated>2007-08-28T21:19:02.017-07:00</updated><title type='text'>ALGORITHM</title><content type='html'>&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;When we want to write a program it is firstly required to develop a working logic of the program that is to be written. Algorithm helps us to do this. It is a sequence of instruction to carry out in order to solve a program it is step by step continuing of any working logic.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 3pt; text-align: justify;"&gt;&lt;b style=""&gt;Steps:-&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;i style=""&gt;&lt;span style=""&gt;1.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;!--[endif]--&gt;&lt;i style=""&gt;Start&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;i style=""&gt;&lt;span style=""&gt;2.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;!--[endif]--&gt;&lt;i style=""&gt;Input&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;i style=""&gt;&lt;span style=""&gt;3.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;!--[endif]--&gt;&lt;i style=""&gt;Processing&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;i style=""&gt;&lt;span style=""&gt;4.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;!--[endif]--&gt;&lt;i style=""&gt;Output&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;i style=""&gt;&lt;span style=""&gt;5.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;!--[endif]--&gt;&lt;i style=""&gt;Stop&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;E.g.&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;i style=""&gt;&lt;span style=""&gt;1.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;!--[endif]--&gt;&lt;i style=""&gt;Start&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;i style=""&gt;&lt;span style=""&gt;2.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;!--[endif]--&gt;&lt;i style=""&gt;Let a=10, b=20&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;i style=""&gt;&lt;span style=""&gt;3.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;!--[endif]--&gt;&lt;i style=""&gt;c=a+b&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;i style=""&gt;&lt;span style=""&gt;4.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;!--[endif]--&gt;&lt;i style=""&gt;Print c&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;i style=""&gt;&lt;span style=""&gt;5.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;!--[endif]--&gt;&lt;i style=""&gt;Stop&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc158008301"&gt;Merits/Advantages of Algorithm&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;1.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;It makes the program easy to read and understand.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;2.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;It makes the program portable and efficient.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;3.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;It displays easy steps of processing.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;4.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;It simplifies the modification and to update of the existing program.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;5.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;It provides the facility for testing a program at developing stage.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-4572076261640405386?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/4572076261640405386'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/4572076261640405386'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/algorithm.html' title='ALGORITHM'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-1546121899780637542</id><published>2007-08-28T21:18:00.001-07:00</published><updated>2007-08-28T21:18:44.481-07:00</updated><title type='text'>TRANSLATORS</title><content type='html'>&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;Computer understands the instructions written in machine language. Thus the program written in any other language needs to be translated into machine language. This task is done by translators which are special program to check user program grammatically and produce a corresponding set of machine language. There are two types of translators.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;(1) Compiler&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;(2) Interpreter &lt;/p&gt;  &lt;h3 style="text-align: justify;"&gt;&lt;a name="_Toc158008298"&gt;Compiler&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;A compiler is a special program which checks the entire use program (source code) at once and produced to complete code into machine language or object code if there are errors in the source code. It will display all the errors at once so that you can remove all the errors and execute the program. It will not convert the source code into object or executable code. If there is any error in the source code and after removing all the errors it converts t he whole program into object code.&lt;/p&gt;  &lt;h3 style="text-align: justify;"&gt;&lt;a name="_Toc158008299"&gt;Interpreter&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;It is also a translator but functioning of it is different from compiler because it translates one statement at a time. It translates and executes the first instruction before going to second error. Checking is easier in this case because of line by line translation. The only disadvantage of this translator is that it takes more time for execution.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-1546121899780637542?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/1546121899780637542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/1546121899780637542'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/translators.html' title='TRANSLATORS'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5238934573315809111.post-5992475033386394044</id><published>2007-08-28T21:16:00.002-07:00</published><updated>2007-08-28T21:17:07.215-07:00</updated><title type='text'>COMPUTER LANGUAGE</title><content type='html'>&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;When anyone wants to communicate to any other person then a language is followed. So if we want to communicate with computer system then we have to use computer language. We can have two types of computer languages&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;(1) Low Level Language&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;(2) High Level Language&lt;/p&gt;  &lt;h3 style="text-align: justify;"&gt;&lt;a name="_Toc158008295"&gt;Low Level Language&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;Low level language is the language which is easily understood by the computer system. This language is also called machine language or 1&lt;sup&gt;st&lt;/sup&gt; generation language of the computer. Machine language is written in binary form. So every data and instruction should be given in the form of binary language.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;Computer cannot understand the language spoken by human being. So instructions are converted into binary form and if the programs are written in machine code then our system can run the instruction very fast because it is directly understood by computer system but a single disadvantage of this language is that it is machine dependent.&lt;/p&gt;  &lt;h3 style="text-align: justify;"&gt;&lt;a name="_Toc158008296"&gt;High Level Language&lt;/a&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;The language that makes easier for the programmer to write instructions in the language. He/She commonly uses the English language, but our computer does not understand this language directly because it understands only machine language. High level language is machine independent, means to say that instructions written in high level language are automatically converted into low level language by translator and can run on different computers without any modification. The only disadvantage of this language is that it needs to be converted into machine language, which makes the program executable. This language runs slower that low level language because firstly it is converted into low level language.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238934573315809111-5992475033386394044?l=c-overview.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/5992475033386394044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5238934573315809111/posts/default/5992475033386394044'/><link rel='alternate' type='text/html' href='http://c-overview.blogspot.com/2007/08/computer-language_28.html' title='COMPUTER LANGUAGE'/><author><name>Admin</name><uri>http://www.blogger.com/profile/17184499275006958237</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>
