<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Technotip.com</title>
	<atom:link href="http://technotip.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://technotip.com</link>
	<description>Code is poetry!</description>
	<lastBuildDate>Sat, 04 Feb 2012 07:47:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Reverse Given Number And Check For Palindrome: C++</title>
		<link>http://technotip.com/1341/reverse-given-number-check-palindrome-cpp/</link>
		<comments>http://technotip.com/1341/reverse-given-number-check-palindrome-cpp/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 14:53:17 +0000</pubDate>
		<dc:creator>Satish</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[palindrome]]></category>
		<category><![CDATA[program]]></category>
		<category><![CDATA[reverse]]></category>

		<guid isPermaLink="false">http://technotip.com/?p=1341</guid>
		<description><![CDATA[Cpp program to read a number, reverse the given number and check whether it is palindrome or not. Full Source code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 #include&#60; iostream .h&#62; #include&#60; conio [...]
Related posts:<ol>
<li><a href='http://technotip.com/1277/array-basic-in-cpp-find-sum/' rel='bookmark' title='Array Basics in C++ : Find Sum'>Array Basics in C++ : Find Sum</a></li>
<li><a href='http://technotip.com/1266/find-the-factorial-of-a-number-cpp/' rel='bookmark' title='Find the Factorial of a Number: C++'>Find the Factorial of a Number: C++</a></li>
<li><a href='http://technotip.com/1200/addition-of-2-numbers-cpp/' rel='bookmark' title='Addition of 2 Numbers: C++'>Addition of 2 Numbers: C++</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Cpp program to read a number, reverse the given number and check whether it is palindrome or not.</p>
<p><b>Full Source code</b></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">#include&lt; iostream .h&gt;
#include&lt; conio .h&gt;
&nbsp;
void main()
{
  int num, rem, sum = 0, temp;
  clrscr();
&nbsp;
  cout&lt; &lt;&quot;Enter a number\n&quot;;
  cin&gt;&gt;num;
&nbsp;
  temp = num;
&nbsp;
  while( num )
  {
    rem = num % 10;
    num = num / 10;
    sum = sum * 10 + rem;
  }
&nbsp;
cout&lt; &lt;&quot;\nReversed Number: &quot;&lt;&lt;sum&lt;&lt;endl;
&nbsp;
  if( temp == sum )
   cout&lt;&lt;temp&lt;&lt;&quot; is a palindrome&quot;;
  else
   cout&lt;&lt;temp&lt;&lt;&quot; in NOT a palindrome&quot;;
&nbsp;
  getch();
}</pre></td></tr></table></div>

<p>In this program we assign variable sum = 0 to avoid garbage values in sum before the calculation, which would result in wrong output.<br />
We store the user entered value in temp, so that we can compare it with the final result, to determine whether the given number is palindrome or not.
</pre>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="language" style="font-family:monospace;"> while( num )
  {
    rem = num % 10;
    num = num / 10;
    sum = sum * 10 + rem;
  }</pre></td></tr></table></div>

<p>Here the loop executes until the value of num is zero.</p>
<p>If user enters 301, we apply the modulus to get the individual values.<br />
Ex:<br />
301 % 10 = 1<br />
30  % 10 = 0<br />
3   % 10 = 3</p>
<p>We get 301, 30 and 3 by dividing the original value by 10.<br />
Ex:<br />
301 user entered value.<br />
301 / 10 = 30<br />
30  / 10 = 3</p>
<p>Now the sum. </p>
<p>sum = sum * 10 + rem;</p>
<p>1   = 0 * 10 + 1<br />
10   = 1 * 10 + 0<br />
103  = 10 * 10 + 3</p>
<p>So the reverse of 301 is 103, which is not a palindrome.</p>
<p><b>Video Tutorial: Reverse Given Number And Check For Palindrome: C++</b><br />
<center><br />
<a href="http://technotip.com/1341/reverse-given-number-check-palindrome-cpp/"><img src="http://img.youtube.com/vi/j8Vv4wgdwoA/default.jpg" width="130" height="97" border title="Reverse Given Number And Check For Palindrome: C++" alt="default Reverse Given Number And Check For Palindrome: C++" /></a><br />
</center></p>
<div style="font-size: small;">YouTube Link: <a href="http://www.youtube.com/watch?v=j8Vv4wgdwoA&#038;fmt=22">http://www.youtube.com/watch?v=j8Vv4wgdwoA</a> [Watch the Video In Full Screen.]</div>
<p><br style="clear: both;" /><br />
</p>
<p><b>Output:</b><br />
Enter a number<br />
301<br />
Reversed Number: 103<br />
301 in NOT a palindrome</p>
<p>Related posts:<ol>
<li><a href='http://technotip.com/1277/array-basic-in-cpp-find-sum/' rel='bookmark' title='Array Basics in C++ : Find Sum'>Array Basics in C++ : Find Sum</a></li>
<li><a href='http://technotip.com/1266/find-the-factorial-of-a-number-cpp/' rel='bookmark' title='Find the Factorial of a Number: C++'>Find the Factorial of a Number: C++</a></li>
<li><a href='http://technotip.com/1200/addition-of-2-numbers-cpp/' rel='bookmark' title='Addition of 2 Numbers: C++'>Addition of 2 Numbers: C++</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://technotip.com/1341/reverse-given-number-check-palindrome-cpp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Array Basics in C++ : Find Sum</title>
		<link>http://technotip.com/1277/array-basic-in-cpp-find-sum/</link>
		<comments>http://technotip.com/1277/array-basic-in-cpp-find-sum/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 13:15:25 +0000</pubDate>
		<dc:creator>Satish</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[declaration]]></category>
		<category><![CDATA[initialization]]></category>
		<category><![CDATA[sum]]></category>

		<guid isPermaLink="false">http://technotip.com/?p=1277</guid>
		<description><![CDATA[Video tutorial to show the basic use of arrays: Initialization, Declaration, Getting values from the users, finding sum of all the array elements etc. Array is a collection of homogeneous data items. Full Source Code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [...]
Related posts:<ol>
<li><a href='http://technotip.com/1200/addition-of-2-numbers-cpp/' rel='bookmark' title='Addition of 2 Numbers: C++'>Addition of 2 Numbers: C++</a></li>
<li><a href='http://technotip.com/1238/biggest-of-3-numbers-cpp/' rel='bookmark' title='Find Biggest of 3 Numbers: C++'>Find Biggest of 3 Numbers: C++</a></li>
<li><a href='http://technotip.com/1266/find-the-factorial-of-a-number-cpp/' rel='bookmark' title='Find the Factorial of a Number: C++'>Find the Factorial of a Number: C++</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Video tutorial to show the basic use of arrays: Initialization, Declaration, Getting values from the users, finding sum of all the array elements etc.</p>
<p>Array is a collection of homogeneous data items.</p>
<p><b>Full Source Code</b></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">#include&lt;iostream .h&gt;
#include&lt;conio .h&gt;
&nbsp;
void main()
{
  //  int a[5] = { 1, 3, 2, 4, 5 }; declaration with initialization
&nbsp;
  int a[5], sum = 0;
  clrscr();
&nbsp;
  cout&lt; &lt;&quot;Enter 5 numbers\n&quot;;
  for(int i=0; i&amp;lt;5; i++)
   cin&gt;&gt;a[i];
&nbsp;
  cout&lt; &lt;&quot;Input array is..\n&quot;;
  for(i=0; i&amp;lt;5; i++)
  {
   cout&lt;&lt;a[i]&lt;&lt;endl;
   sum = sum + a[i];  // sum += a[i];
  }
  cout&lt;&lt;&quot;Sum of array elements: &quot;&lt;&lt;sum;
&nbsp;
  getch();
&nbsp;
}</pre></td></tr></table></div>

<p>In this program we take input from the user and display the user entered numbers and find the sum of all the array elements and display it as well.</p>
<p>Elements are stored from the index number 0. i.e., if the array size is 5, the values will be stored in a[0], a[1], a[2], a[3], a[4];</p>
<p>Ex:<br />
 int a[5] = { 1, 3, 2, 4, 5 }; declaration with initialization<br />
 float a[5] = { 1.1, 2.0, 3.3, 1.3, 5.6 };</p>
<p><b>Video Tutorial: Array Basics in C++ : Find Sum </b><br />
<center><br />
<a href="http://technotip.com/1277/array-basic-in-cpp-find-sum/"><img src="http://img.youtube.com/vi/BfAa2koJv64/default.jpg" width="130" height="97" border title="Array Basics in C++ : Find Sum" alt="default Array Basics in C++ : Find Sum" /></a><br />
</center></p>
<div style="font-size: small;">YouTube Link: <a href="http://www.youtube.com/watch?v=BfAa2koJv64&#038;fmt=22">http://www.youtube.com/watch?v=BfAa2koJv64</a> [Watch the Video In Full Screen.]</div>
<p><br style="clear: both;" /><br />
</p>
<p><b>Output:</b><br />
Enter 5 numbers<br />
1<br />
2<br />
3<br />
4<br />
5<br />
Input array is..<br />
1<br />
2<br />
3<br />
4<br />
5<br />
Sum of array elements: 15</conio></iostream></pre>
<p>Related posts:<ol>
<li><a href='http://technotip.com/1200/addition-of-2-numbers-cpp/' rel='bookmark' title='Addition of 2 Numbers: C++'>Addition of 2 Numbers: C++</a></li>
<li><a href='http://technotip.com/1238/biggest-of-3-numbers-cpp/' rel='bookmark' title='Find Biggest of 3 Numbers: C++'>Find Biggest of 3 Numbers: C++</a></li>
<li><a href='http://technotip.com/1266/find-the-factorial-of-a-number-cpp/' rel='bookmark' title='Find the Factorial of a Number: C++'>Find the Factorial of a Number: C++</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://technotip.com/1277/array-basic-in-cpp-find-sum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find the Factorial of a Number: C++</title>
		<link>http://technotip.com/1266/find-the-factorial-of-a-number-cpp/</link>
		<comments>http://technotip.com/1266/find-the-factorial-of-a-number-cpp/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 06:10:39 +0000</pubDate>
		<dc:creator>Satish</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[fact]]></category>
		<category><![CDATA[factorial]]></category>

		<guid isPermaLink="false">http://technotip.com/?p=1266</guid>
		<description><![CDATA[Video tutorial to find the factorial of a number: if the user enters 3, then the factorial is 1 * 2 * 3 i.e., factorial = 6 This logic must be handled with a c++ program. Full Source Code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 [...]
Related posts:<ol>
<li><a href='http://technotip.com/1238/biggest-of-3-numbers-cpp/' rel='bookmark' title='Find Biggest of 3 Numbers: C++'>Find Biggest of 3 Numbers: C++</a></li>
<li><a href='http://technotip.com/1206/find-biggest-of-2-numbers-cpp/' rel='bookmark' title='Find Biggest of 2 Numbers: C++'>Find Biggest of 2 Numbers: C++</a></li>
<li><a href='http://technotip.com/1200/addition-of-2-numbers-cpp/' rel='bookmark' title='Addition of 2 Numbers: C++'>Addition of 2 Numbers: C++</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Video tutorial to find the factorial of a number: if the user enters 3, then the factorial is 1 * 2 * 3 i.e., factorial = 6<br />
This logic must be handled with a c++ program.</p>
<p><b>Full Source Code</b></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">#include&lt;iostream .h&gt;
#include&lt;conio .h&gt;
&nbsp;
void main()
{
  int fact = 1, N;
  clrscr();
&nbsp;
  cout&lt; &lt;endl&lt;&lt;&quot;Enter a number\n&quot;;
  cin&gt;&gt;N;
&nbsp;
  for( int i=1; i&lt; =N; i++ )
   fact = fact * i;  // OR fact *= i;
&nbsp;
  cout&lt;&lt;endl&lt;&lt;endl&lt;&lt;&quot;Factorial of &quot;&lt;&lt;N&lt;&lt;&quot; is &quot;&lt;&lt;fact;
&nbsp;
  getch();
}</pre></td></tr></table></div>

<p>Here the for loop stars from 1 and not 0. As anything multiplied by 0 would also be zero.</p>
<p><center><img width="483" height="534" src="http://technotip.com/wp-content/uploads/cpp/factorial-cpp.png" alt="factorial cpp Find the Factorial of a Number: C++"  title="Find the Factorial of a Number: C++" /></center></p>
<p><br style="clear: both;" /></p>
<p>
fact *= i; is the compact representation of fact = fact * i;
</p>
<p><b>Video Tutorial: Factorial in cpp</b><br />
<center><br />
<a href="http://technotip.com/1266/find-the-factorial-of-a-number-cpp/"><img src="http://img.youtube.com/vi/ovrdIQZ6Hu8/default.jpg" width="130" height="97" border title="Find the Factorial of a Number: C++" alt="default Find the Factorial of a Number: C++" /></a><br />
</center></p>
<div style="font-size: small;">YouTube Link: <a href="http://www.youtube.com/watch?v=ovrdIQZ6Hu8&#038;fmt=22">http://www.youtube.com/watch?v=ovrdIQZ6Hu8</a> [Watch the Video In Full Screen.]</div>
<p><br style="clear: both;" /><br />
</p>
<p><b>Output:</b><br />
Enter a number<br />
5<br />
Factorial of 5 is 120</conio></iostream></pre>
<p>Related posts:<ol>
<li><a href='http://technotip.com/1238/biggest-of-3-numbers-cpp/' rel='bookmark' title='Find Biggest of 3 Numbers: C++'>Find Biggest of 3 Numbers: C++</a></li>
<li><a href='http://technotip.com/1206/find-biggest-of-2-numbers-cpp/' rel='bookmark' title='Find Biggest of 2 Numbers: C++'>Find Biggest of 2 Numbers: C++</a></li>
<li><a href='http://technotip.com/1200/addition-of-2-numbers-cpp/' rel='bookmark' title='Addition of 2 Numbers: C++'>Addition of 2 Numbers: C++</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://technotip.com/1266/find-the-factorial-of-a-number-cpp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Biggest of 3 Numbers Using Ternary Operator: C++</title>
		<link>http://technotip.com/1239/biggest-of-3-numbers-using-ternary-operator-cpp/</link>
		<comments>http://technotip.com/1239/biggest-of-3-numbers-using-ternary-operator-cpp/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 06:31:24 +0000</pubDate>
		<dc:creator>Satish</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[else if]]></category>
		<category><![CDATA[if else]]></category>
		<category><![CDATA[ternary operator]]></category>

		<guid isPermaLink="false">http://technotip.com/?p=1239</guid>
		<description><![CDATA[Video tutorial to find the biggest of the three integer numbers in C++, using if-else control statements and Ternary Operator. Before watching this video, please make sure to watch and understand this short video: Find Biggest of 3 Numbers: C++ Full Source Code 1 2 3 4 5 6 7 8 9 10 11 12 [...]
Related posts:<ol>
<li><a href='http://technotip.com/1217/biggest-of-two-numbers-using-ternary-operator-cpp/' rel='bookmark' title='Biggest of Two Numbers Using Ternary Operator: C++'>Biggest of Two Numbers Using Ternary Operator: C++</a></li>
<li><a href='http://technotip.com/1238/biggest-of-3-numbers-cpp/' rel='bookmark' title='Find Biggest of 3 Numbers: C++'>Find Biggest of 3 Numbers: C++</a></li>
<li><a href='http://technotip.com/1206/find-biggest-of-2-numbers-cpp/' rel='bookmark' title='Find Biggest of 2 Numbers: C++'>Find Biggest of 2 Numbers: C++</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Video tutorial to find the biggest of the three integer numbers in C++, using if-else control statements and Ternary Operator.</p>
<p>Before watching this video, please make sure to watch and understand this short video: <a href="http://technotip.com/1238/biggest-of-3-numbers-cpp/" title="Biggest of 3 Numbers">Find Biggest of 3 Numbers: C++</a></p>
<p><b>Full Source Code</b></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">#include&lt;iostream .h&gt;
#include&lt;conio .h&gt;
&nbsp;
void main()
{
	int a, b, c;
	clrscr();
&nbsp;
	cout&lt; &lt;&quot;Enter 3 no's\n&quot;;
	cin&gt;&gt;a&gt;&gt;b&gt;&gt;c;
&nbsp;
	int big =  ( a&gt;b &amp;&amp; a&gt;c )?a:(b&gt;c?b:c);
	/*
	if( a &gt; b &amp;&amp; a &gt; c )
	  big = a;
	else if( b &gt; c )
	  big = b;
	else
	  big = c;
	*/
	cout&lt; &lt;&quot;\nAmong &quot;&lt;&lt;a&lt;&lt;&quot; , &quot;&lt;&lt;b&lt;&lt;&quot; , &quot;&lt;&lt;c&lt;&lt;&quot; Biggest is &quot;&lt;&lt;big;
	getch();
}</pre></td></tr></table></div>

<p>In this program we take 3 integer values from the user and using ternary operator decide the biggest of 3 numbers.</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">	int big =  ( a&gt;b &amp;&amp; a&gt;c )?a:(b&gt;c?b:c);</pre></div></div>

<p>if <strong>( a > b &#038;&#038; a > c )</strong> is true, then value of <strong>a</strong> will be stored in variable <strong>big</strong>; else <strong>( b > c ? b : c )</strong> will be evaluated. Here, if value of <strong>b</strong> is greater than <strong>c</strong>, value of <strong>b</strong> will be stored in variable <strong>big</strong> else value of <strong>c</strong> will be stored in the variable <strong>big</strong>.</p>
<p><b>Video Tutorial: Biggest of 3 Integer Numbers</b><br />
<center><br />
<a href="http://technotip.com/1239/biggest-of-3-numbers-using-ternary-operator-cpp/"><img src="http://img.youtube.com/vi/gfmqT4PwfY0/default.jpg" width="130" height="97" border title="Biggest of 3 Numbers Using Ternary Operator: C++" alt="default Biggest of 3 Numbers Using Ternary Operator: C++" /></a><br />
</center></p>
<div style="font-size: small;">YouTube Link: <a href="http://www.youtube.com/watch?v=gfmqT4PwfY0&#038;fmt=22">http://www.youtube.com/watch?v=gfmqT4PwfY0</a> [Watch the Video In Full Screen.]</div>
<p><br style="clear: both;" /><br />
</p>
<p><b>Output</b><br />
Enter 3 no&#8217;s<br />
10<br />
20<br />
30<br />
Among 10, 20, 30 Biggest is 30</conio></iostream></pre>
<p>Related posts:<ol>
<li><a href='http://technotip.com/1217/biggest-of-two-numbers-using-ternary-operator-cpp/' rel='bookmark' title='Biggest of Two Numbers Using Ternary Operator: C++'>Biggest of Two Numbers Using Ternary Operator: C++</a></li>
<li><a href='http://technotip.com/1238/biggest-of-3-numbers-cpp/' rel='bookmark' title='Find Biggest of 3 Numbers: C++'>Find Biggest of 3 Numbers: C++</a></li>
<li><a href='http://technotip.com/1206/find-biggest-of-2-numbers-cpp/' rel='bookmark' title='Find Biggest of 2 Numbers: C++'>Find Biggest of 2 Numbers: C++</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://technotip.com/1239/biggest-of-3-numbers-using-ternary-operator-cpp/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Find Biggest of 3 Numbers: C++</title>
		<link>http://technotip.com/1238/biggest-of-3-numbers-cpp/</link>
		<comments>http://technotip.com/1238/biggest-of-3-numbers-cpp/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 07:06:29 +0000</pubDate>
		<dc:creator>Satish</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[biggest of 3]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[if else]]></category>

		<guid isPermaLink="false">http://technotip.com/?p=1238</guid>
		<description><![CDATA[Video tutorial to find the biggest of the three integer numbers in C++, using if-else control statements. Full Source Code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 #include&#60;iostream .h&#62; #include&#60;conio .h&#62; &#160; void main() { int a, [...]
Related posts:<ol>
<li><a href='http://technotip.com/1206/find-biggest-of-2-numbers-cpp/' rel='bookmark' title='Find Biggest of 2 Numbers: C++'>Find Biggest of 2 Numbers: C++</a></li>
<li><a href='http://technotip.com/1217/biggest-of-two-numbers-using-ternary-operator-cpp/' rel='bookmark' title='Biggest of Two Numbers Using Ternary Operator: C++'>Biggest of Two Numbers Using Ternary Operator: C++</a></li>
<li><a href='http://technotip.com/1200/addition-of-2-numbers-cpp/' rel='bookmark' title='Addition of 2 Numbers: C++'>Addition of 2 Numbers: C++</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Video tutorial to find the biggest of the three integer numbers in C++, using if-else control statements.</p>
<p><b>Full Source Code</b></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">#include&lt;iostream .h&gt;
#include&lt;conio .h&gt;
&nbsp;
void main()
{
	int a, b, c;
	clrscr();
&nbsp;
	cout&lt; &lt;&quot;Enter 3 no\n&quot;;
	cin&gt;&gt;a&gt;&gt;b&gt;&gt;c;
&nbsp;
	int big;
&nbsp;
	if( a &gt; b )
	 big = a;
	else
	{
	 if( b &gt; c )
	  big = b;
	 else
	  big = c;
	}
	cout&lt; &lt;&quot;\nBiggest is: &quot;&lt;&lt;big;
	getch();
}</pre></td></tr></table></div>

<p>In this program we get three integer variables from the user.<br />
If value of variable <strong>a</strong> is bigger, then we store it inside the variable <strong>big</strong>; else we compare <strong>b</strong> with <strong>c</strong>. Now will store the biggest number inside the variable <strong>big</strong>.<br />
<b>Video Tutorial: Biggest of 3 Integer Numbers</b><br />
<center><br />
<a href="http://technotip.com/1238/biggest-of-3-numbers-cpp/"><img src="http://img.youtube.com/vi/YRkCpS_GMFw/default.jpg" width="130" height="97" border title="Find Biggest of 3 Numbers: C++" alt="default Find Biggest of 3 Numbers: C++" /></a><br />
</center></p>
<div style="font-size: small;">YouTube Link: <a href="http://www.youtube.com/watch?v=YRkCpS_GMFw&#038;fmt=22">http://www.youtube.com/watch?v=YRkCpS_GMFw</a> [Watch the Video In Full Screen.]</div>
<p><br style="clear: both;" /><br />
</p>
<p><b>Output</b><br />
Enter 3 no&#8217;s<br />
404<br />
501<br />
301<br />
Biggest is: 501</conio></iostream></pre>
<p>Related posts:<ol>
<li><a href='http://technotip.com/1206/find-biggest-of-2-numbers-cpp/' rel='bookmark' title='Find Biggest of 2 Numbers: C++'>Find Biggest of 2 Numbers: C++</a></li>
<li><a href='http://technotip.com/1217/biggest-of-two-numbers-using-ternary-operator-cpp/' rel='bookmark' title='Biggest of Two Numbers Using Ternary Operator: C++'>Biggest of Two Numbers Using Ternary Operator: C++</a></li>
<li><a href='http://technotip.com/1200/addition-of-2-numbers-cpp/' rel='bookmark' title='Addition of 2 Numbers: C++'>Addition of 2 Numbers: C++</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://technotip.com/1238/biggest-of-3-numbers-cpp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Biggest of Two Numbers Using Ternary Operator: C++</title>
		<link>http://technotip.com/1217/biggest-of-two-numbers-using-ternary-operator-cpp/</link>
		<comments>http://technotip.com/1217/biggest-of-two-numbers-using-ternary-operator-cpp/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 11:53:19 +0000</pubDate>
		<dc:creator>Satish</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[biggest]]></category>
		<category><![CDATA[control statements]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[else if]]></category>
		<category><![CDATA[if else]]></category>
		<category><![CDATA[ternary operator]]></category>

		<guid isPermaLink="false">http://technotip.com/?p=1217</guid>
		<description><![CDATA[Video tutorial to find the biggest of the two integer numbers in C++, using Ternary Operator. To find biggest of Two numbers using if-else control structure: Find Biggest of 2 Numbers: C++ Full Source Code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [...]
Related posts:<ol>
<li><a href='http://technotip.com/1206/find-biggest-of-2-numbers-cpp/' rel='bookmark' title='Find Biggest of 2 Numbers: C++'>Find Biggest of 2 Numbers: C++</a></li>
<li><a href='http://technotip.com/1200/addition-of-2-numbers-cpp/' rel='bookmark' title='Addition of 2 Numbers: C++'>Addition of 2 Numbers: C++</a></li>
<li><a href='http://technotip.com/1053/object-oriented-programming-c/' rel='bookmark' title='Object Oriented Programming: C++'>Object Oriented Programming: C++</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Video tutorial to find the biggest of the two integer numbers in C++, using Ternary Operator.</p>
<p>To find biggest of Two numbers using if-else control structure: <a href="http://technotip.com/1206/find-biggest-of-2-numbers-cpp/" title="biggest of 2 numbers">Find Biggest of 2 Numbers: C++</a></p>
<p><b>Full Source Code</b></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">#include&lt;iostream .h&gt;
#include&lt;conio .h&gt;
&nbsp;
void main()
{
 int a, b;
 clrscr();
&nbsp;
 cout&lt; &lt;&quot;Enter 2 numbers\n&quot;;
 cin&gt;&gt;a&gt;&gt;b;
&nbsp;
 int big;
&nbsp;
 big = a &gt; b ? a : b;
&nbsp;
/*
 if( a &gt; b )
  big = a;
 else
  big = b;
*/
&nbsp;
 cout&lt; &lt;&quot;\nBig is: &quot;&lt;&lt;big;
&nbsp;
 getch();
}</pre></td></tr></table></div>

<p>In this program we take 2 integer values from the user and using ternary operator decide the biggest of 2 numbers.</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">	 big = a &gt; b ? a : b;</pre></div></div>

<p>if <strong>( a > b )</strong> is true, then value of <strong>a</strong> will be stored in variable <strong>big</strong>; else value of <strong>b</strong> will be stored in <strong>big</strong>.</p>
<p><strong>Video Tutorial: Biggest of 2 Integer Numbers Using Ternary Operator</strong><br />
<center><br />
<a href="http://technotip.com/1217/biggest-of-two-numbers-using-ternary-operator-cpp/"><img src="http://img.youtube.com/vi/ni2btFMBmlA/default.jpg" width="130" height="97" border title="Biggest of Two Numbers Using Ternary Operator: C++" alt="default Biggest of Two Numbers Using Ternary Operator: C++" /></a><br />
</center></p>
<div style="font-size: small;">YouTube Link: <a href="http://www.youtube.com/watch?v=ni2btFMBmlA&#038;fmt=22">http://www.youtube.com/watch?v=ni2btFMBmlA</a> [Watch the Video In Full Screen.]</div>
<p><br style="clear: both;" /><br />
<br />
<b>Output</b><br />
Enter 3 no&#8217;s<br />
404<br />
302<br />
Big is: 404</conio></iostream></pre>
<p>Related posts:<ol>
<li><a href='http://technotip.com/1206/find-biggest-of-2-numbers-cpp/' rel='bookmark' title='Find Biggest of 2 Numbers: C++'>Find Biggest of 2 Numbers: C++</a></li>
<li><a href='http://technotip.com/1200/addition-of-2-numbers-cpp/' rel='bookmark' title='Addition of 2 Numbers: C++'>Addition of 2 Numbers: C++</a></li>
<li><a href='http://technotip.com/1053/object-oriented-programming-c/' rel='bookmark' title='Object Oriented Programming: C++'>Object Oriented Programming: C++</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://technotip.com/1217/biggest-of-two-numbers-using-ternary-operator-cpp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find Biggest of 2 Numbers: C++</title>
		<link>http://technotip.com/1206/find-biggest-of-2-numbers-cpp/</link>
		<comments>http://technotip.com/1206/find-biggest-of-2-numbers-cpp/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 13:25:13 +0000</pubDate>
		<dc:creator>Satish</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[cpp. biggest]]></category>
		<category><![CDATA[if else]]></category>

		<guid isPermaLink="false">http://technotip.com/?p=1206</guid>
		<description><![CDATA[Video tutorial to find the biggest of the two integer numbers in C++, using if-else control statements. Full Source Code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 #include&#60;iostream .h&#62; #include&#60;conio .h&#62; &#160; void main() { int a, b; clrscr(); &#160; [...]
Related posts:<ol>
<li><a href='http://technotip.com/1200/addition-of-2-numbers-cpp/' rel='bookmark' title='Addition of 2 Numbers: C++'>Addition of 2 Numbers: C++</a></li>
<li><a href='http://technotip.com/1053/object-oriented-programming-c/' rel='bookmark' title='Object Oriented Programming: C++'>Object Oriented Programming: C++</a></li>
<li><a href='http://technotip.com/780/simple-interest-c-program/' rel='bookmark' title='Simple Interest: C Program'>Simple Interest: C Program</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Video tutorial to find the biggest of the two integer numbers in C++, using if-else control statements.</p>
<p><b>Full Source Code</b></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">#include&lt;iostream .h&gt;
#include&lt;conio .h&gt;
&nbsp;
void main()
{
	int a, b;
	clrscr();
&nbsp;
	cout&lt; &lt;&quot;Enter 2 numbers\n&quot;;
	cin&gt;&gt;a&gt;&gt;b;
&nbsp;
	int big;
&nbsp;
	if( a &gt; b )
	 big = a;
	else
	 big = b;
&nbsp;
	cout&lt; &lt;endl&lt;&lt;&quot;Among &quot;&lt;&lt;a&lt;&lt;&quot; and &quot;&lt;&lt;b&lt;&lt;&quot; biggest is &quot;&lt;&lt;big;
&nbsp;
	getch();
}</pre></td></tr></table></div>

<p>In this program we get two integer variables from the user.<br />
If value of variable <strong>a</strong> is bigger, then we store it inside the variable <strong>big</strong>; else we store the value of variable <strong>b</strong> inside variable <strong>big</strong>.<br />
Finally display the value of variable <strong>big</strong> which contains the biggest number amongst the two values entered by the user.</p>
<p><strong>Video Tutorial: Biggest of 2 Integer Numbers</strong><br />
<center><br />
<a href="http://technotip.com/1206/find-biggest-of-2-numbers-cpp/"><img src="http://img.youtube.com/vi/awbq2gsDg3E/default.jpg" width="130" height="97" border title="Find Biggest of 2 Numbers: C++" alt="default Find Biggest of 2 Numbers: C++" /></a><br />
</center></p>
<div style="font-size: small;">YouTube Link: <a href="http://www.youtube.com/watch?v=awbq2gsDg3E&#038;fmt=22">http://www.youtube.com/watch?v=awbq2gsDg3E</a> [Watch the Video In Full Screen.]</div>
<p><br style="clear: both;" /><br />
</p>
<p><b>Output</b><br />
Enter 2 numbers<br />
-100<br />
0<br />
Among -100 and 0 biggest is 0</conio></iostream></pre>
<p>Related posts:<ol>
<li><a href='http://technotip.com/1200/addition-of-2-numbers-cpp/' rel='bookmark' title='Addition of 2 Numbers: C++'>Addition of 2 Numbers: C++</a></li>
<li><a href='http://technotip.com/1053/object-oriented-programming-c/' rel='bookmark' title='Object Oriented Programming: C++'>Object Oriented Programming: C++</a></li>
<li><a href='http://technotip.com/780/simple-interest-c-program/' rel='bookmark' title='Simple Interest: C Program'>Simple Interest: C Program</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://technotip.com/1206/find-biggest-of-2-numbers-cpp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Addition of 2 Numbers: C++</title>
		<link>http://technotip.com/1200/addition-of-2-numbers-cpp/</link>
		<comments>http://technotip.com/1200/addition-of-2-numbers-cpp/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 17:35:47 +0000</pubDate>
		<dc:creator>Satish</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[addition]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[integer]]></category>

		<guid isPermaLink="false">http://technotip.com/?p=1200</guid>
		<description><![CDATA[This video tutorial illustrates a simple program of adding two integer numbers. Full Source Code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 #include&#60;iostream .h&#62; #include&#60;conio .h&#62; &#160; void main() { &#160; int a, b; clrscr(); &#160; cout&#60; &#60;&#34;Enter two no\n&#34;; cin&#62;&#62;a&#62;&#62;b; &#160; int [...]
Related posts:<ol>
<li><a href='http://technotip.com/673/using-constructors-member-function-to-add-two-numbers-java/' rel='bookmark' title='Using Constructors &amp; Member Function to add two numbers: Java'>Using Constructors &#038; Member Function to add two numbers: Java</a></li>
<li><a href='http://technotip.com/1053/object-oriented-programming-c/' rel='bookmark' title='Object Oriented Programming: C++'>Object Oriented Programming: C++</a></li>
<li><a href='http://technotip.com/780/simple-interest-c-program/' rel='bookmark' title='Simple Interest: C Program'>Simple Interest: C Program</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This video tutorial illustrates a simple program of adding two integer numbers.</p>
<p><b>Full Source Code</b></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">#include&lt;iostream .h&gt;
#include&lt;conio .h&gt;
&nbsp;
void main()
{
&nbsp;
 int a, b;
 clrscr();
&nbsp;
 cout&lt; &lt;&quot;Enter two no\n&quot;;
 cin&gt;&gt;a&gt;&gt;b;
&nbsp;
 int sum = a + b;
&nbsp;
 cout&lt; &lt;endl&lt;&lt;&quot;Sum is: &quot;&lt;&lt;sum;
&nbsp;
 getch();
&nbsp;
}</pre></td></tr></table></div>

<p>We can declare variables anywhere in a cpp program.</p>
<p><strong>Video Tutorial: Addition of 2 Integer Numbers</strong><br />
<center><br />
<a href="http://technotip.com/1200/addition-of-2-numbers-cpp/"><img src="http://img.youtube.com/vi/GBbOJZLkBBA&#038;ap=%2526fmt%3D22/default.jpg" width="130" height="97" border title="Addition of 2 Numbers: C++" alt="default Addition of 2 Numbers: C++" /></a><br />
</center></p>
<div style="font-size: small;">YouTube Link: <a href="http://www.youtube.com/watch?v=GBbOJZLkBBA&#038;fmt=22">http://www.youtube.com/watch?v=GBbOJZLkBBA</a> [Watch the Video In Full Screen.]</div>
<p><br style="clear: both;" /><br />
</p>
<p>In this program we take input from the user, add it and then echo the result back to the screen.</p>
<p><b>Output</b><br />
Enter two no<br />
100<br />
200</p>
<p>Sum is: 300</conio></iostream></pre>
<p>Related posts:<ol>
<li><a href='http://technotip.com/673/using-constructors-member-function-to-add-two-numbers-java/' rel='bookmark' title='Using Constructors &amp; Member Function to add two numbers: Java'>Using Constructors &#038; Member Function to add two numbers: Java</a></li>
<li><a href='http://technotip.com/1053/object-oriented-programming-c/' rel='bookmark' title='Object Oriented Programming: C++'>Object Oriented Programming: C++</a></li>
<li><a href='http://technotip.com/780/simple-interest-c-program/' rel='bookmark' title='Simple Interest: C Program'>Simple Interest: C Program</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://technotip.com/1200/addition-of-2-numbers-cpp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Object Oriented Programming: C++</title>
		<link>http://technotip.com/1053/object-oriented-programming-c/</link>
		<comments>http://technotip.com/1053/object-oriented-programming-c/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 12:37:01 +0000</pubDate>
		<dc:creator>Satish</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[basic]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[oops]]></category>

		<guid isPermaLink="false">http://technotip.com/?p=1053</guid>
		<description><![CDATA[To understand and switch from C to C++, you need to know some of the basic similarities and differences between the two. Sample C Program: #include&#60;stdio.h&#62; void main() { printf("Welcome To C"); } Here stdio.h header file is included inorder to make use of printf and scanf functions. Sample Cpp Program: #include&#60;iostream.h&#62; void main() { [...]
Related posts:<ol>
<li><a href='http://technotip.com/662/first-java-program-basic/' rel='bookmark' title='First Java Program: Basic'>First Java Program: Basic</a></li>
<li><a href='http://technotip.com/262/event-object-javascript/' rel='bookmark' title='Event Object: Javascript'>Event Object: Javascript</a></li>
<li><a href='http://technotip.com/673/using-constructors-member-function-to-add-two-numbers-java/' rel='bookmark' title='Using Constructors &amp; Member Function to add two numbers: Java'>Using Constructors &#038; Member Function to add two numbers: Java</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>To understand and switch from C to C++, you need to know some of the basic similarities and differences between the two.</p>
<p><b>Sample C Program:</b></p>
<pre name="code" class="c">
#include&lt;stdio.h&gt;

void main()
{
  printf("Welcome To C");
}
</pre>
<p>Here stdio.h header file is included inorder to make use of printf and scanf functions.</p>
<p><b>Sample Cpp Program:</b></p>
<pre name="code" class="cpp">
#include&lt;iostream.h&gt;

void main()
{
  cout&lt;&lt;"Welcome To Cpp";
}
</pre>
<p>Here iostream.h header file is included inorder to make use of cout and cin objects.</p>
<p>cout is an object of class ostream.<br />
cin is an object of class istream.</p>
<p>Both these ostream and istream classes are present inside iostream.h file.</p>
<p>In both C and C++, execution of the program starts from main() function.</p>
<p>The difference is, printf and scanf are functions; while cout and cin are objects.</p>
<p><strong>&lt;&lt;</strong> is called Insertion Operator. To show result on output window.<br />
<strong>&gt;&gt;</strong> is called Extraction Operator. To get input from the user(keyboard).</p>
<p><b>Structures In C:</b></p>
<pre name="code" class="c">
struct Student
{
  String name[];
  int age;
}s1;
</pre>
<p>To access members of structure:</p>
<pre name="code" class="cpp">
s1.name[];
s1.age;
</pre>
<p><strong>Video Tutorial: Basics of C++</strong><br />
<center><br />
<a href="http://technotip.com/1053/object-oriented-programming-c/"><img src="http://img.youtube.com/vi/GuZFpc0diJ4&#038;ap=%2526fmt%3D22/default.jpg" width="130" height="97" border title="Object Oriented Programming: C++" alt="default Object Oriented Programming: C++" /></a><br />
</center></p>
<div style="font-size: small;">YouTube Link: <a href="http://www.youtube.com/watch?v=GuZFpc0diJ4&#038;fmt=22">http://www.youtube.com/watch?v=GuZFpc0diJ4</a> [Watch the Video In Full Screen.]</div>
<p><br style="clear: both;" /><br />
</p>
<p><b>Class In Cpp:</b></p>
<pre name="code" class="cpp">
#include&lt;iostream.h&gt;
#include&lt;conio.h&gt;

class Student
{
  int a, b, c;

  public:
  void read() { cin&gt;&gt;a&gt;&gt;b&gt;&gt;c; }
  void show() { cout&lt;&lt;"\nEntered Numbers are "&lt;&lt;a&lt;&lt;" , "&lt;&lt;b&lt;&lt;" , "&lt;&lt;c; }
};

int main()
{
  A a;
  clrscr();

  cout&lt;&lt;"\nEnter 3 nums\n";

  a.read();
  a.show();

  getch();

}
</pre>
<p>member functions are accessed with the help of objects.</p>
<p>object.member</p>
<p>This way data binding is done and a level of security is imparted to the data.</p>
<p>Binding of Data and method into a single unit is called <strong>ENCAPSULATION</strong>.</p>
<p>Related posts:<ol>
<li><a href='http://technotip.com/662/first-java-program-basic/' rel='bookmark' title='First Java Program: Basic'>First Java Program: Basic</a></li>
<li><a href='http://technotip.com/262/event-object-javascript/' rel='bookmark' title='Event Object: Javascript'>Event Object: Javascript</a></li>
<li><a href='http://technotip.com/673/using-constructors-member-function-to-add-two-numbers-java/' rel='bookmark' title='Using Constructors &amp; Member Function to add two numbers: Java'>Using Constructors &#038; Member Function to add two numbers: Java</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://technotip.com/1053/object-oriented-programming-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Colorful Text Output: C program</title>
		<link>http://technotip.com/984/colorful-text-output-c-program/</link>
		<comments>http://technotip.com/984/colorful-text-output-c-program/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 14:36:30 +0000</pubDate>
		<dc:creator>Satish</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[graphics]]></category>

		<guid isPermaLink="false">http://technotip.com/?p=984</guid>
		<description><![CDATA[This video tutorial shows a simple method to get the output in different colors, on the dosprompt: using a simple C program. Video Tutorial: Colorful Text Output: C program YouTube Link: http://www.youtube.com/watch?v=TpasN_6RMMM [Watch the Video In Full Screen.] Full Source code: Colorful Text Output: C program C 1 2 3 4 5 6 7 8 [...]
Related posts:<ol>
<li><a href='http://technotip.com/780/simple-interest-c-program/' rel='bookmark' title='Simple Interest: C Program'>Simple Interest: C Program</a></li>
<li><a href='http://technotip.com/957/write-data-to-text-file-in-c-character-by-character/' rel='bookmark' title='Write Data To Text File In C: Character by Character'>Write Data To Text File In C: Character by Character</a></li>
<li><a href='http://technotip.com/662/first-java-program-basic/' rel='bookmark' title='First Java Program: Basic'>First Java Program: Basic</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This video tutorial shows a simple method to get the output in different colors, on the dosprompt: using a simple C program.</p>
<p><strong>Video Tutorial: Colorful Text Output: C program</strong><br />
<center><br />
<a href="http://technotip.com/984/colorful-text-output-c-program/"><img src="http://img.youtube.com/vi/TpasN_6RMMM/default.jpg" width="130" height="97" border title="Colorful Text Output: C program" alt="default Colorful Text Output: C program" /></a><br />
</center></p>
<div style="font-size: small;">YouTube Link: <a href="http://www.youtube.com/watch?v=TpasN_6RMMM">http://www.youtube.com/watch?v=TpasN_6RMMM</a> [Watch the Video In Full Screen.]</div>
<p><br style="clear: both;" /><br />
</p>
<p><strong>Full Source code: Colorful Text Output: C program C</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">#include&lt; stdio.h&gt; /* Leave No space b/w &lt; and stdio.h */
&nbsp;
void main()
{
	int i;
	clrscr();
&nbsp;
	for( i=0; i&lt;=15; i++ )
	{
		textcolor(i);
		cprintf(&quot;Microsoft, Google, Yahoo, Oracle, eBay, PayPal \r\n&quot;);
	}
&nbsp;
	getch();
&nbsp;
}</pre></td></tr></table></div>

<p><strong>textcolor()</strong> function takes color code as it&#8217;s parameter, and this color is taken by <strong>cprintf()</strong> function and the parameter(string) passed to <strong>cprintf </strong>is printed in the color given by <strong>textcolor()</strong> function.</p>
<table style="font-weight: normal;">
<tr>
<th>
Color Name<br />
&#8212;&#8212;&#8212;-
</th>
<th>
Color code<br />
&#8212;&#8212;&#8212;-
</th>
</tr>
<tr>
<td>
BLACK<br />
BLUE<br />
GREEN<br />
CYAN<br />
RED<br />
MAGENTA<br />
BROWN<br />
LIGHTGRAY<br />
DARKGRAY<br />
LIGHTBLUE<br />
LIGHTGREEN<br />
LIGHTCYAN<br />
LIGHTRED<br />
LIGHTMAGENTA<br />
YELLOW<br />
WHITE
</td>
<td>
0<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
9<br />
10<br />
11<br />
12<br />
13<br />
14<br />
15
</td>
</tr>
</table>
<p><strong>OutPut:</strong><br />
<span style="color: black;">Microsoft, Google, Yahoo, Oracle, eBay, PayPal</span><br />
<span style="color: blue;">Microsoft, Google, Yahoo, Oracle, eBay, PayPal</span><br />
<span style="color: green;">Microsoft, Google, Yahoo, Oracle, eBay, PayPal</span><br />
<span style="color: cyan;">Microsoft, Google, Yahoo, Oracle, eBay, PayPal</span><br />
<span style="color: red;">Microsoft, Google, Yahoo, Oracle, eBay, PayPal</span><br />
<span style="color: magenta;">Microsoft, Google, Yahoo, Oracle, eBay, PayPal</span><br />
<span style="color: brown;">Microsoft, Google, Yahoo, Oracle, eBay, PayPal</span><br />
<span style="color: lightgray;">Microsoft, Google, Yahoo, Oracle, eBay, PayPal</span><br />
<span style="color: darkgray;">Microsoft, Google, Yahoo, Oracle, eBay, PayPal</span><br />
<span style="color: lightblue;">Microsoft, Google, Yahoo, Oracle, eBay, PayPal</span><br />
<span style="color: lightgreen;">Microsoft, Google, Yahoo, Oracle, eBay, PayPal</span><br />
<span style="color: lightcyan;">Microsoft, Google, Yahoo, Oracle, eBay, PayPal</span><br />
<span style="color: lightred;">Microsoft, Google, Yahoo, Oracle, eBay, PayPal</span><br />
<span style="color: lightmagenta;">Microsoft, Google, Yahoo, Oracle, eBay, PayPal</span><br />
<span style="color: yellow;">Microsoft, Google, Yahoo, Oracle, eBay, PayPal</span><br />
<span style="color: white;">Microsoft, Google, Yahoo, Oracle, eBay, PayPal</span></pre>
<p>Related posts:<ol>
<li><a href='http://technotip.com/780/simple-interest-c-program/' rel='bookmark' title='Simple Interest: C Program'>Simple Interest: C Program</a></li>
<li><a href='http://technotip.com/957/write-data-to-text-file-in-c-character-by-character/' rel='bookmark' title='Write Data To Text File In C: Character by Character'>Write Data To Text File In C: Character by Character</a></li>
<li><a href='http://technotip.com/662/first-java-program-basic/' rel='bookmark' title='First Java Program: Basic'>First Java Program: Basic</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://technotip.com/984/colorful-text-output-c-program/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Write Data To Text File In C: Character by Character</title>
		<link>http://technotip.com/957/write-data-to-text-file-in-c-character-by-character/</link>
		<comments>http://technotip.com/957/write-data-to-text-file-in-c-character-by-character/#comments</comments>
		<pubDate>Mon, 02 Jan 2012 07:12:57 +0000</pubDate>
		<dc:creator>Satish</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[character]]></category>
		<category><![CDATA[create file]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[write]]></category>

		<guid isPermaLink="false">http://technotip.com/?p=957</guid>
		<description><![CDATA[This video tutorial demonstrates the creation of a simple file and writing data to text file &#8216;character by character&#8217; using a simple C program. #include&#60; stdio.h&#62; is the only header file required to include. DOSBOX I&#8217;m using a software called DOSBOX to write my c program. Using this software we can run 32-bit programs on [...]
Related posts:<ol>
<li><a href='http://technotip.com/570/insert-extractfetch-data-from-database-php-script/' rel='bookmark' title='Insert And Extract/Fetch Data From Database: PHP Script'>Insert And Extract/Fetch Data From Database: PHP Script</a></li>
<li><a href='http://technotip.com/244/text-stacking-css-javascript/' rel='bookmark' title='Text Stacking: CSS &amp; JavaScript'>Text Stacking: CSS &#038; JavaScript</a></li>
<li><a href='http://technotip.com/780/simple-interest-c-program/' rel='bookmark' title='Simple Interest: C Program'>Simple Interest: C Program</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This video tutorial demonstrates the creation of a simple file and writing data to text file &#8216;character by character&#8217; using a simple C program.</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">  #include&lt; stdio.h&gt;</pre></div></div>

<p>is the only header file required to include.</p>
<p><strong>DOSBOX</strong><br />
I&#8217;m using a software called DOSBOX to write my c program. Using this software we can run 32-bit programs on our 62-bit machine.<br />
I&#8217;m mounting my C:/DOSFOLDER here. So C:/DOSFOLDER will be treated as my C drive.</p>
<p>Here is the DOS code to do that:</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">z:\&gt; mount c &quot;c:/DOSFOLDER&quot;
z:\&gt;c:
c:\&gt;cd TC
c\TC:&gt;tc</pre></div></div>

<p>We take a pointer variable of <strong>FILE </strong>type, so that this variable can be used to further reference to the file.</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">FILE *p;
char ch;</pre></div></div>

<p><strong>ch</strong> is a <strong>char</strong> type variable to store user entered characters and to transfer it to the file.</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">  p = fopen(&quot;c:\\Hello.txt&quot;,&quot;w&quot;);</pre></div></div>

<p><strong>fopen</strong> function takes two parameters. First one being the path of the file(if the file doesn&#8217;t exist, it creates one by itself), second parameter indicates the write mode. i.e., the file is opened in write mode and is intended for the write operation.</p>
<p><strong>Note:</strong> If you are using DOSBOX software, then the file will be created at this location c:/DOSFOLDER/Hello.txt</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">       clrscr();
&nbsp;
        printf(&quot;\nEnter the text nd hit Enter to Terminate\n&quot;);</pre></div></div>

<p><strong>clrscr()</strong> clears the screen and the print statement asks the user to enter some text and hit enter to terminate.</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">while( (ch=getche()) !='\r' )
	fputc( ch,p);</pre></div></div>

<p><strong>getche()</strong> is a function that gets a character from the keyboard, echoes to screen.<br />
These characters are stored in <strong>char</strong> variable <strong>ch</strong>. If the entered character is not &#8220;<strong>Enter Key</strong>&#8221; that is <strong>\r</strong> charriage return character, then the control enters the <strong>while</strong> loop and using <strong>fputc </strong>function it transfers the content(character) present in <strong>ch</strong> to <strong>p</strong>(variable which references the file we have opened for writing).</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">fclose(p);</pre></div></div>

<p>closes the file, opened for write operation.</p>
<p><strong>Video Tutorial: Creating and Writing Data To A Simple File: in C</strong><br />
<center><br />
<a href="http://technotip.com/957/write-data-to-text-file-in-c-character-by-character/"><img src="http://img.youtube.com/vi/4V1qAw-XImI/default.jpg" width="130" height="97" border title="Write Data To Text File In C: Character by Character" alt="default Write Data To Text File In C: Character by Character" /></a><br />
</center></p>
<div style="font-size: small;">YouTube Link: <a href="http://www.youtube.com/watch?v=4V1qAw-XImI">http://www.youtube.com/watch?v=4V1qAw-XImI</a> [Watch the Video In Full Screen.]</div>
<p><br style="clear: both;" /><br />
</p>
<p><strong>Full Source code to Creating and Writing Data To A Simple File: in C</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">#include&lt; stdio.h&gt; /* no space b/w &lt; and stdio.h */
&nbsp;
void main()
{
	FILE *p;
	char ch;
&nbsp;
	p = fopen(&quot;c:\Hello.txt&quot;,&quot;w&quot;);
	clrscr();
&nbsp;
	printf(&quot;\nEnter the text nd hit Enter to Terminate\n&quot;);
&nbsp;
	while( (ch = getche()) != '\r' )
	 fputc( ch, p );
&nbsp;
	fclose(p);
}</pre></td></tr></table></div>

<p><strong>Output:</strong><br />
Recruitment&#8217;s in C.</pre>
<p>Related posts:<ol>
<li><a href='http://technotip.com/570/insert-extractfetch-data-from-database-php-script/' rel='bookmark' title='Insert And Extract/Fetch Data From Database: PHP Script'>Insert And Extract/Fetch Data From Database: PHP Script</a></li>
<li><a href='http://technotip.com/244/text-stacking-css-javascript/' rel='bookmark' title='Text Stacking: CSS &amp; JavaScript'>Text Stacking: CSS &#038; JavaScript</a></li>
<li><a href='http://technotip.com/780/simple-interest-c-program/' rel='bookmark' title='Simple Interest: C Program'>Simple Interest: C Program</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://technotip.com/957/write-data-to-text-file-in-c-character-by-character/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creating Simple Window in Java: using swings</title>
		<link>http://technotip.com/939/creating-simple-window-in-java-using-swings/</link>
		<comments>http://technotip.com/939/creating-simple-window-in-java-using-swings/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 16:26:26 +0000</pubDate>
		<dc:creator>Satish</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[extends]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[JFrame]]></category>
		<category><![CDATA[swings]]></category>
		<category><![CDATA[window]]></category>

		<guid isPermaLink="false">http://technotip.com/?p=939</guid>
		<description><![CDATA[This Java video tutorial demonstrates the creation of a simple window by importing Swings package and extending JFrame class. import javax.swing.*; javax.swing provides a set of lightweight components that, to the maximum degree possible, works the same on all platforms. myWindow Class class myWindow extends JFrame { &#160; } myWindow is user the name given [...]
Related posts:<ol>
<li><a href='http://technotip.com/716/addition-subtraction-complex-number-java/' rel='bookmark' title='Addition/Subtraction of Complex Number: Java'>Addition/Subtraction of Complex Number: Java</a></li>
<li><a href='http://technotip.com/662/first-java-program-basic/' rel='bookmark' title='First Java Program: Basic'>First Java Program: Basic</a></li>
<li><a href='http://technotip.com/673/using-constructors-member-function-to-add-two-numbers-java/' rel='bookmark' title='Using Constructors &amp; Member Function to add two numbers: Java'>Using Constructors &#038; Member Function to add two numbers: Java</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This Java video tutorial demonstrates the creation of a simple window by importing Swings package and extending JFrame class.<br />
</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">import javax.swing.*;</pre></div></div>

<p>javax.swing provides a set of lightweight components that, to the maximum degree possible, works the same on all platforms.</p>
<p><strong>myWindow Class</strong></p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">class myWindow extends JFrame
{
&nbsp;
}</pre></div></div>

<p><strong>myWindow </strong>is user the name given to the defined class. <strong>extends </strong>is the keyword. <strong>JFrame </strong>is a built-in class of <strong>swing </strong>package.</p>
<p>
<strong>Constructor</strong></p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;"> myWindow()
 { 
		setTitle(&quot;My window program, using Swings&quot;);
		setSize(400, 200);
		setVisible( true );
		setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
 }</pre></div></div>

<p><strong>myWindow()</strong> is the constructor, and thus it&#8217;s name matches with that of its class name.<br />
<strong>setTitle()</strong> : To set the string present on the title bar of the window we are creating.<br />
<strong>setSize() </strong>: To set the size of the window. It takes two parameters, width and height of the window.<br />
<strong>setVisible() </strong>: It&#8217;s very important for all the programs which involves visual components. passing a value of <strong>true </strong>makes the window visible.</p>
<p><strong>Main method</strong></p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">	public static void main(String args[])
	{
		 // new myWindow();
		myWindow m1 = new myWindow();
	}</pre></div></div>

<p>main method just calls the constructor. We can simply write <strong>new myWindow()</strong> since we are not at all taking the help of any object here.</p>
<p><strong>Video Tutorial: Creating Simple Window in Java: using swings </strong><br />
<center><br />
<a href="http://technotip.com/939/creating-simple-window-in-java-using-swings/"><img src="http://img.youtube.com/vi/7ThtNST8gKE/default.jpg" width="130" height="97" border title="Creating Simple Window in Java: using swings" alt="default Creating Simple Window in Java: using swings" /></a><br />
</center></p>
<div style="font-size: small;">YouTube Link: <a href="http://www.youtube.com/watch?v=7ThtNST8gKE">http://www.youtube.com/watch?v=7ThtNST8gKE</a> [Watch the Video In Full Screen.]</div>
<p><br style="clear: both;" /><br />
</p>
<p><strong>Full Source code to create a simple window in Java: using swings</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">import javax.swing.*;
&nbsp;
class myWindow extends JFrame
{
	myWindow()
	{
		setTitle(&quot;My window program, using Swings&quot;);
		setSize(400, 200);
		setVisible( true );
		setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
	}
&nbsp;
	public static void main(String args[])
	{
		 // new myWindow();
		myWindow m1 = new myWindow();
	}
}</pre></td></tr></table></div>

<p><strong>Output:</strong><br />
<img src="http://technotip.com/wp-content/uploads/java/window-swing-java.png" alt="window swing java Creating Simple Window in Java: using swings" width="431" height="224" title="Creating Simple Window in Java: using swings" /></p>
<p>Related posts:<ol>
<li><a href='http://technotip.com/716/addition-subtraction-complex-number-java/' rel='bookmark' title='Addition/Subtraction of Complex Number: Java'>Addition/Subtraction of Complex Number: Java</a></li>
<li><a href='http://technotip.com/662/first-java-program-basic/' rel='bookmark' title='First Java Program: Basic'>First Java Program: Basic</a></li>
<li><a href='http://technotip.com/673/using-constructors-member-function-to-add-two-numbers-java/' rel='bookmark' title='Using Constructors &amp; Member Function to add two numbers: Java'>Using Constructors &#038; Member Function to add two numbers: Java</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://technotip.com/939/creating-simple-window-in-java-using-swings/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

