<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2enclosuresfull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-6728322920546330050</atom:id><lastBuildDate>Fri, 08 Feb 2013 16:54:58 +0000</lastBuildDate><category>C++</category><category>Features of C</category><category>Simple C program</category><category>Programming Essentials</category><category>Inpu-output functions</category><category>C - The Programmer's Language</category><category>Loops</category><category>Using symbolic Constants(#define)</category><category>Basic Variables</category><category>Format Specifiers</category><category>Datatypes</category><category>Tips and Tricks</category><category>Decision Control Structure</category><category>Hierarchy of Operations</category><title>C Tutorials for Beginners</title><description>C tutorials for beginners,easy and faster way to learn C programming.
C language Projects.</description><link>http://beginnersc.blogspot.com/</link><managingEditor>noreply@blogger.com (G.K.)</managingEditor><generator>Blogger</generator><openSearch:totalResults>35</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/cprogrammingtuts" /><feedburner:info uri="cprogrammingtuts" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><itunes:explicit>no</itunes:explicit><itunes:subtitle>C tutorials for beginners,easy and faster way to learn C programming. C language Projects.</itunes:subtitle><itunes:summary>C tutorials for beginners,easy and faster way to learn C programming. C language Projects.</itunes:summary><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-6939499430162054542</guid><pubDate>Sun, 16 Dec 2012 11:05:00 +0000</pubDate><atom:updated>2012-12-16T16:41:32.743+05:30</atom:updated><title>Where to start over from ???? </title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;div style="color: #4d4d4f; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; margin: 10px 0pt 15px; padding: 0pt;"&gt;
After leaving my job as a Technical Analyst at one of the Top MNC’s , I thought of doing something of my own , something I really like to do .&lt;br /&gt;
Its been a month long now, still shuffling about what to do????&amp;nbsp;&lt;img alt=":(" class="wp-smiley" src="http://www.goldi.co.in/wp-includes/images/smilies/icon_sad.gif" style="height: auto; margin: 0px; max-width: 620px; padding: 0pt;" /&gt;&lt;/div&gt;
&lt;div style="color: #4d4d4f; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; margin: 10px 0pt 15px; padding: 0pt;"&gt;
I m pretty confused where to start my development career.&lt;/div&gt;
&lt;div style="color: #4d4d4f; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; margin: 10px 0pt 15px; padding: 0pt;"&gt;
Still thinking if I could go ahead with Android development or shall I give a shot to website development?&lt;br /&gt;
Kinda dilemma , So thought of putting this post on the hacker news, lets see what the opinion says&amp;nbsp;&lt;img alt=":)" class="wp-smiley" src="http://www.goldi.co.in/wp-includes/images/smilies/icon_smile.gif" style="height: auto; margin: 0px; max-width: 620px; padding: 0pt;" /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I write at &lt;a href="http://www.goldi.co.in/"&gt;http://www.goldi.co.in&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/5HjCS9UjDHY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/5HjCS9UjDHY/where-to-start-over-from.html</link><author>noreply@blogger.com (G.K.)</author><thr:total>0</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2012/12/where-to-start-over-from.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-2604352516229894745</guid><pubDate>Wed, 04 Jul 2012 01:08:00 +0000</pubDate><atom:updated>2012-07-04T06:38:40.196+05:30</atom:updated><title>Finding the arithmetic operators</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
Below is a very simple program to find the&amp;nbsp;arithmetic&amp;nbsp;operator.&lt;br /&gt;
Please feel free to put a comment if need an&amp;nbsp;explanation.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#include&lt;stdio.h&gt;&lt;/stdio.h&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#include&lt;conio.h&gt;&lt;/conio.h&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;void main()&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; float a1,a2;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; char operator;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; printf("\n Enter the values of a1 operator a2\n");&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; scanf("%f%c%f",&amp;amp;a1,&amp;amp;operator,&amp;amp;a2);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; switch(operator)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;case '+':&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt; printf("%.2f",a1+a2);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt; break;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;case '-':&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt; &amp;nbsp;printf("%.2f",a1-a2);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt; &amp;nbsp;break;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;case '*':&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt; &amp;nbsp;printf("%.2f",a1*a2);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt; break;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;case '/':&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt; &amp;nbsp;if(a2==0)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt; &amp;nbsp;printf("error\n");&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt; &amp;nbsp;else&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt; &amp;nbsp;printf("%.2f",a1/a2);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt; &amp;nbsp;break;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;default: printf("unknown operatotr\n");&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt; break;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp;}&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/Dvd06vwDEQc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/Dvd06vwDEQc/finding-arithmetic-operators.html</link><author>noreply@blogger.com (G.K.)</author><thr:total>0</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2012/07/finding-arithmetic-operators.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-5769416027011948279</guid><pubDate>Sun, 28 Aug 2011 20:31:00 +0000</pubDate><atom:updated>2011-08-29T02:08:58.176+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C++</category><title>Calculating the average of two numbers using C++</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Though this site aims at understanding C language, I am writing a program for you in C++, to have a general idea about C++ too.&lt;br /&gt;
A program in C++,to calculate the average of two numbers, which are entered by the keyboard while the execution of the program.&lt;br /&gt;
Try to understand the program;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;#include &amp;lt iostream &amp;gt&lt;br /&gt;
using namespace std;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; float num1,num2,average,sum;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cout &amp;lt;&amp;lt; "Enter the first number:";&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cin &amp;gt;&amp;gt; num1;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cout &amp;lt;&amp;lt; "Enter the second number:";&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cin &amp;gt;&amp;gt; num2;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; sum=num1+num2;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; average=sum/2;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cout &amp;lt;&amp;lt; "The sum of the two numbers is:"&amp;lt;&amp;lt; sum&amp;lt;&amp;lt;"\n"&amp;lt;&amp;lt;"The average of the two numbers is:" &amp;lt;&amp;lt; average;&lt;br /&gt;
return(0);&lt;br /&gt;
}&lt;/iostream&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Explaination:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
The new file header used here in this C++ program is the #include&lt;iostream&gt;. By this , we are asking the preprocessor to add the contents of the iostream file to our program.&lt;/iostream&gt;&lt;br /&gt;
&lt;br /&gt;
The program is written in the &lt;i&gt;main()&lt;/i&gt; function , just like in C.&lt;br /&gt;
&lt;br /&gt;
The variables are defined as float in the same manner.&lt;br /&gt;
&lt;br /&gt;
Here in C++ we use &lt;i&gt;cout &lt;/i&gt;and &lt;i&gt;cin&lt;/i&gt; operators for output and input respectively. These are parallel to the &lt;i&gt;printf&lt;/i&gt; and &lt;i&gt;scanf &lt;/i&gt;in C.&lt;br /&gt;
In the last &lt;i&gt;cout &lt;/i&gt;statement the output is cascaded using the &lt;i&gt;cout &lt;/i&gt;operator.which is new in the C++ .&lt;br /&gt;
&lt;br /&gt;
As the &lt;i&gt;main()&lt;/i&gt; function is integer type , it returns a zero value which is written as &lt;i&gt;return(0)&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/saEIpSX-V_0" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/saEIpSX-V_0/calculating-average-of-two-numbers.html</link><author>noreply@blogger.com (G.K.)</author><thr:total>5</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2011/08/calculating-average-of-two-numbers.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-7815222590694668612</guid><pubDate>Sat, 27 Aug 2011 06:07:00 +0000</pubDate><atom:updated>2011-08-28T12:17:39.523+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><title>C Reference app on Android</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Android is one of the most rapidly growing mobile platform today. Most of us are opting for android devices , cell phones /tablets and so am I . While surfing around the Android Market&lt;i&gt;(The place to download android apps)&lt;/i&gt; I came across an helpful app; "&lt;b&gt;C Reference&lt;/b&gt;".&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This app provides the reference to the standard C library. It also contains description of all the functions and macros in C, in a searchable from. This app could be very handy in while writing C programs.And the best part about this app is that , this app can be downloaded free from the android market.&lt;br /&gt;
&lt;br /&gt;
Screenshots:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-teWjF5M5XVI/TlnkD631tJI/AAAAAAAAAMc/J5AYg0RbL_g/s1600/SC20110828-115400.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-teWjF5M5XVI/TlnkD631tJI/AAAAAAAAAMc/J5AYg0RbL_g/s320/SC20110828-115400.png" width="192" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-nEvxOXW8t3k/TlnkHwwJ9VI/AAAAAAAAAMg/xSHuhQgARDg/s1600/SC20110828-115424.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-nEvxOXW8t3k/TlnkHwwJ9VI/AAAAAAAAAMg/xSHuhQgARDg/s320/SC20110828-115424.png" width="192" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
You can see and download this app from &lt;b&gt;&lt;a href="https://market.android.com/details?id=com.algeo.cref&amp;amp;feature=also_installed"&gt;C Reference App&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/86GjqSrP8HE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/86GjqSrP8HE/c-reference-app-on-android.html</link><author>noreply@blogger.com (G.K.)</author><media:thumbnail url="http://3.bp.blogspot.com/-teWjF5M5XVI/TlnkD631tJI/AAAAAAAAAMc/J5AYg0RbL_g/s72-c/SC20110828-115400.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2011/08/c-reference-app-on-android.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-6124661909988016298</guid><pubDate>Fri, 08 Jul 2011 17:19:00 +0000</pubDate><atom:updated>2011-08-27T15:09:05.815+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><title>Animation with just three lines of C code</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Check out , the link below takes to the page that has a C code , which creates animation with just three lines of C code. Quite interesting&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://a1k0n.net/2011/06/26/obfuscated-c-yahoo-logo.html"&gt;http://a1k0n.net/2011/06/26/obfuscated-c-yahoo-logo.html&lt;iframe align="left" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=cproglangtuto-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=0672305100&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="align: left; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"&gt;&lt;/iframe&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/r5DqMQ0dsFY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/r5DqMQ0dsFY/animation-with-just-three-lines-of-c.html</link><author>noreply@blogger.com (G.K.)</author><thr:total>0</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2011/07/animation-with-just-three-lines-of-c.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-3116892009643232018</guid><pubDate>Sun, 29 Aug 2010 18:59:00 +0000</pubDate><atom:updated>2011-08-29T02:10:13.212+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Loops</category><title>A C program to print the average of the numbers(Using While Loop)</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;pre&gt;Below is a program to print the average of two numbers that are input through the keyboard. &lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;/* Read the numbers from the keyboard as input and
 * print out their average as output.  */&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;#include&lt;stdio.h&gt; &lt;/stdio.h&gt;&lt;b&gt;&amp;amp;lt stdio &amp;amp;gt&lt;/b&gt;&lt;stdio.h&gt;
int main( )
{
   double x = 0.0, sum = 0.0;
   int count = 0;

   printf( "\t--- Calculate Average of the numbers ---\n" );
   printf( "\nEnter the number you want to calulate average for:\n"
           "(Type a letter to end your input)\n" );
   while ( scanf( "%lf", &amp;amp;x ) == 1 )
   {
      sum += x;
      ++count;
   }
   if ( count == 0 )
     printf( "No input data given!\n" );
   else
     printf( "The average of given numbers is %.2f\n", sum/count );
   return 0;
}&lt;/stdio.h&gt;&lt;/pre&gt;&lt;pre&gt;&lt;stdio.h&gt;&lt;/stdio.h&gt;&lt;/pre&gt;&lt;pre&gt;&lt;stdio.h&gt;&lt;/stdio.h&gt;&lt;/pre&gt;&lt;pre&gt;The output of the program:&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-GykOHHqk1rw/TlCz0g9GaSI/AAAAAAAAAMY/qkYePfSD_p0/s1600/average_Cprog.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="194" src="http://2.bp.blogspot.com/-GykOHHqk1rw/TlCz0g9GaSI/AAAAAAAAAMY/qkYePfSD_p0/s320/average_Cprog.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;stdio.h&gt;&lt;/stdio.h&gt;&lt;/pre&gt;&lt;pre&gt;&lt;stdio.h&gt;&lt;/stdio.h&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/c6sCsCF7eIE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/c6sCsCF7eIE/program-to-print-average-of.html</link><author>noreply@blogger.com (G.K.)</author><media:thumbnail url="http://2.bp.blogspot.com/-GykOHHqk1rw/TlCz0g9GaSI/AAAAAAAAAMY/qkYePfSD_p0/s72-c/average_Cprog.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2010/08/program-to-print-average-of.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-4184588188503965664</guid><pubDate>Fri, 23 Apr 2010 12:14:00 +0000</pubDate><atom:updated>2011-09-03T11:55:06.105+05:30</atom:updated><title>Turbo C++ for  Windows 7  64 bit</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&amp;nbsp;Its a very simple guide to install Turbo C++ on Windows 7 64 bit&amp;nbsp; operating system.&lt;br /&gt;
Follow the steps below to install Turbo C++ compiler on your windows 7 ,64 bit operating system.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Note&lt;/i&gt; - Please let me know whether the process is working for you or if you are getting some kind of error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 1)&lt;/b&gt; Install the software DOSBOX version 0.73(Search for it in the search bar).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 2)&lt;/b&gt; Create a folder on your C drive, e.g.Turbo; (c:\Turbo\)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 3)&lt;/b&gt; Extract TC into the created folder(e.g. c:\Turbo\);(you can search and download it)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 4)&lt;/b&gt;Run the application DOSBOX 0.73,previously downloaded and installed.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 5)&lt;/b&gt; Type the following commands at the command prompt that will appear,&lt;br /&gt;
&lt;br /&gt;
[z]: mount d c:\Turbo\&lt;br /&gt;
&lt;br /&gt;
Following this you will get a message "Drive D is mounted as local directory c:\Turbo\"&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 6)&lt;/b&gt; Type d: to shift to d:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 7)&lt;/b&gt; Then type commands mentioned below;&lt;br /&gt;
&lt;br /&gt;
cd tc&lt;br /&gt;
&lt;br /&gt;
cd bin&lt;br /&gt;
&lt;br /&gt;
tc or tc.exe&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 8)&lt;/b&gt; In the turbo C++ go to Options\Directories\ Change the source of TC to the source directory .&lt;br /&gt;
&lt;br /&gt;
Here's a video to help you out:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://i.ytimg.com/vi/Fc7D3HLi7Ps/0.jpg" height="266" width="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/Fc7D3HLi7Ps?f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="320" height="266"  src="http://www.youtube.com/v/Fc7D3HLi7Ps?f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="color: blue;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&lt;/span&gt;&lt;u style="color: blue;"&gt;&lt;b&gt;&lt;i&gt;Alternate method:&lt;/i&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The alternate method of running C/C++ on windows 7-64bit system, is by using a software "Codeblocks" .&lt;br /&gt;
You can download codeblocks IDE from &lt;a href="http://www.codeblocks.org/downloads"&gt;Codeblocks Download page&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Start writing your&amp;nbsp; &lt;a href="http://beginnersc.blogspot.com/2008/04/simple-c-program.html"&gt;First C Program&lt;/a&gt;..&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/PHDIqbaNsh4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/PHDIqbaNsh4/installing-turbo-c-on-windows-7-64bit.html</link><author>noreply@blogger.com (G.K.)</author><thr:total>18</thr:total><enclosure url="http://www.youtube.com/v/Fc7D3HLi7Ps?f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" length="1145" type="application/x-shockwave-flash" /><media:content url="http://www.youtube.com/v/Fc7D3HLi7Ps?f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" fileSize="1145" type="application/x-shockwave-flash" /><itunes:explicit>no</itunes:explicit><itunes:subtitle> &amp;nbsp;Its a very simple guide to install Turbo C++ on Windows 7 64 bit&amp;nbsp; operating system. Follow the steps below to install Turbo C++ compiler on your windows 7 ,64 bit operating system. Note - Please let me know whether the process is working for y</itunes:subtitle><itunes:author>noreply@blogger.com (G.K.)</itunes:author><itunes:summary> &amp;nbsp;Its a very simple guide to install Turbo C++ on Windows 7 64 bit&amp;nbsp; operating system. Follow the steps below to install Turbo C++ compiler on your windows 7 ,64 bit operating system. Note - Please let me know whether the process is working for you or if you are getting some kind of error. Step 1) Install the software DOSBOX version 0.73(Search for it in the search bar). Step 2) Create a folder on your C drive, e.g.Turbo; (c:\Turbo\) Step 3) Extract TC into the created folder(e.g. c:\Turbo\);(you can search and download it) Step 4)Run the application DOSBOX 0.73,previously downloaded and installed. Step 5) Type the following commands at the command prompt that will appear, [z]: mount d c:\Turbo\ Following this you will get a message "Drive D is mounted as local directory c:\Turbo\" Step 6) Type d: to shift to d: Step 7) Then type commands mentioned below; cd tc cd bin tc or tc.exe Step 8) In the turbo C++ go to Options\Directories\ Change the source of TC to the source directory . Here's a video to help you out: &amp;nbsp;Alternate method: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The alternate method of running C/C++ on windows 7-64bit system, is by using a software "Codeblocks" . You can download codeblocks IDE from Codeblocks Download page. Start writing your&amp;nbsp; First C Program..C programming tutorials for beginners</itunes:summary><feedburner:origLink>http://beginnersc.blogspot.com/2010/04/installing-turbo-c-on-windows-7-64bit.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-4347532727675850669</guid><pubDate>Wed, 17 Feb 2010 21:49:00 +0000</pubDate><atom:updated>2010-02-18T03:22:49.981+05:30</atom:updated><title>Seminar Topics(100)</title><description>Excellent Seminar/Paper Presentation Topics for Students&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(51, 102, 255);"&gt;Put the desired topic name in search bar to get detail search about the topic. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. 4G Wireless Systems&lt;br /&gt;   2. A BASIC TOUCH-SENSOR SCREEN SYSTEM&lt;br /&gt;   3. Artificial Eye&lt;br /&gt;   4. Animatronics&lt;br /&gt;   5. Automatic Teller Machine&lt;br /&gt;   6. Aircars&lt;br /&gt;   7. Adding interlligence to ineternet using satellite&lt;br /&gt;   8. ADSL&lt;br /&gt;   9. Aeronautical Communications&lt;br /&gt;  10. Agent oriented programing&lt;br /&gt;  11. Animatronics&lt;br /&gt;  12. Augmented reality&lt;br /&gt;  13. Autonomic Computing&lt;br /&gt;  14. Bicmos technology&lt;br /&gt;  15. BIOCHIPS&lt;br /&gt;  16. Biomagnetism&lt;br /&gt;  17. Biometric technology&lt;br /&gt;  18. BLUE RAY&lt;br /&gt;  19. Boiler Instrumentation&lt;br /&gt;  20. Brain-Computer Interface&lt;br /&gt;  21. Bluetooth Based Smart Sensor Networks&lt;br /&gt;  22. BIBS&lt;br /&gt;  23. CDMA Wireless Data Transmitter&lt;br /&gt;  24. Cellonics Technology&lt;br /&gt;  25. Cellular Positioning&lt;br /&gt;  26. Cruise Control Devices&lt;br /&gt;  27. Crusoe Processor&lt;br /&gt;  28. Cyberterrorism&lt;br /&gt;  29. Code division duplexing&lt;br /&gt;  30. Cellular Digital Packet Data&lt;br /&gt;  31. Computer clothing&lt;br /&gt;  32. Cordect WLL&lt;br /&gt;  33. CARBIN NANO TUBE ELECTRONICS&lt;br /&gt;  34. CARNIVORE AN FBI PACKET SNIFFER&lt;br /&gt;  35. CDMA&lt;br /&gt;  36. CELLONICSTM TECHNOLOGY&lt;br /&gt;  37. CELLULAR NEURAL NETWORKS&lt;br /&gt;  38. CELLULAR DIGITAL PACKET DATA&lt;br /&gt;  39. CIRCUIT AND SAFETY ANALYSIS SYSTEM&lt;br /&gt;  40. CISCO IOS FIREWALL&lt;br /&gt;  41. CLUSTER COMPUTING&lt;br /&gt;  42. COLD FUSION&lt;br /&gt;  43. COMPACT PCI&lt;br /&gt;  44. COMPUTER AIDED PROCESS PLANNING (CAPP)&lt;br /&gt;  45. COMPUTER CLOTHING&lt;br /&gt;  46. COMPUTER MEMORY BASED ON THE PROTEIN BACTERIO&lt;br /&gt;  47. CONCEPTUAL GRAPHICS&lt;br /&gt;  48. CORDECT&lt;br /&gt;  49. CORDECT WLL&lt;br /&gt;  50. CRUISE CONTROL DEVICES&lt;br /&gt;  51. CRUSOE PROCESSOR&lt;br /&gt;  52. CRYOGENIC GRINDING&lt;br /&gt;  53. CRYPTOVIROLOGY&lt;br /&gt;  54. CT SCANNING&lt;br /&gt;  55. CVT&lt;br /&gt;  56. Delay-Tolerant Networks&lt;br /&gt;  57. DEVELOPMENT OF WEARABLE BIOSENSOR&lt;br /&gt;  58. DiffServ-Differentiated Services&lt;br /&gt;  59. DWDM&lt;br /&gt;  60. Digital Audio Broadcasting&lt;br /&gt;  61. Digital Visual Interface&lt;br /&gt;  62. Direct to home television (DTH)&lt;br /&gt;  63. DOUBLE BASE NUMBER SYSTEM&lt;br /&gt;  64. DATA COMPRESSION TECHNIQUES&lt;br /&gt;  65. DELAY-TOLERANT NETWORKS&lt;br /&gt;  66. DENSE WAVELENGTH DIVISION MULTIPLEXING&lt;br /&gt;  67. DESIGN, ANALYSIS, FABRICATION AND TESTING OF A COMPOSITE LEAF  SPRING&lt;br /&gt;  68. DEVELOPMENT OF WEARABLE BIOSENSOR&lt;br /&gt;  69. DGI SCENT&lt;br /&gt;  70. DIFFFSERVER&lt;br /&gt;  71. DIGITAL AUDIO BROADCASTING&lt;br /&gt;  72. DIGITAL CONVERGENCE&lt;br /&gt;  73. DIGITAL HUBBUB&lt;br /&gt;  74. DIGITAL SILHOUETTES&lt;br /&gt;  75. DIGITAL THEATRE SYSTEM&lt;br /&gt;  76. DIGITAL WATER MARKING&lt;br /&gt;  77. DIRECT TO HOME&lt;br /&gt;  78. DISKLESS LINUX TERMINAL&lt;br /&gt;  79. DISTRIBUTED FIREWALL&lt;br /&gt;  80. DSL&lt;br /&gt;  81. DTM&lt;br /&gt;  82. DWDM&lt;br /&gt;  83. DYNAMIC LOADABLE MODULES&lt;br /&gt;  84. DYNAMICALLY RECONFIGURABLE COMPUTING&lt;br /&gt;  85. ELECTROMAGNETIC INTERFERENCE&lt;br /&gt;  86. Embedded system in automobiles&lt;br /&gt;  87. Extreme Programming&lt;br /&gt;  88. EDGE&lt;br /&gt;  89. ELECTROMAGNETIC LAUNCHING SYSYEM&lt;br /&gt;  90. E BOMB&lt;br /&gt;  91. E INTELLIGENCE&lt;br /&gt;  92. E PAPER TECHNOLOGY&lt;br /&gt;  93. ELECTRONIC DATA INTERCHANGE&lt;br /&gt;  94. ELECTRONIC NOSE&lt;br /&gt;  95. ELECTRONIC NOSE &amp;amp; ITS APPLICATION&lt;br /&gt;  96. ELECTRONICS MEET ANIMALS BRAIN&lt;br /&gt;  97. EMBEDDED&lt;br /&gt;  98. EMBEDDED DRAM&lt;br /&gt;  99. EMBEDDED LINUX&lt;br /&gt; 100. EMBRYONICS APPROACH TOWARDS INTEGRATED CIRCUITS&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/jIYDnjyO0WY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/jIYDnjyO0WY/seminar-topics100.html</link><author>noreply@blogger.com (G.K.)</author><thr:total>0</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2010/02/seminar-topics100.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-6963703516049203365</guid><pubDate>Wed, 07 Oct 2009 12:33:00 +0000</pubDate><atom:updated>2009-10-07T18:05:36.615+05:30</atom:updated><title>Use Flowcharts(Tip)</title><description>&lt;div style="text-align: center;"&gt;                                  &lt;span style="font-weight: bold; font-family: webdings;"&gt;   FLOWCHART&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Use a flowchart to represent the logic of your program before coding.This will reduce lot of redundancy and helps improve your logic. In fact, even if you don't use a flow chart, but sure to spend some time thinking about your program design before diving in and writing code.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If any questions and queries regarding flowchart,write in the comment box.&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/Baw0okda_vM" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/Baw0okda_vM/use-flowchartstip.html</link><author>noreply@blogger.com (G.K.)</author><thr:total>0</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2009/10/use-flowchartstip.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-4956467792688485794</guid><pubDate>Wed, 18 Mar 2009 06:57:00 +0000</pubDate><atom:updated>2013-02-08T22:24:58.670+05:30</atom:updated><title>C Program to calculate roots of quadratic equations</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div style="text-align: center;"&gt;
&lt;div style="font-weight: bold;"&gt;
C Program to calculate roots of quadratic equations&lt;/div&gt;
&lt;div style="font-weight: bold;"&gt;
&lt;span style="font-style: italic; font-weight: normal;"&gt;This is a simple C program to calculate roots of quadratic equations.A function sqrt() is used in this program to find the square root.Also, we will have to include the math.h header.&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-weight: bold;"&gt;
&lt;span style="font-style: italic; font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-weight: bold;"&gt;
&lt;span style="font-style: italic; font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;b&gt;&lt;blockquote class="tr_bq" style="font-style: italic;"&gt;
&lt;br /&gt;&lt;/blockquote&gt;
&lt;blockquote class="tr_bq" style="font-style: italic;"&gt;
&lt;br /&gt;&lt;/blockquote&gt;
&lt;blockquote class="tr_bq" style="text-align: left;"&gt;
#include&lt;stdio .h=""&gt;&lt;/stdio&gt;&lt;/blockquote&gt;
&lt;blockquote class="tr_bq" style="text-align: left;"&gt;
#include&lt;math .h=""&gt;&lt;/math&gt;&lt;/blockquote&gt;
&lt;blockquote class="tr_bq" style="text-align: left;"&gt;
main()&lt;/blockquote&gt;
&lt;blockquote class="tr_bq" style="text-align: left;"&gt;
{&lt;/blockquote&gt;
&lt;blockquote class="tr_bq" style="text-align: left;"&gt;
int a,b,c,d;&lt;/blockquote&gt;
&lt;blockquote class="tr_bq" style="text-align: left;"&gt;
float root1,root2;&lt;/blockquote&gt;
&lt;blockquote class="tr_bq" style="text-align: left;"&gt;
printf("Enter the values of a,b,c");&lt;/blockquote&gt;
&lt;blockquote class="tr_bq" style="text-align: left;"&gt;
scanf("%d%d%d",&amp;amp;a,&amp;amp;b,&amp;amp;c);&lt;/blockquote&gt;
&lt;blockquote class="tr_bq" style="text-align: left;"&gt;
d=b*b-4*a*c;&lt;/blockquote&gt;
&lt;blockquote class="tr_bq" style="text-align: left;"&gt;
root1=((-b)+sqrt(d))/(2*a);&lt;/blockquote&gt;
&lt;blockquote class="tr_bq" style="text-align: left;"&gt;
root2=((-b)-sqrt(d))/(2*a);&lt;/blockquote&gt;
&lt;blockquote class="tr_bq" style="text-align: left;"&gt;
printf("root1=%f and root2=%f",root1,root2);&lt;/blockquote&gt;
&lt;blockquote class="tr_bq" style="text-align: left;"&gt;
}&lt;/blockquote&gt;
&lt;/b&gt;&lt;/blockquote&gt;
&lt;i&gt;&lt;div style="text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/i&gt;&lt;br /&gt;
&lt;div style="font-weight: bold; text-align: left;"&gt;
&lt;span style="font-weight: normal;"&gt;&lt;span style="background-color: white; color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-weight: normal;"&gt;&lt;span style="background-color: white; color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/m00Fo2pr96I" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/m00Fo2pr96I/c-program-to-calculate-roots-of.html</link><author>noreply@blogger.com (G.K.)</author><thr:total>10</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2009/03/c-program-to-calculate-roots-of.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-3921439165040935822</guid><pubDate>Thu, 05 Feb 2009 17:44:00 +0000</pubDate><atom:updated>2009-02-05T23:17:55.392+05:30</atom:updated><title>Program to Propose a girl(Funny)</title><description>Ok guys lets have a fun break here ;-)&lt;br /&gt;Here's a program to &lt;span style="color: rgb(255, 102, 102);"&gt;Propose a Girl&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;/*Program to Propose a girl*/&lt;br /&gt;#include STD ISD PCO.h&lt;br /&gt;#include mobile.h&lt;br /&gt;#include sms.h&lt;br /&gt;#include love.h&lt;br /&gt;#define Cute beautiful_lady&lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;goto college;&lt;br /&gt;scanf("100%",&amp;amp;ladies);&lt;br /&gt;&lt;br /&gt;if(lady ==Cute)&lt;br /&gt;line++;&lt;br /&gt;while( !reply )&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;printf("I Love U");&lt;br /&gt;&lt;br /&gt;scanf("100%",&amp;amp;reply);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if(reply == "GAALI")&lt;br /&gt;main(); /* go back and repeat the process */&lt;br /&gt;&lt;br /&gt;else if(reply == "SANDAL ")&lt;br /&gt;exit(1);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;else if(reply == "I Love U")&lt;br /&gt;{&lt;br /&gt;lover =Cute ;&lt;br /&gt;love = (heart*)malloc(sizeof(lover));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;goto restaurant;&lt;br /&gt;&lt;br /&gt;restaurant:&lt;br /&gt;{&lt;br /&gt;food++;&lt;br /&gt;smile++;&lt;br /&gt;pay-&gt;money = lover-&gt;money;&lt;br /&gt;return(college);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if(time==2.30)&lt;br /&gt;goto cinema;&lt;br /&gt;&lt;br /&gt;cinema:&lt;br /&gt;{&lt;br /&gt;watch++;&lt;br /&gt;if(intermission)&lt;br /&gt;{&lt;br /&gt;coke++;&lt;br /&gt;Popecorn++;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;ERROR: infinite loop at " if(reply==SANDAL)&lt;br /&gt;WARNINGS: SERIOUS INJURIES EXPECTED&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/JTmPYRfp7kg" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/JTmPYRfp7kg/program-to-propose-girlfunny.html</link><author>noreply@blogger.com (G.K.)</author><thr:total>0</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2009/02/program-to-propose-girlfunny.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-4702371195892056754</guid><pubDate>Tue, 27 Jan 2009 18:15:00 +0000</pubDate><atom:updated>2009-01-29T22:49:36.097+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Loops</category><title>C Program using While loop to Convert Fahrenheit to Celsius</title><description>This is a C program to convert Fahrenheit to Celcius.&lt;br /&gt;Let us take a look at the  program .&lt;br /&gt;This can be  easily accomplished with a for loop or a while loop: &lt;p&gt; &lt;span style="color:blue;"&gt; &lt;pre&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;#include &lt;stdio.h&gt;&lt;/stdio.h&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;int main()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    int a;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    a = 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    while (a &lt;= 100)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;        printf("%4d degrees F = %4d degrees C\n",&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            a, (a - 32) * 5 / 9);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;        a = a + 10;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    return 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt; &lt;/span&gt; &lt;/p&gt;&lt;p&gt;If you run this program, it will produce a table of values starting at 0 degrees F and ending at 100 degrees F. The output will look like this: &lt;/p&gt;&lt;p&gt; &lt;b&gt; &lt;pre&gt;   0 degrees F =  -17 degrees C&lt;br /&gt;10 degrees F =  -12 degrees C&lt;br /&gt;20 degrees F =   -6 degrees C&lt;br /&gt;30 degrees F =   -1 degrees C&lt;br /&gt;40 degrees F =    4 degrees C&lt;br /&gt;50 degrees F =   10 degrees C&lt;br /&gt;60 degrees F =   15 degrees C&lt;br /&gt;70 degrees F =   21 degrees C&lt;br /&gt;80 degrees F =   26 degrees C&lt;br /&gt;90 degrees F =   32 degrees C&lt;br /&gt;100 degrees F =   37 degrees C&lt;br /&gt;&lt;/pre&gt; &lt;/b&gt; &lt;/p&gt;&lt;p&gt;The table's values are in increments of 10 degrees. You can see that you can easily change the starting, ending or increment values of the table that the program produces. &lt;/p&gt;&lt;p&gt; If you wanted your values to be more accurate, you could use &lt;b&gt;floating &lt;/b&gt; values instead of integer values: &lt;/p&gt;&lt;p&gt; &lt;span style="color:blue;"&gt; &lt;pre&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;#include &lt;stdio.h&gt;&lt;/stdio.h&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;int main()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    float a;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    a = 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    while (a &lt;= 100)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;        printf("%6.2f degrees F = %6.2f degrees C\n",&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            a, (a - 32.0) * 5.0 / 9.0);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;        a = a + 10;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    return 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt; &lt;/span&gt; &lt;/p&gt;&lt;p&gt; You can see that the declaration for &lt;b&gt;a&lt;/b&gt; has been changed to a float, and the &lt;b&gt;%f&lt;/b&gt; symbol replaces the &lt;b&gt;%d&lt;/b&gt; symbol in the printf statement. In addition, the %f symbol has some formatting applied to it: The value will be printed with six digits preceding the decimal point and two digits following the decimal point. &lt;/p&gt;&lt;p&gt;Now let's say that we wanted to modify the program so that the temperature 98.6 is inserted in the table at the proper position. That is, we want the table to increment every 10 degrees, but we also want the table to include an extra line for 98.6 degrees F because that is the normal body temperature for a human being. The following program accomplishes the goal: &lt;/p&gt;&lt;p&gt; &lt;span style="color:blue;"&gt; &lt;pre&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;#include &lt;stdio.h&gt;&lt;/stdio.h&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;int main()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    float a;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    a = 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    while (a &lt;= 100)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; if (a &gt; 98.6)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            printf("%6.2f degrees F = %6.2f degrees C\n",&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                98.6, (98.6 - 32.0) * 5.0 / 9.0);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;        printf("%6.2f degrees F = %6.2f degrees C\n",&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            a, (a - 32.0) * 5.0 / 9.0);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;        a = a + 10;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    return 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt; &lt;/span&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/Zmf5_nLeIiw" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/Zmf5_nLeIiw/while-loop-program-convert-fahrenheit.html</link><author>noreply@blogger.com (G.K.)</author><thr:total>2</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2009/01/while-loop-program-convert-fahrenheit.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-5609000251606116249</guid><pubDate>Fri, 23 Jan 2009 19:07:00 +0000</pubDate><atom:updated>2011-08-22T20:11:25.583+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><title>Good Programming habits</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Some of good programming habits:&lt;br /&gt;
1. Before sitting down for coding, you must have formal or a paper-napkin design of the solution to be coded. Never start coding without any design unless the code is trivial one.&lt;br /&gt;
2. Good code documentation is as important as good knowledge of a programming language. Write brief logic for each major block of your code as comments in source code file itself. Its good to mention creation and modification dates of your program along-with why modification was required.&lt;br /&gt;
3. Maintaining versions of your program is another important task. Some present-day programming tools already have a built-in version management. Whenever you make any change to your program, they save its copy as .bak file.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/FfkaC0x_foA" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/FfkaC0x_foA/good-programming-habits.html</link><author>noreply@blogger.com (G.K.)</author><thr:total>0</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2009/01/good-programming-habits.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-4222649131326447439</guid><pubDate>Wed, 21 Jan 2009 18:18:00 +0000</pubDate><atom:updated>2011-08-22T20:11:42.962+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><title>Tip-Always make a backup</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Always make sure that when you have a program with more  lines of code, you make a backup copy somewhere.&lt;br /&gt;
Once you find you made some huge mistake, or decide there is a better way to code the entire thing, you'll be glad you made that backup so many hours/days ago instead of re-coding hundreds of lines of code.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/C2SeBe_qqL4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/C2SeBe_qqL4/tip-always-make-backup.html</link><author>noreply@blogger.com (G.K.)</author><thr:total>1</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2009/01/tip-always-make-backup.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-1959063404831876855</guid><pubDate>Mon, 19 Jan 2009 19:06:00 +0000</pubDate><atom:updated>2009-01-20T00:47:38.711+05:30</atom:updated><title /><description>C language is widely famous and founds its applications everywhere because of its versatility and flexibility.In fact C language is a Programmers’s language.&lt;br /&gt;     Not all computer programming languages are for programmers. For instance the COBOL and BASIC are not the languages for programmers.C was created,influenced, and tested by working programmers.&lt;br /&gt;That’s the reason  C gives the programmer what the programmer wants.C is the language with  few restrictions, few complaints, block structures, stand alone functions, and a compact&lt;br /&gt;set of keywords.Using C Language , you can nearly achieve the efficiency of assembly code&lt;br /&gt;combined with the structure of ALGOL.This has made C language highly popular between professional programmers.&lt;br /&gt;C was initially used for systems programming.&lt;br /&gt;Here are few example of  system programming;&lt;br /&gt;1) Operating systems&lt;br /&gt;2) Interpreters&lt;br /&gt;3) Editors&lt;br /&gt;4) Compilers&lt;br /&gt;5) File utilities&lt;br /&gt;6) Performance enhancers&lt;br /&gt;7) Real-time executives&lt;br /&gt;&lt;br /&gt;C founds wide application in many because of its efficiency and portability.&lt;br /&gt;Much of the world still runs on C code, and those programs will continue to be enhanced and&lt;br /&gt;maintained.&lt;br /&gt;In order to start programming one has to begin with C language.&lt;br /&gt;This blog  helps ou start learning C programming.&lt;br /&gt;You may start from here the &lt;a href="http://beginnersc.blogspot.com/2008/04/history-of-c.html"&gt;First Post&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/a2O3T6gbL0A" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/a2O3T6gbL0A/c-language-is-widely-famous-and-founds.html</link><author>noreply@blogger.com (G.K.)</author><thr:total>0</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2009/01/c-language-is-widely-famous-and-founds.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-6226488951773009978</guid><pubDate>Fri, 26 Sep 2008 21:17:00 +0000</pubDate><atom:updated>2010-09-01T11:46:05.264+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Loops</category><title>The While Loop</title><description>&lt;span style="font-weight: bold;"&gt;The While Loop&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
While programming we often need to do something a fixed number of times.&lt;br /&gt;
In such cases the While loop is used.&lt;br /&gt;
Lets study it with the help of an example below;&lt;br /&gt;
&lt;br /&gt;
/* Calculation of simple interest for 3 sets of p, n and r */&lt;br /&gt;
&lt;br /&gt;
main( )&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
int p, n, count ;&lt;br /&gt;
&lt;br /&gt;
float r, si ;&lt;br /&gt;
&lt;br /&gt;
count = 1 ;&lt;br /&gt;
&lt;br /&gt;
while ( count &amp;lt;= 3 )&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
printf ( "\nEnter values of p, n and r " ) ;&lt;br /&gt;
&lt;br /&gt;
scanf ( "%d %d %f", &amp;amp;p, &amp;amp;n, &amp;amp;r ) ;&lt;br /&gt;
&lt;br /&gt;
si = p * n * r / 100 ;&lt;br /&gt;
&lt;br /&gt;
printf ( "Simple interest = Rs. %f", si ) ;&lt;br /&gt;
&lt;br /&gt;
count = count + 1 ;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The program above executes all statements after while three times.The logic of calculating simple interest is written in braces after the while word and is called as the body of the while loop.The brackets after the while contains the condition.All the statements within the loop are executed till the condition is true.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another program which uses while loop,to print the average of the numbers input .&lt;a href="http://beginnersc.blogspot.com/2010/08/program-to-print-average-of.html"&gt;&lt;b&gt;&lt;u&gt;The Program&lt;/u&gt;&lt;/b&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/V6OaNeCN_d0" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/V6OaNeCN_d0/while-loop.html</link><author>noreply@blogger.com (G.K.)</author><thr:total>0</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2008/09/while-loop.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-1290540365667993959</guid><pubDate>Fri, 12 Sep 2008 19:36:00 +0000</pubDate><atom:updated>2008-09-13T01:07:20.052+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Loops</category><title>loops2</title><description>The versatility of the computer lies in its ability to perform a set of&lt;br /&gt;instructions repeatedly. This involves repeating some portion of&lt;br /&gt;the program either a specified number of times or until a particular&lt;br /&gt;condition is being satisfied. This repetitive operation is done&lt;br /&gt;through a loop control instruction.&lt;br /&gt;&lt;br /&gt;There are three methods by way of which we can repeat a part of a&lt;br /&gt;program;&lt;br /&gt;(1)    Using a for statement&lt;br /&gt;(2)    Using a while statement&lt;br /&gt;(3)    Using a do-while statement&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/LqPHkOT6byc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/LqPHkOT6byc/loops2.html</link><author>noreply@blogger.com (G.K.)</author><thr:total>0</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2008/09/loops2.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-9065003698978308065</guid><pubDate>Tue, 09 Sep 2008 12:01:00 +0000</pubDate><atom:updated>2008-09-09T17:39:43.122+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Loops</category><title>Loops</title><description>Till now we have studied the use of Decision or Sequential Control statements.&lt;br /&gt;When executed thesestatements always perform the same series of actions, in the same way, exactly once.But in order to perform programs that can do an action over and over,we need LOOPS.&lt;br /&gt;Thus in the next post we are going to discuss about the Loops.&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/S6DnVDpLc68" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/S6DnVDpLc68/loops.html</link><author>noreply@blogger.com (G.K.)</author><thr:total>0</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2008/09/loops.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-2554167242612642899</guid><pubDate>Fri, 22 Aug 2008 10:18:00 +0000</pubDate><atom:updated>2008-08-22T15:51:47.975+05:30</atom:updated><title>Forms of IF statement</title><description>&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;b&gt;&lt;span style="font-size: 14pt; font-family: &amp;quot;TimesNewRomanPS-BoldMT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Forms of &lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;u&gt;&lt;span style="font-size: 14pt; font-family: &amp;quot;TimesNewRomanPS-BoldItalicMT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;IF &lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="font-size: 14pt; font-family: &amp;quot;TimesNewRomanPS-BoldItalicMT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Statement:&lt;i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The &lt;span style="font-family: &amp;quot;TimesNewRomanPS-BoldMT&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;if&lt;b&gt; &lt;/b&gt;&lt;/span&gt;statement can take any of the given forms:&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;(1) if ( condition )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;do this ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;(2) if ( condition )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;do this ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;and this ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;(3) if ( condition )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;do this ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;do this ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;(4) if ( condition )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;do this ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;and this ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;do this ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;and this ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;(5) if ( condition )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;do this ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;if ( condition )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;do this ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;do this ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;and this ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;}&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;(6) if ( condition )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;if ( condition )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;do this ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;do this ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;and this ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;do this ;&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Arial Narrow&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/ZU2bqyT-O3E" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/ZU2bqyT-O3E/forms-of-if-statement.html</link><author>noreply@blogger.com (G.K.)</author><thr:total>0</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2008/08/forms-of-if-statement.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-2062339855801193368</guid><pubDate>Sat, 07 Jun 2008 07:52:00 +0000</pubDate><atom:updated>2008-06-09T06:38:15.836+05:30</atom:updated><title>The if-else Statement</title><description>&lt;div style="text-align: center;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;The if-else Statement&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;         As described in earlier post,the if statement will execute a single statement, or a group of statements, when the expression following if evaluates to true.But it does nothing when the expression evaluates to false.&lt;br /&gt;In case, we want to execute one group of statements if the expression evaluates to true and another group of &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;statements if the expression evaluates to false,we need to use the If-else statement.&lt;br /&gt;The syntax of If-else statement is as follows;&lt;br /&gt;if(condition)&lt;br /&gt;{&lt;br /&gt;     &lt;br /&gt;       statement;&lt;br /&gt;    &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size:100%;"&gt;else&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;    statement2;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;If the condition 1 is evaluated true,then statement1 will execute else statement2  will be executed.&lt;br /&gt;A simple example is;&lt;br /&gt;&lt;br /&gt;if(a&lt;b) a="" else="" b="" is="" small="" lets="" clear="" this="" concept="" with="" following="" program="" to="" calculate="" calculation="" of="" net="" int="" float="" hra="" printf="" enter="" salary="" scanf="" d="" if="" basic=""&gt;=2500 )&lt;br /&gt;{&lt;br /&gt;hra = 1200;&lt;br /&gt;da = basic * 0.5 ;pt=150;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;hra = basic*0.1 ;&lt;br /&gt;da = basic * 25.01 / 100 ;&lt;br /&gt;}&lt;br /&gt;gs = basic + hra + da ;&lt;br /&gt;net=gs-pt;&lt;br /&gt;printf ( "Net salary = Rs. %f", net ) ;&lt;br /&gt;}&lt;br /&gt;&lt;/b)&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/jDUzNV4FMWg" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/jDUzNV4FMWg/if-else-statement.html</link><author>noreply@blogger.com (G.K.)</author><thr:total>0</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2008/06/if-else-statement.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-3154608712104976247</guid><pubDate>Sun, 01 Jun 2008 21:16:00 +0000</pubDate><atom:updated>2008-06-02T16:50:26.156+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Decision Control Structure</category><title>The IF statement</title><description>&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;" align="center"&gt;The IF statement&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The C language uses the keyword if to implement the decision control instruction.&lt;br /&gt;The general form of IF statement is as follows;&lt;br /&gt;if ( condition )&lt;br /&gt;execute this statement ;&lt;br /&gt;&lt;br /&gt;The condition following the keyword if is always enclosed within a pair of parentheses. If the condition is true then the given statement is executed.If the condition is not true then the statement is not executed; instead the program skips past it. To express conditions in C we use conditional operators.&lt;br /&gt;&lt;table style="width: 315px; height: 404px;" border="2"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;Expression&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Meaning&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;x == y&lt;/td&gt;&lt;br /&gt;&lt;td&gt;x is equal to y&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;x != y&lt;/td&gt;&lt;br /&gt;&lt;td&gt;x is not equal to y&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;x &lt;&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;x is less than y&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;x &gt; y&lt;/td&gt;&lt;br /&gt;&lt;td&gt;x is greater than y&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;x &lt;= y&lt;/td&gt;&lt;br /&gt;&lt;td&gt;x is less than or equal to y&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;x &gt;= y&lt;/td&gt;&lt;br /&gt;&lt;td&gt;x is greater than or equal to y&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Lets consider a sample program;&lt;br /&gt;&lt;br /&gt;/* The IF statement */&lt;br /&gt;main( )&lt;br /&gt;{&lt;br /&gt;int num ;&lt;br /&gt;printf ( "Enter a number less than 50 " ) ;&lt;br /&gt;scanf ( "%d", &amp;amp;num ) ;&lt;br /&gt;if ( num &lt;= 50 )&lt;br /&gt;printf ( "You are fail" ) ;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;On execution,if you enter a number less than equal to 50 you will get the message on the screen but if the number if greater than 50 you wont get any output.&lt;br /&gt;There may be more than one IF statement in a program as per requiremant.&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/abdDYy0KLRk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/abdDYy0KLRk/if-statement.html</link><author>noreply@blogger.com (G.K.)</author><thr:total>0</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2008/06/if-statement.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-1381569627781384416</guid><pubDate>Sat, 31 May 2008 18:35:00 +0000</pubDate><atom:updated>2008-06-01T00:11:24.424+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Decision Control Structure</category><title>Decision Control Structure</title><description>&lt;span style="font-weight:bold;"&gt;The Decision Control Structure&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Till now we have used sequence control structure in the programs,in which the various steps are executed sequentially i.e.in the same order in which they appear in the program.&lt;br /&gt;In C programing the instructions are executed sequentially,by default.&lt;br /&gt;At times,we need a set of instructions to be executed in one situation and an another set of instructions to be executed in another situation.&lt;br /&gt;In such cases we have to use decision control instructions.This can be acheived in C using; &lt;br /&gt;&lt;br /&gt;(a)The if statement &lt;br /&gt;(b)The if-else statement&lt;br /&gt;(c)The conditional operators&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/R2S5OL_TbdY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/R2S5OL_TbdY/decision-control-structure.html</link><author>noreply@blogger.com (G.K.)</author><thr:total>0</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2008/05/decision-control-structure.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-6792775081529661499</guid><pubDate>Thu, 22 May 2008 01:15:00 +0000</pubDate><atom:updated>2010-08-11T02:26:24.653+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Hierarchy of Operations</category><title>Hierarchy of Operations</title><description>The preference in which arithematic operations are performed in an arithematic expression is called as Hierarchy of operations.&lt;br /&gt;
Its very important in C Programming to predefine the Hierarchy of operations to the C compiler in order to solve the given arithematic expression correctly.&lt;br /&gt;
e.g.: If a programmer wishes to perform ,z=a+b/c;it may be interpretted as z=(a+b)/c or z=a+(b/c).&lt;br /&gt;
and if a=3,b=6,c=2 then using the same expression we will obtain two different answwers as z=4.5 or z=6.&lt;br /&gt;
To avoid this condition we must be aware of hierarchy of operations used in C programming.&lt;br /&gt;
In arithematic expressions scanning is always done from left to right.&lt;br /&gt;
The priority of operations is as shown below,&lt;br /&gt;
&lt;table border="2"&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td&gt;&lt;span style="font-weight: bold;"&gt;Priority&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span style="font-weight: bold;"&gt;Operators&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;First&lt;/td&gt; &lt;td&gt;Paranthesis os brackets()&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;Second&lt;/td&gt; &lt;td&gt;Multiplication &amp;amp; Divison&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;Third&lt;/td&gt; &lt;td&gt;Addition &amp;amp; Substraction&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;Fourth&lt;/td&gt; &lt;td&gt;Assignment i.e.= &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
If we consider the logical operators used in C language,the operator precedence will be like;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table border="2"&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td&gt;&lt;span style="font-weight: bold;"&gt;Operators&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span style="font-weight: bold;"&gt;Type&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;!&lt;/td&gt; &lt;td&gt;Logical NOT&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;* / %&lt;/td&gt; &lt;td&gt;Arithmetic and moulus&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;+ -&lt;/td&gt; &lt;td&gt;Aritmetic&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;Relational&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;== !=&lt;/td&gt;&lt;td&gt;Relational&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&amp;amp;&amp;amp;&lt;/td&gt;&lt;td&gt;Logical AND&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;||&lt;/td&gt;&lt;td&gt;Logical OR&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;=&lt;/td&gt;&lt;td&gt;Assignment&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
In the tables above,the higher the position of an operator,higher is its priority.&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/e0CTrd-mGis" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/e0CTrd-mGis/hierarchy-of-operations.html</link><author>noreply@blogger.com (G.K.)</author><thr:total>1</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2008/05/hierarchy-of-operations.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-1449885270353365678</guid><pubDate>Sun, 18 May 2008 06:01:00 +0000</pubDate><atom:updated>2008-05-22T07:37:45.794+05:30</atom:updated><title>Increment-Decrement Operators</title><description>&lt;span style="font-weight:bold;"&gt;PRE/POST INCREMENT/DECREMENT OPERATORS(Unary operators)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;          In programming we often require to increment value of certain variable in step of one or may require to decrement a value.&lt;br /&gt;This is usually written as i=i+1 for incrementing the value of variable i or i=i-1 to decrement the value of i.&lt;br /&gt;To accomplish this C language provides unary operators called as increment/decrement operators.Using these operators the above variable can be written as i++ or ++i.&lt;br /&gt;If ++ is after the variable then it is called as post increment and if it is before the variable then it is called as predecrement.&lt;br /&gt;In case of post increment(i++) the old value of the variable is used first and then the increment in the value of variable is done.&lt;br /&gt;In preincrement the value of variable is incremented first and then this value is used in the expression.&lt;br /&gt;same is in the case of decrement,i.e.pre decremant and post decrement,&lt;br /&gt;denoted as --i and i--.&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/ucD_ksV3DLs" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/ucD_ksV3DLs/increment-decrement-operators.html</link><author>noreply@blogger.com (G.K.)</author><thr:total>0</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2008/05/increment-decrement-operators.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6728322920546330050.post-4925283364953528588</guid><pubDate>Sat, 17 May 2008 11:22:00 +0000</pubDate><atom:updated>2008-05-18T19:53:28.336+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Using symbolic Constants(#define)</category><title>Using symbolic Constants(#define)</title><description>&lt;center&gt;&lt;span style="font-weight:bold;"&gt;Using Symbolic constants(#define)&lt;/span&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;   While developing a program in C language,we often use certain unique constants in a program.These const. may appear repeatedly in a C program,at number of places.&lt;br /&gt;Foe example,if we want to calculate the area of n number of circles,we require a constant 3.14 which is the value of'pi'.&lt;br /&gt;    Now we may like to change the value of pi from 3.14 to 3.14159.To achieve this we will have to search through-out the program and explicitly change the value of pi whereever it has been used.If any value is left unchanged the program will produce wrong results.When we use variable ,value may change accidently,which results to wrong output.&lt;br /&gt;   To avoid these type of mistakes w use symbolic constants in our C program.&lt;br /&gt;the syntax of a symbolic constant is;&lt;br /&gt;             &lt;br /&gt;            #define &lt;span style="font-style:italic;"&gt;symbolic name value&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;e.g.&lt;br /&gt;   #define pi 3.14159&lt;br /&gt;   #define total 100&lt;div class="blogger-post-footer"&gt;C programming tutorials for beginners&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cprogrammingtuts/~4/vTxR-0TJP80" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/cprogrammingtuts/~3/vTxR-0TJP80/using-define.html</link><author>noreply@blogger.com (G.K.)</author><thr:total>0</thr:total><feedburner:origLink>http://beginnersc.blogspot.com/2008/05/using-define.html</feedburner:origLink></item><language>en-us</language><media:rating>nonadult</media:rating></channel></rss>
