tag:blogger.com,1999:blog-72650139260243082182024-03-06T03:56:53.922+05:30123techguideAnonymoushttp://www.blogger.com/profile/11837588965426020130noreply@blogger.comBlogger90125tag:blogger.com,1999:blog-7265013926024308218.post-72183010963336269682013-10-21T20:49:00.000+05:302013-10-21T20:51:59.154+05:30A program in c\c++ using Open GL that draws following figure <div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFGgf0Tf1_vnelRHcaCCXQk4F-EqRfxQhBNhvfEQFywwubhxhUPheFp8hvKd9KrU8FvNuQFOr5luQgmJlrBJ6u6a0oDI3eFt9k78exL0qa3MrvGVRiVndV82i7YjWjNQjpY2fmog22_xY/s1600/Untitled.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="131" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFGgf0Tf1_vnelRHcaCCXQk4F-EqRfxQhBNhvfEQFywwubhxhUPheFp8hvKd9KrU8FvNuQFOr5luQgmJlrBJ6u6a0oDI3eFt9k78exL0qa3MrvGVRiVndV82i7YjWjNQjpY2fmog22_xY/s640/Untitled.png" width="640" /></a></div>
<br />
<br />
<a name='more'></a><br />
<br />
<pre style="background: #f6f8ff; color: #000020;"><html><body style="background: #f6f8ff; color: #000020;"><pre>
<span style="color: #308080;"></span><span style="color: #406080;"></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include </span><span style="color: maroon;"><</span><span style="color: #40015a;">stdio.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include </span><span style="color: maroon;"><</span><span style="color: #40015a;">conio.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include </span><span style="color: maroon;"><</span><span style="color: #40015a;">iostream.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include </span><span style="color: maroon;"><</span><span style="color: #40015a;">glut.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include </span><span style="color: maroon;"><</span><span style="color: #40015a;">stdlib.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">define</span><span style="color: #004a43;"> WINW 1000</span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">define</span><span style="color: #004a43;"> WINL 1000</span>
<span style="color: #200080; font-weight: bold;">void</span> setup<span style="color: #308080;">(</span><span style="color: #308080;">)</span>
<span style="color: #406080;">{</span>
<span style="color: #400000;">glClearColor</span><span style="color: #308080;">(</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">,</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">,</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">,</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
<span style="color: #400000;">glClear</span><span style="color: #308080;">(</span>GL_COLOR_BUFFER_BIT<span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glutSwapBuffers<span style="color: #308080;">(</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
<span style="color: #406080;">}</span>
<span style="color: #200080; font-weight: bold;">float</span> xmap<span style="color: #308080;">(</span><span style="color: #200080; font-weight: bold;">int</span> x<span style="color: #308080;">)</span>
<span style="color: #406080;">{</span>
<span style="color: #200080; font-weight: bold;">float</span> fx<span style="color: #308080;">,</span>halfw<span style="color: #406080;">;</span>
halfw<span style="color: #308080;">=</span><span style="color: #308080;">(</span><span style="color: #200080; font-weight: bold;">float</span><span style="color: #308080;">)</span>WINW<span style="color: #308080;">/</span><span style="color: #008c00;">2</span><span style="color: #406080;">;</span>
fx<span style="color: #308080;">=</span>x<span style="color: #308080;">/</span>halfw<span style="color: #406080;">;</span>
<span style="color: #200080; font-weight: bold;">return</span> fx<span style="color: #406080;">;</span>
<span style="color: #406080;">}</span>
<span style="color: #200080; font-weight: bold;">float</span> ymap<span style="color: #308080;">(</span><span style="color: #200080; font-weight: bold;">int</span> y<span style="color: #308080;">)</span>
<span style="color: #406080;">{</span>
<span style="color: #200080; font-weight: bold;">float</span> fy<span style="color: #308080;">,</span>halfl<span style="color: #406080;">;</span>
halfl<span style="color: #308080;">=</span><span style="color: #308080;">(</span><span style="color: #200080; font-weight: bold;">float</span><span style="color: #308080;">)</span>WINL<span style="color: #308080;">/</span><span style="color: #008c00;">2</span><span style="color: #406080;">;</span>
fy<span style="color: #308080;">=</span> y<span style="color: #308080;">/</span>halfl<span style="color: #406080;">;</span>
<span style="color: #200080; font-weight: bold;">return</span> fy<span style="color: #406080;">;</span>
<span style="color: #406080;">}</span>
<span style="color: #200080; font-weight: bold;">void</span> display<span style="color: #308080;">(</span><span style="color: #308080;">)</span>
<span style="color: #406080;">{</span>
<span style="color: #200080; font-weight: bold;">int</span> i<span style="color: #406080;">;</span>
<span style="color: #200080; font-weight: bold;">for</span><span style="color: #308080;">(</span>i<span style="color: #308080;">=</span><span style="color: #008c00;">1</span><span style="color: #406080;">;</span>i<span style="color: #308080;"><</span><span style="color: #308080;">=</span><span style="color: #008c00;">4</span><span style="color: #406080;">;</span>i<span style="color: #308080;">+</span><span style="color: #308080;">+</span><span style="color: #308080;">)</span>
<span style="color: #406080;">{</span>
<span style="color: #400000;">glBegin</span><span style="color: #308080;">(</span>GL_LINE_STRIP<span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glColor3f<span style="color: #308080;">(</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">,</span><span style="color: green;">1.0</span><span style="color: #006600;">f</span><span style="color: #308080;">,</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glVertex3f<span style="color: #308080;">(</span>xmap<span style="color: #308080;">(</span><span style="color: #008c00;">0</span><span style="color: #308080;">)</span><span style="color: #308080;">,</span>ymap<span style="color: #308080;">(</span><span style="color: #008c00;">0</span><span style="color: #308080;">)</span><span style="color: #308080;">,</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glVertex3f<span style="color: #308080;">(</span>xmap<span style="color: #308080;">(</span><span style="color: #008c00;">50</span><span style="color: #308080;">)</span><span style="color: #308080;">,</span>ymap<span style="color: #308080;">(</span><span style="color: #008c00;">25</span><span style="color: #308080;">)</span><span style="color: #308080;">,</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glVertex3f<span style="color: #308080;">(</span>xmap<span style="color: #308080;">(</span><span style="color: #008c00;">50</span><span style="color: #308080;">)</span><span style="color: #308080;">,</span>ymap<span style="color: #308080;">(</span><span style="color: #008c00;">0</span><span style="color: #308080;">)</span><span style="color: #308080;">,</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glEnd<span style="color: #308080;">(</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glutSwapBuffers<span style="color: #308080;">(</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glTranslatef<span style="color: #308080;">(</span>xmap<span style="color: #308080;">(</span><span style="color: #008c00;">50</span><span style="color: #308080;">)</span><span style="color: #308080;">,</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">,</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
<span style="color: #406080;">}</span>
<span style="color: #406080;">}</span>
<span style="color: #200080; font-weight: bold;">int</span> <span style="color: #400000;">main</span><span style="color: #308080;">(</span><span style="color: #200080; font-weight: bold;">int</span> argc<span style="color: #308080;">,</span><span style="color: #200080; font-weight: bold;">char</span> <span style="color: #308080;">*</span> argv<span style="color: #308080;">[</span><span style="color: #308080;">]</span><span style="color: #308080;">)</span>
<span style="color: #406080;">{</span>
glutInitDisplayMode<span style="color: #308080;">(</span>GLUT_RGB <span style="color: #308080;">|</span> GLUT_DOUBLE <span style="color: #308080;">|</span> GLUT_DEPTH<span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glutInitWindowSize<span style="color: #308080;">(</span>WINW<span style="color: #308080;">,</span>WINL<span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glutCreateWindow<span style="color: #308080;">(</span><span style="color: maroon;">"</span><span style="color: #1060b6;">123techguide.blogspot.com</span><span style="color: maroon;">"</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
setup<span style="color: #308080;">(</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glutDisplayFunc<span style="color: #308080;">(</span>display<span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glutMainLoop<span style="color: #308080;">(</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
getch<span style="color: #308080;">(</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
<span style="color: #200080; font-weight: bold;">return</span> <span style="color: #008c00;">0</span><span style="color: #406080;">;</span>
<span style="color: #406080;">}</span>
<span style="color: #406080;"></span><span style="color: #308080;"></span>
</pre>
</body></html></pre>
</div>
<div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>adminhttp://www.blogger.com/profile/12903911477743613925noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-74757937241803638392013-07-18T15:39:00.002+05:302013-07-21T13:07:22.329+05:30Setting up Alliance broadband in Ubuntu 13.04<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="hgroup" style="margin: 0px 0px 0.5em; padding: 0px;">
<h1 class="title" style="margin: 0px; padding: 0px;">
<span class="title"><span style="color: #0b5394;">Manually set network settings</span></span></h1>
</div>
<div class="region" style="margin: 0px; padding: 0px;">
<div class="contents" style="margin: 0px; padding: 0px;">
<div class="p" style="background-color: white; color: #3c3c3c; font-family: sans-serif; line-height: 1.72em; orphans: 2; padding: 0px; widows: 2;">
If your network doesn't automatically assign network settings to your computer, you may have to manually enter the settings yourself. This topic assumes that you already know the correct settings to use. If not, you may need to ask your network administrator or look at the settings of your router or network switch.<br />
<br />
<a name='more'></a><br />
<br />
<h2 style="background-color: white; font-family: sans-serif; font-size: inherit; font-weight: inherit; margin: 0px; orphans: 2; padding: 0px; widows: 2;">
<span class="title"><span style="color: #cc0000;"><u style="font-weight: normal;">To manually set your network settings:</u></span></span></h2>
</div>
<div>
<br />
<div style="orphans: 2; widows: 2;">
</div>
<ul style="text-align: left;">
<li><span style="background-color: white; color: #3c3c3c; font-family: sans-serif; line-height: 24px; orphans: 2; widows: 2;">Click the </span><span class=" gui" style="background-color: white; color: #6c6c6c; font-family: sans-serif; line-height: 24px; orphans: 2; widows: 2;">network menu</span><span style="background-color: white; color: #3c3c3c; font-family: sans-serif; line-height: 24px; orphans: 2; widows: 2;"> on the menu bar and click </span><span class=" gui" style="background-color: white; color: #6c6c6c; font-family: sans-serif; line-height: 24px; orphans: 2; widows: 2;">Edit Connections</span><span style="background-color: white; color: #3c3c3c; font-family: sans-serif; line-height: 24px; orphans: 2; widows: 2;">.</span></li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDjxjL7Dd0MEK0A34eAbjTyqluxSYBtONPISl_fokagmFXU7Y1SeUEHgLfsSGqPO-3zV_CZO0V3pcWqSi8zDwdb04mHmnBvYzNTtR8FVW3qE8ejL6THtQAzwpQiLK10u4EVMpUXD2Fn5g/s1600/Screenshot+from+2013-07-13+01:39:09.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDjxjL7Dd0MEK0A34eAbjTyqluxSYBtONPISl_fokagmFXU7Y1SeUEHgLfsSGqPO-3zV_CZO0V3pcWqSi8zDwdb04mHmnBvYzNTtR8FVW3qE8ejL6THtQAzwpQiLK10u4EVMpUXD2Fn5g/s640/Screenshot+from+2013-07-13+01:39:09.png" width="640" /></a></div>
<br />
<div style="orphans: 2; widows: 2;">
<span style="color: #3c3c3c; font-family: sans-serif;"><span style="line-height: 24px;"><br /></span></span></div>
<div style="orphans: 2; widows: 2;">
<ul style="text-align: left;">
<li><span style="color: #3c3c3c; font-family: sans-serif; line-height: 24px;">Add Ethernet connection and create</span></li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLwnYKdQz9lp1UJUtOMpHor58zLm6w_XIQUklHeUILRVPyPipsdE2WqR7oCg8vZnwFQ8aOcUhzBYNM_c-nCKIXJHmalP4l-MkYlq9wPNWZ-Wt4oLuMwlmMyrBy96EYhstuzrusr_iD_Xk/s1600/Screenshot+from+2013-07-18+15:26:04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLwnYKdQz9lp1UJUtOMpHor58zLm6w_XIQUklHeUILRVPyPipsdE2WqR7oCg8vZnwFQ8aOcUhzBYNM_c-nCKIXJHmalP4l-MkYlq9wPNWZ-Wt4oLuMwlmMyrBy96EYhstuzrusr_iD_Xk/s640/Screenshot+from+2013-07-18+15:26:04.png" width="640" /></a></div>
<div>
<span style="color: #3c3c3c; font-family: sans-serif;"><span style="line-height: 24px;"><br /></span></span></div>
</div>
<br />
<ul style="text-align: left;">
<li>Then Go Ethernet tab and choose Device Mac address.</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3rfB8hW0t8nj7-sTxqFOYb-WnPwvKywuFT58NtjO8GekKAYhldfHMLzn4HWMDOHELYtxKzEuUyrZwPOuX2dG-oHgJT_w7wSsR2p2WTjQypvPVhT79Vt0GLSZsYMel28TLvqmktzIpwrk/s1600/Screenshot+from+2013-07-18+15%253A06%253A35.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3rfB8hW0t8nj7-sTxqFOYb-WnPwvKywuFT58NtjO8GekKAYhldfHMLzn4HWMDOHELYtxKzEuUyrZwPOuX2dG-oHgJT_w7wSsR2p2WTjQypvPVhT79Vt0GLSZsYMel28TLvqmktzIpwrk/s640/Screenshot+from+2013-07-18+15%253A06%253A35.png" width="640" /></a></div>
<div>
<br /></div>
<br />
<div style="orphans: 2; widows: 2;">
<br />
<ul style="text-align: left;">
<li><span style="background-color: white; color: #3c3c3c; font-family: sans-serif; line-height: 24px; orphans: 2; widows: 2;">Go to the </span><span class=" gui" style="background-color: white; color: #6c6c6c; font-family: sans-serif; line-height: 24px; orphans: 2; widows: 2;">IPv4 Settings</span><span style="background-color: white; color: #3c3c3c; font-family: sans-serif; line-height: 24px; orphans: 2; widows: 2;"> tab and change the </span><span class=" gui" style="background-color: white; color: #6c6c6c; font-family: sans-serif; line-height: 24px; orphans: 2; widows: 2;">Method</span><span style="background-color: white; color: #3c3c3c; font-family: sans-serif; line-height: 24px; orphans: 2; widows: 2;"> to </span><span class=" gui" style="background-color: white; color: #6c6c6c; font-family: sans-serif; line-height: 24px; orphans: 2; widows: 2;">Manual</span><span style="background-color: white; color: #3c3c3c; font-family: sans-serif; line-height: 24px; orphans: 2; widows: 2;">.</span></li>
</ul>
<br />
<div class="p" style="background-color: white; color: #3c3c3c; font-family: sans-serif; line-height: 1.72em; orphans: 2; padding: 0px; widows: 2;">
Click <span class=" gui" style="color: #6c6c6c;">Add</span> and type the <span class=" em" style="font-style: italic;">IP address</span>, <span class=" em" style="font-style: italic;">network mask</span> and <span class=" em" style="font-style: italic;">default gateway IP address</span> into the corresponding columns of the<span class=" gui" style="color: #6c6c6c;">Addresses</span> list. Press <span class=" key"><kbd style="-webkit-box-shadow: rgb(204, 204, 204) 1px 1px 2px; background-color: whitesmoke; border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; border-top-left-radius: 2px; border-top-right-radius: 2px; border: 1px solid rgb(204, 204, 204); box-shadow: rgb(204, 204, 204) 1px 1px 2px; color: #6c6c6c; font-family: inherit; font-size: inherit; margin: 0px 0.2em; padding: 0px 0.5em; white-space: nowrap;">Enter</kbd></span> or <span class=" key"><kbd style="-webkit-box-shadow: rgb(204, 204, 204) 1px 1px 2px; background-color: whitesmoke; border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; border-top-left-radius: 2px; border-top-right-radius: 2px; border: 1px solid rgb(204, 204, 204); box-shadow: rgb(204, 204, 204) 1px 1px 2px; color: #6c6c6c; font-family: inherit; font-size: inherit; margin: 0px 0.2em; padding: 0px 0.5em; white-space: nowrap;">Tab</kbd></span> after typing each address.</div>
<div style="orphans: 2; widows: 2;">
<div class="p" style="background-color: white; color: #3c3c3c; font-family: sans-serif; line-height: 1.72em; margin-top: 1em; padding: 0px;">
These three addresses must be IP addresses; that is, they must be four numbers separated by periods (e.g. 123.45.6.78).</div>
</div>
</div>
<br />
Address : IP Address<br />
Netmask : Subnet Mask<br />
Gateway : Default Gateway<br />
DNS Server : Preferred DNS server<br />
Search Domain : Alternate DNS Server<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhecKP46ej3F0Qe1h8VC59eCcRmBNeYAWlFBTFSTXYGTBeX4P7sSN531eu-_RvjwUEf9-oU7F30ieVYM8RL0uo725zneJJy33TkRo9sAYEtCBw9KC5hyIiV__kOA3NjH5ztY8MLo_6K4uA/s1600/Screenshot+from+2013-07-18+15%253A12%253A31.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhecKP46ej3F0Qe1h8VC59eCcRmBNeYAWlFBTFSTXYGTBeX4P7sSN531eu-_RvjwUEf9-oU7F30ieVYM8RL0uo725zneJJy33TkRo9sAYEtCBw9KC5hyIiV__kOA3NjH5ztY8MLo_6K4uA/s640/Screenshot+from+2013-07-18+15%253A12%253A31.png" width="640" /></a></div>
<br />
<br />
<br />
<ul style="text-align: left;">
<li><span style="background-color: white; color: #3c3c3c; font-family: sans-serif; line-height: 24px; orphans: 2; widows: 2;">Click </span><span class=" gui" style="background-color: white; color: #6c6c6c; font-family: sans-serif; line-height: 24px; orphans: 2; widows: 2;">Save</span><span style="background-color: white; color: #3c3c3c; font-family: sans-serif; line-height: 24px; orphans: 2; widows: 2;">. </span></li>
</ul>
<div style="orphans: 2; widows: 2;">
<span style="color: #3c3c3c; font-family: sans-serif;"><span style="line-height: 24px;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkwd5bXMmKBrvwdZiE93sobYryTmJUdqxKUGK_XCyvoNMKZiGglNIPi4M_UkAm0WTu3rNloeguBnrjoVJ48yNk5lzx3BKFaBHheUhm_LCXCTVUSGqvWw8fHldoORYH3V9vy6Tne7VepN8/s1600/Screenshot+from+2013-07-18+15%253A19%253A12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkwd5bXMmKBrvwdZiE93sobYryTmJUdqxKUGK_XCyvoNMKZiGglNIPi4M_UkAm0WTu3rNloeguBnrjoVJ48yNk5lzx3BKFaBHheUhm_LCXCTVUSGqvWw8fHldoORYH3V9vy6Tne7VepN8/s640/Screenshot+from+2013-07-18+15%253A19%253A12.png" width="640" /></a></div>
<div style="orphans: 2; widows: 2;">
<span style="color: #3c3c3c; font-family: sans-serif;"><span style="line-height: 24px;"><br /></span></span></div>
</div>
<div class="steps" style="background-color: white; color: #3c3c3c; font-family: sans-serif; margin: 1em 0px 0px; orphans: 2; padding: 0px; widows: 2;">
<div class="inner" style="margin: 0px; padding: 0px;">
<div class="title title-steps" style="color: #6c6c6c; font-weight: bold; margin: 0px 0px 0.2em; padding: 0px;">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>adminhttp://www.blogger.com/profile/12903911477743613925noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-82463812575892523332013-05-24T20:37:00.000+05:302013-05-24T20:38:26.387+05:30Write a Program in c/c++ using Open GL that draws Digital Signal/Wave<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYb1btnl6dAT6jcAcZT_1Y8UtW7wyrYdDjKavDoXAFPIhj9eifQ3lHcpt6OKAQE12vFQ_KfL1PZ1TKtAyMjf80cIj_eaST2vDiN_Bqs-bY91HapR7eJDdBpnuHuEn26kTDuv4u3XzIqtI/s1600/digital+wave.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="134" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYb1btnl6dAT6jcAcZT_1Y8UtW7wyrYdDjKavDoXAFPIhj9eifQ3lHcpt6OKAQE12vFQ_KfL1PZ1TKtAyMjf80cIj_eaST2vDiN_Bqs-bY91HapR7eJDdBpnuHuEn26kTDuv4u3XzIqtI/s640/digital+wave.png" width="640" /></a></div>
<br />
<a name='more'></a><br /><br />
<br />
<pre style="background: #f6f8ff; color: #000020;"><html><body style="background: #f6f8ff; color: #000020;"><pre>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include </span><span style="color: maroon;"><</span><span style="color: #40015a;">stdio.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include </span><span style="color: maroon;"><</span><span style="color: #40015a;">conio.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include </span><span style="color: maroon;"><</span><span style="color: #40015a;">iostream.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include </span><span style="color: maroon;"><</span><span style="color: #40015a;">stdlib.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include </span><span style="color: maroon;"><</span><span style="color: #40015a;">glut.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">define</span><span style="color: #004a43;"> WINW 800</span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">define</span><span style="color: #004a43;"> WINL 600</span>
<span style="color: #200080; font-weight: bold;">float</span> xmap<span style="color: #308080;">(</span><span style="color: #200080; font-weight: bold;">int</span> x<span style="color: #308080;">)</span>
<span style="color: #406080;">{</span>
<span style="color: #200080; font-weight: bold;">float</span> halfw<span style="color: #308080;">,</span>fx<span style="color: #406080;">;</span>
halfw <span style="color: #308080;">=</span> <span style="color: #308080;">(</span><span style="color: #200080; font-weight: bold;">float</span><span style="color: #308080;">)</span>WINW<span style="color: #308080;">/</span><span style="color: #008c00;">2</span><span style="color: #406080;">;</span>
fx <span style="color: #308080;">=</span> <span style="color: #308080;">(</span>x<span style="color: #308080;">)</span><span style="color: #308080;">/</span>halfw<span style="color: #406080;">;</span>
<span style="color: #200080; font-weight: bold;">return</span> fx<span style="color: #406080;">;</span>
<span style="color: #406080;">}</span>
<span style="color: #200080; font-weight: bold;">float</span> ymap<span style="color: #308080;">(</span><span style="color: #200080; font-weight: bold;">int</span> y<span style="color: #308080;">)</span>
<span style="color: #406080;">{</span>
<span style="color: #200080; font-weight: bold;">float</span> halfy<span style="color: #308080;">,</span>fy<span style="color: #406080;">;</span>
halfy <span style="color: #308080;">=</span> <span style="color: #308080;">(</span><span style="color: #200080; font-weight: bold;">float</span><span style="color: #308080;">)</span>WINL<span style="color: #308080;">/</span><span style="color: #008c00;">2</span><span style="color: #406080;">;</span>
fy <span style="color: #308080;">=</span> <span style="color: #308080;">(</span>y<span style="color: #308080;">)</span><span style="color: #308080;">/</span>halfy<span style="color: #406080;">;</span>
<span style="color: #200080; font-weight: bold;">return</span> fy<span style="color: #406080;">;</span>
<span style="color: #406080;">}</span>
<span style="color: #200080; font-weight: bold;">void</span> setup<span style="color: #308080;">(</span><span style="color: #308080;">)</span>
<span style="color: #406080;">{</span>
<span style="color: #400000;">glClearColor</span><span style="color: #308080;">(</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">,</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">,</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">,</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
<span style="color: #400000;">glClear</span><span style="color: #308080;">(</span>GL_COLOR_BUFFER_BIT<span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glutSwapBuffers<span style="color: #308080;">(</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
<span style="color: #406080;">}</span>
<span style="color: #200080; font-weight: bold;">void</span> display<span style="color: #308080;">(</span><span style="color: #308080;">)</span>
<span style="color: #406080;">{</span>
<span style="color: #200080; font-weight: bold;">int</span> i<span style="color: #406080;">;</span>
<span style="color: #200080; font-weight: bold;">for</span><span style="color: #308080;">(</span>i<span style="color: #308080;">=</span><span style="color: #008c00;">1</span><span style="color: #406080;">;</span>i<span style="color: #308080;"><</span><span style="color: #308080;">=</span><span style="color: #008c00;">3</span><span style="color: #406080;">;</span>i<span style="color: #308080;">+</span><span style="color: #308080;">+</span><span style="color: #308080;">)</span>
<span style="color: #406080;">{</span>
<span style="color: #400000;">glBegin</span><span style="color: #308080;">(</span>GL_LINE_STRIP<span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glColor3f<span style="color: #308080;">(</span><span style="color: green;">1.0</span><span style="color: #006600;">f</span><span style="color: #308080;">,</span><span style="color: green;">1.0</span><span style="color: #006600;">f</span><span style="color: #308080;">,</span><span style="color: green;">1.0</span><span style="color: #006600;">f</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glVertex3f<span style="color: #308080;">(</span>xmap<span style="color: #308080;">(</span><span style="color: #008c00;">0</span><span style="color: #308080;">)</span><span style="color: #308080;">,</span>ymap<span style="color: #308080;">(</span><span style="color: #008c00;">0</span><span style="color: #308080;">)</span><span style="color: #308080;">,</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glVertex3f<span style="color: #308080;">(</span>xmap<span style="color: #308080;">(</span><span style="color: #008c00;">0</span><span style="color: #308080;">)</span><span style="color: #308080;">,</span>ymap<span style="color: #308080;">(</span><span style="color: #008c00;">100</span><span style="color: #308080;">)</span><span style="color: #308080;">,</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glVertex3f<span style="color: #308080;">(</span>xmap<span style="color: #308080;">(</span><span style="color: #008c00;">50</span><span style="color: #308080;">)</span><span style="color: #308080;">,</span>ymap<span style="color: #308080;">(</span><span style="color: #008c00;">100</span><span style="color: #308080;">)</span><span style="color: #308080;">,</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glVertex3f<span style="color: #308080;">(</span>xmap<span style="color: #308080;">(</span><span style="color: #008c00;">50</span><span style="color: #308080;">)</span><span style="color: #308080;">,</span>ymap<span style="color: #308080;">(</span><span style="color: #008c00;">0</span><span style="color: #308080;">)</span><span style="color: #308080;">,</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glVertex3f<span style="color: #308080;">(</span>xmap<span style="color: #308080;">(</span><span style="color: #008c00;">150</span><span style="color: #308080;">)</span><span style="color: #308080;">,</span>ymap<span style="color: #308080;">(</span><span style="color: #008c00;">0</span><span style="color: #308080;">)</span><span style="color: #308080;">,</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glEnd<span style="color: #308080;">(</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glutSwapBuffers<span style="color: #308080;">(</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glTranslatef<span style="color: #308080;">(</span>xmap<span style="color: #308080;">(</span><span style="color: #008c00;">150</span><span style="color: #308080;">)</span><span style="color: #308080;">,</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">,</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
<span style="color: #406080;">}</span>
<span style="color: #406080;">}</span>
<span style="color: #200080; font-weight: bold;">int</span> <span style="color: #400000;">main</span><span style="color: #308080;">(</span><span style="color: #200080; font-weight: bold;">int</span> argc<span style="color: #308080;">,</span><span style="color: #200080; font-weight: bold;">char</span> <span style="color: #308080;">*</span> argv<span style="color: #308080;">[</span><span style="color: #308080;">]</span><span style="color: #308080;">)</span>
<span style="color: #406080;">{</span>
glutInitDisplayMode<span style="color: #308080;">(</span>GLUT_RGB <span style="color: #308080;">|</span> GLUT_DEPTH <span style="color: #308080;">|</span> GLUT_DOUBLE<span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glutInitWindowSize<span style="color: #308080;">(</span>WINW<span style="color: #308080;">,</span>WINL<span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glutCreateWindow<span style="color: #308080;">(</span><span style="color: maroon;">"</span><span style="color: #1060b6;">123techguide.blogspot.com</span><span style="color: maroon;">"</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
setup<span style="color: #308080;">(</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glutDisplayFunc<span style="color: #308080;">(</span>display<span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glutMainLoop<span style="color: #308080;">(</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
getch<span style="color: #308080;">(</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
<span style="color: #200080; font-weight: bold;">return</span> <span style="color: #008c00;">0</span><span style="color: #406080;">;</span>
<span style="color: #406080;">}</span>
</pre>
</body></html></pre>
</div>
<div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>adminhttp://www.blogger.com/profile/12903911477743613925noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-72601376301502743902013-05-24T20:13:00.000+05:302013-05-24T20:14:45.411+05:30Open GL : Geometric Primitive Names and Meanings<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div style="text-align: center;">
<span style="background-color: white; font-family: Arial, sans-serif;"><b><span style="font-size: large;">Geometric Primitive Names and
Meanings</span></b></span></div>
<table border="0" cellpadding="0" cellspacing="1" class="MsoNormalTable" style="mso-cellspacing: .7pt; mso-padding-alt: 6.0pt 6.0pt 6.0pt 6.0pt; mso-yfti-tbllook: 1184; width: 557px;">
<tbody>
<tr>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 32.06%;" valign="top" width="32%"><div align="center" class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: center;">
<u><b><span style="font-family: "Arial","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><span style="color: #3d85c6;">Value</span></span></b><span style="font-family: "Arial","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></u></div>
</td>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 67.44%;" valign="top" width="67%"><div align="center" class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: center;">
<b><span style="font-family: "Arial","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><span style="color: #0b5394;"><u>Meaning</u></span></span></b><span style="font-family: "Arial","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 32.06%;" valign="top" width="32%"><div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in;">
</div>
<ul>
<li><span style="font-family: Arial, sans-serif; font-size: 10pt;">GL_POINTS</span></li>
</ul>
<br /></td>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 67.44%;" valign="top" width="67%"><div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in;">
<span style="font-family: "Arial","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">Individual points<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 32.06%;" valign="top" width="32%"><div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in;">
</div>
<ul>
<li><span style="font-family: Arial, sans-serif; font-size: 10pt;">GL_LINES</span></li>
</ul>
</td>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 67.44%;" valign="top" width="67%"><div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in;">
<span style="font-family: "Arial","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">Pairs of vertices interpreted as individual line segments</span><br />
<a name='more'></a><span style="font-family: "Arial","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 32.06%;" valign="top" width="32%"><div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in;">
</div>
<ul>
<li><span style="font-family: Arial, sans-serif; font-size: 10pt;">GL_LINE_STRIP</span></li>
</ul>
<br /></td>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 67.44%;" valign="top" width="67%"><div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in;">
<span style="font-family: "Arial","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">Series of connected line segments<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 32.06%;" valign="top" width="32%"><div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in;">
</div>
<ul>
<li><span style="font-family: Arial, sans-serif; font-size: 10pt;">GL_LINE_LOOP</span></li>
</ul>
<br /></td>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 67.44%;" valign="top" width="67%"><div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in;">
<span style="font-family: "Arial","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">Same as above, with a segment added between last and first
vertices<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 32.06%;" valign="top" width="32%"><div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in;">
</div>
<ul>
<li><span style="font-family: Arial, sans-serif; font-size: 10pt;">GL_TRIANGLES</span></li>
</ul>
<br /></td>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 67.44%;" valign="top" width="67%"><div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in;">
<span style="font-family: "Arial","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">Triples of vertices interpreted as triangles<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 32.06%;" valign="top" width="32%"><div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in;">
</div>
<ul>
<li><span style="font-family: Arial, sans-serif; font-size: 10pt;">GL_TRIANGLE_STRIP</span></li>
</ul>
<br /></td>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 67.44%;" valign="top" width="67%"><div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in;">
<span style="font-family: "Arial","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">Linked strip of triangles<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 32.06%;" valign="top" width="32%"><div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in;">
</div>
<ul>
<li><span style="font-family: Arial, sans-serif; font-size: 10pt;">GL_TRIANGLE_FAN</span></li>
</ul>
<br /></td>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 67.44%;" valign="top" width="67%"><div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in;">
<span style="font-family: "Arial","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">Linked fan of triangles<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 32.06%;" valign="top" width="32%"><div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in;">
</div>
<ul>
<li><span style="font-family: Arial, sans-serif; font-size: 10pt;">GL_QUADS</span></li>
</ul>
<br /></td>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 67.44%;" valign="top" width="67%"><div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in;">
<span style="font-family: "Arial","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">Quadruples of vertices interpreted as four-sided polygons<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 32.06%;" valign="top" width="32%"><div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in;">
</div>
<ul>
<li><span style="font-family: Arial, sans-serif; font-size: 10pt;">GL_QUAD_STRIP</span></li>
</ul>
<br /></td>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 67.44%;" valign="top" width="67%"><div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in;">
<span style="font-family: "Arial","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">Linked strip of quadrilaterals<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 32.06%;" valign="top" width="32%"><div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in;">
</div>
<ul>
<li><span style="font-family: Arial, sans-serif; font-size: 10pt;">GL_POLYGON</span></li>
</ul>
<br /></td>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 67.44%;" valign="top" width="67%"><div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in;">
<span style="font-family: "Arial","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">Boundary of a simple, convex polygon<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 32.06%;" valign="top" width="32%"><div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in;">
<br /></div>
</td>
<td style="padding: 6.0pt 6.0pt 6.0pt 6.0pt; width: 67.44%;" valign="top" width="67%"><br />
<br />
<div class="MsoNormal" style="background: white; margin-bottom: .0001pt; margin-bottom: 0in; mso-line-height-alt: 9.75pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: .0001pt; margin-bottom: 0in; mso-line-height-alt: 9.75pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<br /></div>
</td>
</tr>
</tbody></table>
<br />
<div class="MsoNormal" style="background: white; margin-bottom: .0001pt; margin-bottom: 0in; mso-line-height-alt: 9.75pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="font-size: 12.0pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman";">void <b>glTranslatef (</b> GLfloat <i>x</i>,
GLfloat <i>y</i>, GLfloat <i>z</i> )</span><span style="font-size: 12pt; line-height: 15pt;">PARAMETERS</span><span style="font-size: 12pt;"> </span><i style="font-size: 12pt;">x</i><span style="font-size: 12pt;">, </span><i style="font-size: 12pt;">y</i><span style="font-size: 12pt;">, </span><i style="font-size: 12pt;">z</i></div>
<div class="MsoNormal" style="background: white; margin-bottom: .0001pt; margin-bottom: 0in; mso-line-height-alt: 9.75pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="font-size: 12.0pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman";"> Specify the <i>x</i>, <i>y</i>,
and <i>z</i> coordinates of a translation vector.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: .0001pt; margin-bottom: 0in; mso-line-height-alt: 9.75pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="font-size: 12.0pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman";"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: 15.0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 2;">
<span style="font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman";"><u><b>DESCRIPTION:</b></u><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: .0001pt; margin-bottom: 0in; mso-line-height-alt: 9.75pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="font-size: 12.0pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman";"> <b>glTranslate</b> produces a translation by (x,y,z). The current matrix (see</span><b style="font-size: 12pt;">glMatrixMode</b><span style="font-size: 12pt;">)</span><span style="font-size: 12pt;"> </span><span style="font-size: 12pt;">is
multiplied by this translation matrix, with the prod</span><span style="font-size: 12pt;">uct replacing the current matrix, as if </span><b style="font-size: 12pt;">glMultMatrix</b><span style="font-size: 12pt;"> were</span><span style="font-size: 12pt;"> </span><span style="font-size: 12pt;">called</span><span style="font-size: 12pt;">
</span><span style="font-size: 12pt;">with</span></div>
<div class="MsoNormal" style="background: white; margin-bottom: .0001pt; margin-bottom: 0in; mso-line-height-alt: 9.75pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="font-size: 12.0pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman";"> the following matrix for its argument:<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: .0001pt; margin-bottom: 0in; mso-line-height-alt: 9.75pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<br /></div>
<div class="MsoNormal" style="background: white; margin-bottom: .0001pt; margin-bottom: 0in; mso-line-height-alt: 9.75pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="font-size: 12.0pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman";"> 1 0 0 x<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: .0001pt; margin-bottom: 0in; mso-line-height-alt: 9.75pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="font-size: 12.0pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman";"> 0 1 0 y<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: .0001pt; margin-bottom: 0in; mso-line-height-alt: 9.75pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="font-size: 12.0pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman";"> 0 0 1 z<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: .0001pt; margin-bottom: 0in; mso-line-height-alt: 9.75pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="font-size: 12.0pt; mso-bidi-font-family: "Courier New"; mso-fareast-font-family: "Times New Roman";"> 0 0 0 1<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; margin-bottom: .0001pt; margin-bottom: 0in; mso-line-height-alt: 9.75pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<br /></div>
<br />
<br />
<br />
<br /></div>
<div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>Anonymoushttp://www.blogger.com/profile/11837588965426020130noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-34308554525033029122013-04-20T23:27:00.000+05:302013-04-20T23:27:43.581+05:30Open GL Setup<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoListParagraphCxSpFirst" style="mso-list: l0 level1 lfo1; text-indent: -.25in;">
</div>
<ol style="text-align: left;">
<li><span style="text-indent: -0.25in;">Copy OPENGL folder to </span><span style="text-indent: -0.25in;"> C</span><span style="text-indent: -0.25in;">:\</span></li>
<li><span style="font-family: Arial, sans-serif; font-size: 12pt; text-indent: -0.25in;"><span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><span style="font-family: Arial, sans-serif; font-size: 12pt; text-indent: -0.25in;">dynamically-linked libraries (place
in the \<b>Windows\System32)</b> subdirectory</span></li>
</ol>
<!--[if !supportLists]--><br />
<div class="MsoNormal" style="margin-left: 0.25in;">
<span style="font-family: "Arial","sans-serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> </span><a href="ftp://ftp.csis.gvsu.edu/wolffe/graphics/dll/opengl32.dll"><span style="color: blue; font-family: "Arial","sans-serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">opengl32.dll</span></a> , <a href="ftp://ftp.csis.gvsu.edu/wolffe/graphics/dll/glu32.dll"><span style="color: blue; font-family: "Arial","sans-serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">glu32.dll</span></a> , <a href="ftp://ftp.csis.gvsu.edu/wolffe/graphics/dll/glut32.dll"><span style="color: blue; font-family: "Arial","sans-serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">glut32.dll</span></a> , glut.dll</div>
<div class="MsoNormal" style="margin-left: 0.25in;">
<span style="font-family: Arial, sans-serif; font-size: 12pt; text-indent: -0.25in;"><br /></span></div>
<div class="MsoNormal" style="margin-left: 0.25in; text-indent: 0px;">
<span style="text-indent: -0.25in;">3. </span><span style="font-family: Arial, sans-serif; font-size: 12pt; text-indent: -0.25in;">Open Microsoft Visual C++</span></div>
<div class="MsoNormal" style="margin-left: 0.25in; text-indent: 0px;">
<span style="background-color: white; font-family: Arial, sans-serif; font-size: 12pt; text-indent: -0.25in;"><br /></span></div>
<div class="MsoNormal" style="margin-left: 0.25in; text-indent: 0px;">
</div>
<div class="MsoNormal" style="margin-left: 0.25in;">
</div>
<ul style="text-align: left;">
<li><span style="background-color: white; font-family: Arial, sans-serif; font-size: 12pt;">Create a new project:</span></li>
<li><span style="background-color: white; font-family: Arial, sans-serif; font-size: 12pt;">Choose </span><b style="font-family: Arial, sans-serif; font-size: 12pt;">File | New</b><span style="background-color: white; font-family: Arial, sans-serif; font-size: 12pt;"> from the File
Menu</span></li>
<li><span style="background-color: white; font-family: Arial, sans-serif; font-size: 12pt;">Select the </span><b style="font-family: Arial, sans-serif; font-size: 12pt;">Projects</b><span style="background-color: white; font-family: Arial, sans-serif; font-size: 12pt;"> tab</span></li>
<li><span style="background-color: white; font-family: Arial, sans-serif; font-size: 12pt;">Choose </span><b style="font-family: Arial, sans-serif; font-size: 12pt;">Win32 Console Application</b></li>
<li><span style="background-color: white; font-family: Arial, sans-serif; font-size: 12pt;">Fill in your Project name</span></li>
</ul>
<div>
<span style="font-family: Arial, sans-serif;"><a name='more'></a><br /></span></div>
<br />
<br />
<div>
<span style="font-family: Arial, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPBX0JdyvQGr9a0LYVYrSTHvEhgNLPPWJlkzSD9Ktk85XU72WS81-mJt-fFBGVggjtNf0uxqTxe0q462Eoup3g9Liex594T3IoQ3_pk-9n06KjzQt1iDpMiw3JhOsU8bob1M31OMDg01M/s1600/gl1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPBX0JdyvQGr9a0LYVYrSTHvEhgNLPPWJlkzSD9Ktk85XU72WS81-mJt-fFBGVggjtNf0uxqTxe0q462Eoup3g9Liex594T3IoQ3_pk-9n06KjzQt1iDpMiw3JhOsU8bob1M31OMDg01M/s1600/gl1.png" /></a></div>
<div>
<span style="font-family: "Arial","sans-serif"; font-size: 12.0pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-US; mso-no-proof: yes;"><br /><!--[endif]--></span></div>
<div>
<span style="font-family: "Arial","sans-serif"; font-size: 12.0pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-US; mso-no-proof: yes;"><br /></span></div>
<div>
<div class="MsoListParagraphCxSpFirst">
</div>
<ul style="text-align: left;">
<li><span style="font-family: Arial, sans-serif; font-size: 12pt;">Ok
, Finish , OK</span></li>
<li><span style="font-family: Arial, sans-serif; font-size: 12pt;">Click
on Tools- Options – </span><span style="font-family: "Arial","sans-serif"; font-size: 12.0pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-US;">Directories</span></li>
<li><span style="font-family: Arial, sans-serif; font-size: 12pt;">Add
Include and Library Directories</span></li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOqAsTLIorHcX7FrwlITSnHUTh7dE1CtZUXikgogzGQossEQvxcvxy9WYa9UcTSIrJgyukg1MvxVK0oMB-tE-S9XUdYx-vZ3dncJZKnUroaoLqUU9aZj2WXmfaEpdKiwwMGTh76sNUiPk/s1600/gl2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOqAsTLIorHcX7FrwlITSnHUTh7dE1CtZUXikgogzGQossEQvxcvxy9WYa9UcTSIrJgyukg1MvxVK0oMB-tE-S9XUdYx-vZ3dncJZKnUroaoLqUU9aZj2WXmfaEpdKiwwMGTh76sNUiPk/s1600/gl2.png" /></a></div>
<div>
<span style="font-family: Arial, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpzY7dlgRUuvZO5AewfYR4pPPxofBbrltQjFI_picxf5XMag7KNia6cEdahCAEqFnwKOhJ4NdljGY5EbJKQE0cYb7UQ5qcezLsgMDcpN7GtW7FTTSo6rvpdtIQsbUDlG9yZQwhueNGR7g/s1600/gl3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpzY7dlgRUuvZO5AewfYR4pPPxofBbrltQjFI_picxf5XMag7KNia6cEdahCAEqFnwKOhJ4NdljGY5EbJKQE0cYb7UQ5qcezLsgMDcpN7GtW7FTTSo6rvpdtIQsbUDlG9yZQwhueNGR7g/s1600/gl3.png" /></a></div>
<div>
<span style="font-family: Arial, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, sans-serif;"><br /></span></div>
<div>
<div class="MsoListParagraphCxSpFirst">
</div>
<ul style="text-align: left;">
<li>Now the Library and include directories are
mentioned.</li>
</ul>
<br />
<div class="MsoListParagraphCxSpMiddle">
</div>
<ul style="text-align: left;">
<li>Then Click on PROJECT – Settings – Link</li>
<li><o:p> </o:p>Then place the cursor on Object / Library
Modules</li>
<li>Press End which will place the cursor at
end.</li>
</ul>
<br />
<div class="MsoListParagraphCxSpMiddle">
</div>
<ul style="text-align: left;">
<li>And paste this:</li>
</ul>
<br />
<div class="MsoListParagraphCxSpMiddle">
<span style="background-color: white; font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"><span style="color: #cc0000;"> GLAUX.LIB GLU32.LIB glut32.lib glut.lib
OPENGL32.LIB<o:p></o:p></span></span></div>
<div class="MsoListParagraphCxSpMiddle">
<br /></div>
<div class="MsoListParagraphCxSpMiddle">
<span style="background-color: white; font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"><span style="color: #cc0000;"> And press OK. Now you are ready to use it.</span></span></div>
<div class="MsoListParagraphCxSpMiddle">
<span style="background-color: white; font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"><span style="color: #cc0000;"><br /></span></span></div>
<div class="MsoListParagraphCxSpMiddle">
<span style="background-color: white; font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"><span style="color: #cc0000;"><br /></span></span></div>
<div class="MsoListParagraphCxSpMiddle">
<span style="background-color: white; font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"><span style="color: #cc0000;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipTbAKKOhSzrsr6gv8qQ9D7O-hrUEDeVsMrA6QKrvQBnZFKfGzolK9bsKAfcIF6M5GaqoA_eQU8qKDbIJHoRvx-s7Q9IbNHGsVwQdnkt-webp4dIBEX4YKVISBdE1P2HOcKnM_tag7mFw/s1600/gl4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipTbAKKOhSzrsr6gv8qQ9D7O-hrUEDeVsMrA6QKrvQBnZFKfGzolK9bsKAfcIF6M5GaqoA_eQU8qKDbIJHoRvx-s7Q9IbNHGsVwQdnkt-webp4dIBEX4YKVISBdE1P2HOcKnM_tag7mFw/s1600/gl4.png" /></a></div>
<div class="MsoListParagraphCxSpMiddle">
<span style="background-color: white; font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"><span style="color: #cc0000;"><br /></span></span></div>
<div class="MsoListParagraphCxSpLast">
<br /></div>
</div>
<br />
</div>
<!--[if !supportLists]--><br />
</div>
<div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>Anonymoushttp://www.blogger.com/profile/11837588965426020130noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-22910372442800977302013-01-17T13:31:00.000+05:302013-01-17T13:35:51.854+05:30Draw a Filled Polygon : OpenGL / Graph Programme<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjitgWtr2y9Nnt1OB0ZWZ6l-Km8p5m_QUsLx07G2JlGzS3I2kCt8ur0uP3_BaL5PQy8usySQG1LYHOfJWWsDWN-yBN0prdYAAplsfsXVY4XGbB7RUXG_6wPs6vMXBmZ0erqO28p6GSlkyQ/s1600/g1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjitgWtr2y9Nnt1OB0ZWZ6l-Km8p5m_QUsLx07G2JlGzS3I2kCt8ur0uP3_BaL5PQy8usySQG1LYHOfJWWsDWN-yBN0prdYAAplsfsXVY4XGbB7RUXG_6wPs6vMXBmZ0erqO28p6GSlkyQ/s400/g1.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<a name='more'></a><br /><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrmv4YHeg_eG8IM-vc4QG972AAg0gsCSXksKqwXm7_hx-UE0VshSN4nIMRFP-4onCeB96uLO_gwfgF034v_3-VXO8SA7mFPR_0hPoqw9Od6vyovy1N7xtH6NAtOVNgKXcDdlxMdVyFJuA/s1600/graph1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="144" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrmv4YHeg_eG8IM-vc4QG972AAg0gsCSXksKqwXm7_hx-UE0VshSN4nIMRFP-4onCeB96uLO_gwfgF034v_3-VXO8SA7mFPR_0hPoqw9Od6vyovy1N7xtH6NAtOVNgKXcDdlxMdVyFJuA/s320/graph1.PNG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<pre style="background: #f6f8ff; color: #000020;"><span style="color: #004a43;">#</span><span style="color: #004a43;">include </span><span style="color: maroon;"><</span><span style="color: #40015a;">windows.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include </span><span style="color: maroon;"><</span><span style="color: #40015a;">stdio.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include </span><span style="color: maroon;"><</span><span style="color: #40015a;">conio.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include </span><span style="color: maroon;"><</span><span style="color: #40015a;">iostream.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include </span><span style="color: maroon;"><</span><span style="color: #40015a;">stdlib.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include </span><span style="color: maroon;"><</span><span style="color: #40015a;">glut.h</span><span style="color: maroon;">></span>
<span style="color: #200080; font-weight: bold;">void</span> myInit<span style="color: #308080;">(</span><span style="color: #200080; font-weight: bold;">void</span><span style="color: #308080;">)</span>
<span style="color: #406080;">{</span>
<span style="color: #400000;">glClearColor</span><span style="color: #308080;">(</span><span style="color: green;">1.0</span><span style="color: #308080;">,</span><span style="color: green;">1.0</span><span style="color: #308080;">,</span><span style="color: green;">1.0</span><span style="color: #308080;">,</span><span style="color: green;">0.0</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glColor3f<span style="color: #308080;">(</span><span style="color: green;">1.0</span><span style="color: #006600;">f</span><span style="color: #308080;">,</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">,</span><span style="color: green;">0.0</span><span style="color: #006600;">f</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
<span style="color: #400000;">glPointSize</span><span style="color: #308080;">(</span><span style="color: green;">4.0</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
<span style="color: #400000;">glMatrixMode</span><span style="color: #308080;">(</span>GL_PROJECTION<span style="color: #308080;">)</span><span style="color: #406080;">;</span>
<span style="color: #400000;">glLoadIdentity</span><span style="color: #308080;">(</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
<span style="color: #400000;">gluOrtho2D</span><span style="color: #308080;">(</span><span style="color: green;">0.0</span><span style="color: #308080;">,</span><span style="color: green;">800.0</span><span style="color: #308080;">,</span><span style="color: green;">0.0</span><span style="color: #308080;">,</span><span style="color: green;">600.0</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
<span style="color: #406080;">}</span>
<span style="color: #200080; font-weight: bold;">void</span> myDisplay<span style="color: #308080;">(</span><span style="color: #200080; font-weight: bold;">void</span><span style="color: #308080;">)</span>
<span style="color: #406080;">{</span>
<span style="color: #400000;">glClear</span><span style="color: #308080;">(</span>GL_COLOR_BUFFER_BIT<span style="color: #308080;">)</span><span style="color: #406080;">;</span>
<span style="color: #400000;">glBegin</span><span style="color: #308080;">(</span>GL_POLYGON<span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glVertex2i<span style="color: #308080;">(</span><span style="color: #008c00;">100</span><span style="color: #308080;">,</span><span style="color: #008c00;">100</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glVertex2i<span style="color: #308080;">(</span><span style="color: #008c00;">100</span><span style="color: #308080;">,</span><span style="color: #008c00;">300</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glVertex2i<span style="color: #308080;">(</span><span style="color: #008c00;">400</span><span style="color: #308080;">,</span><span style="color: #008c00;">300</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glVertex2i<span style="color: #308080;">(</span><span style="color: #008c00;">600</span><span style="color: #308080;">,</span><span style="color: #008c00;">150</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glVertex2i<span style="color: #308080;">(</span><span style="color: #008c00;">400</span><span style="color: #308080;">,</span><span style="color: #008c00;">100</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glEnd<span style="color: #308080;">(</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
<span style="color: #400000;">glFlush</span><span style="color: #308080;">(</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
<span style="color: #406080;">}</span>
<span style="color: #200080; font-weight: bold;">int</span> <span style="color: #400000;">main</span><span style="color: #308080;">(</span><span style="color: #200080; font-weight: bold;">int</span> argc<span style="color: #308080;">,</span><span style="color: #200080; font-weight: bold;">char</span> <span style="color: #308080;">*</span> argv<span style="color: #308080;">[</span><span style="color: #308080;">]</span><span style="color: #308080;">)</span>
<span style="color: #406080;">{</span>
glutInit<span style="color: #308080;">(</span><span style="color: #308080;">&</span>argc<span style="color: #308080;">,</span>argv<span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glutInitDisplayMode<span style="color: #308080;">(</span>GLUT_SINGLE<span style="color: #308080;">|</span>GLUT_RGB<span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glutInitWindowSize<span style="color: #308080;">(</span><span style="color: #008c00;">800</span><span style="color: #308080;">,</span><span style="color: #008c00;">600</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glutInitWindowPosition<span style="color: #308080;">(</span><span style="color: #008c00;">100</span><span style="color: #308080;">,</span><span style="color: #008c00;">100</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glutCreateWindow<span style="color: #308080;">(</span><span style="color: maroon;">"</span><span style="color: #1060b6;">opengl Window</span><span style="color: maroon;">"</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glutDisplayFunc<span style="color: #308080;">(</span>myDisplay<span style="color: #308080;">)</span><span style="color: #406080;">;</span>
myInit<span style="color: #308080;">(</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
glutMainLoop<span style="color: #308080;">(</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
getch<span style="color: #308080;">(</span><span style="color: #308080;">)</span><span style="color: #406080;">;</span>
<span style="color: #200080; font-weight: bold;">return</span> <span style="color: #008c00;">0</span><span style="color: #406080;">;</span>
<span style="color: #406080;">}</span>
</pre>
<br /></div>
<div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>Anonymoushttp://www.blogger.com/profile/11837588965426020130noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-6519225460174189402012-07-18T15:29:00.000+05:302012-07-19T15:14:24.073+05:30Print The Number Following Patttern<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Arial, Helvetica, sans-serif;">Shell script print the number following pattern</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">1</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">2 2</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">3 3 3</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">4 4 4 4</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">5 5 5 5 5</span><br />
<a name='more'></a><br />
<br />
<pre style="background: #f6f8ff; color: #000020;">#<span style="color: #308080;">!</span><span style="color: maroon;">/</span><span style="color: #1060b6;">bin</span><span style="color: maroon;">/</span>bash
clear
i<span style="color: #308080;">=</span><span style="color: #008c00;">1</span>
<span style="color: #200080; font-weight: bold;">while</span> <span style="color: #308080;">[</span> $i <span style="color: #308080;">-</span>le <span style="color: #008c00;">5</span> <span style="color: #308080;">]</span>
<span style="color: #200080; font-weight: bold;">do</span>
n<span style="color: #308080;">=</span><span style="color: #008c00;">1</span>
<span style="color: #200080; font-weight: bold;">while</span> <span style="color: #308080;">[</span> $n <span style="color: #308080;">-</span>le $i <span style="color: #308080;">]</span>
<span style="color: #200080; font-weight: bold;">do</span>
echo <span style="color: maroon;">"</span><span style="color: #1060b6;"> $i </span><span style="color: #0f69ff;">\c</span><span style="color: #1060b6;"> </span><span style="color: maroon;">"</span>
n<span style="color: #308080;">=</span>`expr $n <span style="color: #308080;">+</span> <span style="color: #008c00;">1</span> `
done
echo <span style="color: maroon;">"</span><span style="color: #0f69ff;">\n</span><span style="color: maroon;">"</span>
i<span style="color: #308080;">=</span>`expr $i <span style="color: #308080;">+</span> <span style="color: #008c00;">1</span> `
done
</pre>
<br />
<br /></div><div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>Anonymoushttp://www.blogger.com/profile/11837588965426020130noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-22610010498009171622012-07-16T12:12:00.001+05:302012-07-16T12:21:15.261+05:30Shell Script--Character Replace By Next Character<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Write a shell script to encrypt the content of a file using logic .<br />
<br />
(i) Replace a character by just next character in the cycle for example <span style="background-color: white;">A by B ( or a by b), B by C (or b by c), Y by Z (or y by z), Z by A ( or z by a).</span><br />
<span style="background-color: white;"><br /></span><br />
(ii) Leave numbers and any other symbols unchanged.<br />
<a name='more'></a><br />
<br />
<pre style="background: #f6f8ff; color: #000020;">#<span style="color: #308080;">!</span><span style="color: maroon;">/</span><span style="color: #1060b6;">bin</span><span style="color: maroon;">/</span>bash
str<span style="color: #308080;">=</span><span style="color: maroon;">"</span><span style="color: maroon;">"</span>
echo <span style="color: maroon;">"</span><span style="color: #1060b6;"> enter a file name </span><span style="color: maroon;">"</span>
read str
cat $str <span style="color: #308080;">|</span> tr <span style="color: #1060b6;">'[abcdefghijklmnopqrstuvwxyz]'</span> <span style="color: #1060b6;">'[bcdefghijklmnopqrstuvwxyza]'</span> <span style="color: #308080;">|</span> tr <span style="color: #1060b6;">'[ABCDEFGHIJKLMNOPQRSTUVWXUZ]'</span> <span style="color: #1060b6;">'[BCDEFGHIJKLMNOPQRSTUVWXUZA]'</span> <span style="color: #308080;">></span>output<span style="color: #308080;">.</span>txt
cat output<span style="color: #308080;">.</span>txt
</pre>
<br />
<br />
<div>
<br /></div>
</div><div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>Anonymoushttp://www.blogger.com/profile/11837588965426020130noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-81843940224741067352012-07-16T11:31:00.000+05:302012-07-16T11:31:07.988+05:30Print Message According to System's Time --Shell Script<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Arial, Helvetica, sans-serif;"><br class="Apple-interchange-newline" /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">Write a shell script that prints the message "Good Morning", "Good After Noon", <span style="background-color: white;">"Good Evening", or " Good night " according to the system's time.</span></span><br />
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<pre style="background: #f6f8ff; color: #000020;"><span style="font-family: Arial, Helvetica, sans-serif;">#<span style="color: #308080;">!</span><span style="color: maroon;">/</span><span style="color: #1060b6;">bin</span><span style="color: maroon;">/</span>bash
t<span style="color: #308080;">=</span><span style="color: maroon;">"</span><span style="color: maroon;">"<a name='more'></a></span>
t<span style="color: #308080;">=</span>`echo $<span style="color: #308080;">(</span>date <span style="color: #308080;">+</span><span style="color: maroon;">"</span><span style="color: #1060b6;">%H</span><span style="color: maroon;">"</span><span style="color: #308080;">)</span> `
<span style="color: #200080; font-weight: bold;">if</span> <span style="color: #308080;">[</span> $t <span style="color: #308080;">-</span>le <span style="color: #008c00;">10</span> <span style="color: #308080;">-</span>a $t <span style="color: #308080;">-</span>ge <span style="color: #008c00;">6</span> <span style="color: #308080;">]</span>
then
echo <span style="color: maroon;">"</span><span style="color: #1060b6;"> Good morning </span><span style="color: maroon;">"</span>
elif <span style="color: #308080;">[</span> $t <span style="color: #308080;">-</span>gt <span style="color: #008c00;">10</span> <span style="color: #308080;">-</span>a $t <span style="color: #308080;">-</span>le <span style="color: #008c00;">16</span> <span style="color: #308080;">]</span>
then
echo <span style="color: maroon;">"</span><span style="color: #1060b6;"> good after noon</span><span style="color: maroon;">"</span>
elif <span style="color: #308080;">[</span> $t <span style="color: #308080;">-</span>gt <span style="color: #008c00;">16</span> <span style="color: #308080;">-</span>a $t <span style="color: #308080;">-</span>le <span style="color: #008c00;">20</span> <span style="color: #308080;">]</span>
then
echo <span style="color: maroon;">"</span><span style="color: #1060b6;">good evening </span><span style="color: maroon;">"</span>
elif <span style="color: #308080;">[</span> $t <span style="color: #308080;">-</span>gt <span style="color: #008c00;">20</span> <span style="color: #308080;">-</span>a $t <span style="color: #308080;">-</span>le <span style="color: #008c00;">5</span> <span style="color: #308080;">]</span>
then
echo <span style="color: maroon;">"</span><span style="color: #1060b6;"> good night </span><span style="color: maroon;">"</span>
fi
</span></pre>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="background-color: white;"><br /></span></div><div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>Anonymoushttp://www.blogger.com/profile/11837588965426020130noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-46601571104115522662012-07-11T22:36:00.001+05:302012-07-11T22:37:59.193+05:30Test Your Anti-Virus Using Notepad<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif;">You can easily test your Anti-virus program with a simple notepad trick.You can test your Anti-virus effectiveness using a simple notepad code.Follow the steps below :-</span></div>
<div style="text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<ol style="text-align: left;">
<li><span style="background-color: white; font-family: Arial, Helvetica, sans-serif;">Open notepad.</span></li>
<li><span style="background-color: white; font-family: Arial, Helvetica, sans-serif;">Copy and paste the code below in notepad .<a name='more'></a></span></li>
<li><span style="color: red;"><span style="background-color: white; font-family: Arial, Helvetica, sans-serif;"><span style="background-color: #f6f6f6; font-size: 14px; font-style: italic; line-height: 18px; text-align: justify;">X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*</span> </span></span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white;">Save file as </span><span style="color: #3d85c6;">check-antivirus.bat </span><span style="background-color: white;">(*.bat).</span></span></li>
</ol>
<span style="font-family: Arial, Helvetica, sans-serif;">After sometime scan your file with your antivirus .If your anti-virus program detect the file a virus,then you sure that your anti-virus program is working properly.</span><br />
<ol style="text-align: left;">
</ol>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">If not detect the file a virus , this is a right time change your anti-virus .</span></div>
<div>
<br /></div>
</div><div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>Anonymoushttp://www.blogger.com/profile/11837588965426020130noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-63859724288299638782012-07-07T16:17:00.002+05:302012-07-07T16:27:50.722+05:30Windows Useful Run Commands<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Verdana, sans-serif;"><span style="font-size: 13px; line-height: 19px; text-align: justify;">Most useful commands which you can use on</span><span class="apple-converted-space" style="font-size: 13px; line-height: 19px; text-align: justify;"> </span><b style="font-size: 13px; line-height: 19px; text-align: justify;"><i>Run Panel</i></b><span class="apple-converted-space" style="font-size: 13px; line-height: 19px; text-align: justify;"> </span><span style="font-size: 13px; line-height: 19px; text-align: justify;">in Windows . You can start</span><span class="apple-converted-space" style="font-size: 13px; line-height: 19px; text-align: justify;"> </span><b style="font-size: 13px; line-height: 19px; text-align: justify;"><i>Run</i></b><span class="apple-converted-space" style="font-size: 13px; line-height: 19px; text-align: justify;"> </span><span style="font-size: 13px; line-height: 19px; text-align: justify;">instantly by pressing [</span><b style="font-size: 13px; line-height: 19px; text-align: justify;"><i><span style="color: #3d85c6;">Windows logo Key </span>(<span style="color: #3d85c6;">keyboard</span>)<span style="color: #3d85c6;"> + R</span></i></b><span style="font-size: 13px; line-height: 19px; text-align: justify;">].</span>
</span><br />
<br />
<br />
<table border="0" cellpadding="1" cellspacing="5" style="background-color: white; color: #101010; font-family: helvetica, georgia, sans-serif; font-size: 14px; line-height: 23px; text-align: left; width: 650px;"><tbody>
<tr style="height: 15pt;"><td style="height: 15pt; width: 270pt;" width="325"><b><span style="color: #3d85c6;"><u>Work</u></span></b></td><td style="width: 270pt;" width="325"><span style="color: #0b5394;"><u><b>Run Command</b></u></span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt; width: 270pt;" width="325"><span style="background-color: white;">Accessibility Controls </span></td><td style="width: 270pt;" width="325"><span style="background-color: white;">access.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Accessibility Wizard</span></td><td><span style="background-color: white;">accwiz</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Add Hardware Wizard</span></td><td><span style="background-color: white;">hdwwiz.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Add/Remove Programs</span></td><td><span style="background-color: white;">appwiz.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><br />
<a name='more'></a><br />
<br />
<span style="background-color: white;">Administrative Tool</span></td><td><span style="background-color: white;"><br /></span><br />
<span style="background-color: white;"><br /></span><br />
<span style="background-color: white;">control admintools</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Adobe Acrobat ( if installed )</span></td><td><span style="background-color: white;">acrobat</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Adobe Distiller ( if installed )</span></td><td><span style="background-color: white;">acrodist</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Adobe ImageReady ( if installed )</span></td><td><span style="background-color: white;">imageready</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Adobe Photoshop ( if installed )</span></td><td><span style="background-color: white;">photoshop</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Automatic Updates</span></td><td><span style="background-color: white;">wuaucpl.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Basic Media Player</span></td><td><span style="background-color: white;">mplay32</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Bluetooth Transfer Wizard</span></td><td><span style="background-color: white;">fsquirt</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Calculator</span></td><td><span style="background-color: white;">calc</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Ccleaner ( if installed )</span></td><td><span style="background-color: white;">ccleaner</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">C: Drive</span></td><td><span style="background-color: white;">c:</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Certificate Manager</span></td><td><span style="background-color: white;">cdrtmgr.msc</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Character Map</span></td><td><span style="background-color: white;">charmap</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Check Disk Utility</span></td><td><span style="background-color: white;">chkdsk</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Clipboard Viewer</span></td><td><span style="background-color: white;">clipbrd</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Command Prompt</span></td><td><span style="background-color: white;">cmd</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Command Prompt</span></td><td><span style="background-color: white;">command</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Component Services</span></td><td><span style="background-color: white;">dcomcnfg</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Computer Management</span></td><td><span style="background-color: white;">compmgmt.msc</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Compare Files</span></td><td><span style="background-color: white;">comp</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Control Panel</span></td><td><span style="background-color: white;">control</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Create a shared folder Wizard</span></td><td><span style="background-color: white;">shrpubw</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Date and Time Properties</span></td><td><span style="background-color: white;">timedate.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">DDE Shares</span></td><td><span style="background-color: white;">ddeshare</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Device Manager</span></td><td><span style="background-color: white;">devmgmt.msc</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Direct X Control Panel ( if installed )</span></td><td><span style="background-color: white;">directx.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Direct X Troubleshooter</span></td><td><span style="background-color: white;">dxdiag</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Disk Cleanup Utility</span></td><td><span style="background-color: white;">cleanmgr</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Disk Defragment</span></td><td><span style="background-color: white;">dfrg.msc</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Disk Partition Manager</span></td><td><span style="background-color: white;">diskmgmt.msc</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Display Properties</span></td><td><span style="background-color: white;">control desktop</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Display Properties</span></td><td><span style="background-color: white;">desk.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Display Properties (w/Appearance Tab Preselected )</span></td><td><span style="background-color: white;">control color</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Dr. Watson System Troubleshooting Utility</span></td><td><span style="background-color: white;">drwtsn32</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Driver Verifier Utility</span></td><td><span style="background-color: white;">verifier</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Ethereal ( if installed ) </span></td><td><span style="background-color: white;">ethereal</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Event Viewer</span></td><td><span style="background-color: white;">eventvwr.msc</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Files and Settings Transfer Tool</span></td><td><span style="background-color: white;">migwiz</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">File Signature Verification Tool</span></td><td><span style="background-color: white;">sigverif</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Findfast</span></td><td><span style="background-color: white;">findfast.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Firefox</span></td><td><span style="background-color: white;">firefox</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Folders Properties</span></td><td><span style="background-color: white;">control folders</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Fonts</span></td><td><span style="background-color: white;">fonts</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Fonts Folder</span></td><td><span style="background-color: white;">fonts</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Free Cell Card Game</span></td><td><span style="background-color: white;">freecell</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Game Controllers</span></td><td><span style="background-color: white;">joy.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Group Policy Editor ( xp pro )</span></td><td><span style="background-color: white;">gpedit.msc</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Hearts Card Game</span></td><td><span style="background-color: white;">mshearts</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Help and Support</span></td><td><span style="background-color: white;">helpctr</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Hyperterminal</span></td><td><span style="background-color: white;">hypertrm</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Hotline Client</span></td><td><span style="background-color: white;">hotlineclient</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Iexpress Wizard</span></td><td><span style="background-color: white;">iexpress</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Indexing Service</span></td><td><span style="background-color: white;">ciadv.msc</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Internet Connection Wizard</span></td><td><span style="background-color: white;">icwonn1</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Internet Properties</span></td><td><span style="background-color: white;">inetcpl.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Internet Setup Wizard</span></td><td><span style="background-color: white;">inetwiz</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">IP Configuration (Display Connection Configuration)</span></td><td><span style="background-color: white;">ipconfig /all</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">IP Configuration (Display DNS Cache Contents)</span></td><td><span style="background-color: white;">ipconfig /displaydns</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">IP Configuration (Delete DNS Cache Contents)</span></td><td><span style="background-color: white;">ipconfig /flushdns</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">IP Configuration (Release All Connections)</span></td><td><span style="background-color: white;">ipconfig /release</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">IP Configuration (Renew All Connections)</span></td><td><span style="background-color: white;">ipconfig /renew</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">IP Configuration (Refreshes DHCP & Re-Registers DNS)</span></td><td><span style="background-color: white;">ipconfig /registerdns</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">IP Configuration (Display DHCP Class ID)</span></td><td><span style="background-color: white;">ipconfig /showclassid</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">IP Configuration (Modifies DHCP Class ID)</span></td><td><span style="background-color: white;">ipconfig /setclassid</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Java Control Panel ( if installed )</span></td><td><span style="background-color: white;">jpicpl32.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Java Control Panel ( if installed )</span></td><td><span style="background-color: white;">javaws</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Keyboard Properties</span></td><td><span style="background-color: white;">control keyboard</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Local Security Settings</span></td><td><span style="background-color: white;">secpol.msc</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Local Users and Groups</span></td><td><span style="background-color: white;">lusrmgr.msc</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Logs You Out of Windows</span></td><td><span style="background-color: white;">logoff</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Malicious Software Removal Tool</span></td><td><span style="background-color: white;">mrt</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Microsoft Access ( if installed )</span></td><td><span style="background-color: white;">access.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Microsoft Chat</span></td><td><span style="background-color: white;">winchat</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Microsoft Excel ( if installed )</span></td><td><span style="background-color: white;">excel</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Microsoft Diskpart</span></td><td><span style="background-color: white;">diskpart</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Microsoft Frontpage ( if installed )</span></td><td><span style="background-color: white;">frontpg</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Microsoft Movie Maker</span></td><td><span style="background-color: white;">moviemk</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Microsoft Management Console</span></td><td><span style="background-color: white;">mmc</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Microsoft Narrator</span></td><td><span style="background-color: white;">narrator</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Microsoft Paint</span></td><td><span style="background-color: white;">mspaint</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Microsoft Powerpoint</span></td><td><span style="background-color: white;">powerpnt</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Microsoft Word ( if installed )</span></td><td><span style="background-color: white;">winword</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Microsoft Syncronization Tool</span></td><td><span style="background-color: white;">mobsync</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Minesweeper Game</span></td><td><span style="background-color: white;">winmine</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Mouse Properties</span></td><td><span style="background-color: white;">control mouse</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Mouse Properties</span></td><td><span style="background-color: white;">main.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">MS-Dos Editor</span></td><td><span style="background-color: white;">edit</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">MS-Dos FTP</span></td><td><span style="background-color: white;">ftp</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Nero ( if installed )</span></td><td><span style="background-color: white;">nero</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Netmeeting</span></td><td><span style="background-color: white;">conf</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Network Connections</span></td><td><span style="background-color: white;">control netconnections</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;"></span><br />
<span style="background-color: white;">Network Connections</span></td><td><span style="background-color: white;">ncpa.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Network Setup Wizard</span></td><td><span style="background-color: white;">netsetup.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Notepad</span></td><td><span style="background-color: white;">notepad</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Nview Desktop Manager ( if installed )</span></td><td><span style="background-color: white;">nvtuicpl.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Object Packager</span></td><td><span style="background-color: white;">packager</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">ODBC Data Source Administrator</span></td><td><span style="background-color: white;">odbccp32</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">ODBC Data Source Administrator</span></td><td><span style="background-color: white;">odbccp32.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">On Screen Keyboard</span></td><td><span style="background-color: white;">osk</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Opens AC3 Filter ( if installed )</span></td><td><span style="background-color: white;">ac3filter.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Outlook Express</span></td><td><span style="background-color: white;">msimn</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Paint</span></td><td><span style="background-color: white;">pbrush</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Password Properties</span></td><td><span style="background-color: white;">password.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Performance Monitor</span></td><td><span style="background-color: white;">perfmon.msc</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Performance Monitor</span></td><td><span style="background-color: white;">perfmon</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Phone and Modem Options</span></td><td><span style="background-color: white;">telephon.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Phone Dialer</span></td><td><span style="background-color: white;">dialer</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Pinball Game</span></td><td><span style="background-color: white;">pinball</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Power Configuration</span></td><td><span style="background-color: white;">powercfg.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Printers and Faxes</span></td><td><span style="background-color: white;">control printers</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Printers Folder</span></td><td><span style="background-color: white;">printers</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Private Characters Editor</span></td><td><span style="background-color: white;">eudcedit</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Quicktime ( if installed )</span></td><td><span style="background-color: white;">quicktime.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Quicktime Player ( if installed )</span></td><td><span style="background-color: white;">quicktimeplayer</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Real Player ( if installed ) </span></td><td><span style="background-color: white;">realplay</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Regional Settings</span></td><td><span style="background-color: white;">intl.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Registry Editor</span></td><td><span style="background-color: white;">regedit</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Registry Editor</span></td><td><span style="background-color: white;">regedit32</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Remote Access Phonebook</span></td><td><span style="background-color: white;">rasphone</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Remote Desktop</span></td><td><span style="background-color: white;">mstsc</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Removable Storage</span></td><td><span style="background-color: white;">ntmsmgr.msc</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Removable Storage Operator Requests</span></td><td><span style="background-color: white;">ntmsoprq.msc</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Resultant Set of Policy ( xp pro )</span></td><td><span style="background-color: white;">rsop.msc</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Scanners and Cameras</span></td><td><span style="background-color: white;">sticpl.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Scheduled Tasks</span></td><td><span style="background-color: white;">control schedtasks</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Security Center</span></td><td><span style="background-color: white;">wscui.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Services</span></td><td><span style="background-color: white;">services.msc</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Shared Folders</span></td><td><span style="background-color: white;">fsmgmt.msc</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Sharing Session</span></td><td><span style="background-color: white;">rtcshare</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Shuts Down Windows </span></td><td><span style="background-color: white;">shutdown</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Sounds Recorder</span></td><td><span style="background-color: white;">sndrec32</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Sounds and Audio</span></td><td><span style="background-color: white;">mmsys.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Spider Solitare Card Game</span></td><td><span style="background-color: white;">spider</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">SQL Client Configuration</span></td><td><span style="background-color: white;">clicongf</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">System Configuration Editor</span></td><td><span style="background-color: white;">sysedit</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">System Configuration Utility</span></td><td><span style="background-color: white;">msconfig</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">System File Checker Utility ( Scan Immediately )</span></td><td><span style="background-color: white;">sfc /scannow</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">System File Checker Utility ( Scan Once At Next Boot )</span></td><td><span style="background-color: white;">sfc /scanonce</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">System File Checker Utility ( Scan On Every Boot )</span></td><td><span style="background-color: white;">sfc /scanboot</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">System File Checker Utility ( Return to Default Settings)</span></td><td><span style="background-color: white;">sfc /revert</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">System File Checker Utility ( Purge File Cache )</span></td><td><span style="background-color: white;">sfc /purgecache</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">System File Checker Utility ( Set Cache Size to Size x )</span></td><td><span style="background-color: white;">sfc /cachesize=x</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">System Information</span></td><td><span style="background-color: white;">msinfo32</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">System Properties</span></td><td><span style="background-color: white;">sysdm.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Task Manager</span></td><td><span style="background-color: white;">taskmgr</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">TCP Tester</span></td><td><span style="background-color: white;">tcptest</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Telnet Client</span></td><td><span style="background-color: white;">telnet</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Tweak UI ( if installed )</span></td><td><span style="background-color: white;">tweakui</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">User Account Management </span></td><td><span style="background-color: white;">nusrmgr.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Utility Manager</span></td><td><span style="background-color: white;">utilman</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Volume Serial Number for C:</span></td><td><span style="background-color: white;">label</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Volume Control</span></td><td><span style="background-color: white;">sndvol32</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Windows Address Book</span></td><td><span style="background-color: white;">wab</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Windows Address Book Import Utility</span></td><td><span style="background-color: white;">wabmig</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Windows Backup Utility ( if installed )</span></td><td><span style="background-color: white;">ntbackup</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Windows Explorer</span></td><td><span style="background-color: white;">explorer</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Windows Firewall</span></td><td><span style="background-color: white;">firewall.cpl</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Windows Installer Details</span></td><td><span style="background-color: white;">msiexec</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Windows Magnifier</span></td><td><span style="background-color: white;">magnify</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Windows Management Infrastructure</span></td><td><span style="background-color: white;">wmimgmt.msc</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Windows Media Player</span></td><td><span style="background-color: white;">wmplayer</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Windows Messenger</span></td><td><span style="background-color: white;">msnsgs</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Windows Picture Import Wizard (Need camera connected)</span></td><td><span style="background-color: white;">wiaacmgr</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Windows System Security Tool</span></td><td><span style="background-color: white;">syskey</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Windows Script host settings</span></td><td><span style="background-color: white;">wscript</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Widnows Update Launches</span></td><td><span style="background-color: white;">wupdmgr</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Windows Version ( shows your windows version )</span></td><td><span style="background-color: white;">winver</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Windows XP Tour Wizard</span></td><td><span style="background-color: white;">tourstart</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Wordpad</span></td><td><span style="background-color: white;">write</span></td></tr>
<tr style="height: 15pt;"><td style="height: 15pt;"><span style="background-color: white;">Zoom Utility</span></td><td><span style="background-color: white;">igfxzoom</span></td></tr>
</tbody></table>
</div><div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>Anonymoushttp://www.blogger.com/profile/11837588965426020130noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-91829716515037306342012-07-06T23:10:00.000+05:302012-07-06T23:10:27.834+05:30Online Compile -- c, c++,D,Haskell,Lua,Ocaml,php,perl,Plain text,python,ruby,scheme,tcl<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
<span style="font-family: 'Trebuchet MS', sans-serif;">codepad is an online compiler / interpreter tool .This website simply compile your source code.This website compile 13 computer languages .<span style="color: #222222; line-height: 18px;"> The service is available at </span></span></div>
<a name='more'></a><span style="font-family: 'Trebuchet MS', sans-serif;"><a href="http://codepad.org/" rel="nofollow" style="color: #4d469c; line-height: 18px; text-decoration: none;">CodePad.org</a><span style="color: #222222;"><span style="line-height: 18px;"> and you can compile these languages online:</span></span></span><br />
<br />
<ol style="text-align: left;">
<li>C</li>
<li>C++</li>
<li>D</li>
<li><span style="background-color: #f6f6f6; font-family: ariel, sans-serif; font-size: 13px; white-space: nowrap;">Haskell</span>
</li>
<li><span style="background-color: #f6f6f6; font-family: ariel, sans-serif; font-size: 13px; white-space: nowrap;"><span style="background-color: white; color: #222222; font-family: Verdana, sans-serif; font-size: x-small; line-height: 18px; white-space: normal;">Lua</span>
</span></li>
<li><span style="background-color: #f6f6f6; font-family: ariel, sans-serif; font-size: 13px; white-space: nowrap;"><span style="background-color: white; color: #222222; font-family: Verdana, sans-serif; font-size: x-small; line-height: 18px; white-space: normal;">OCaml
</span></span></li>
<li><span style="background-color: #f6f6f6; font-family: ariel, sans-serif; font-size: 13px; white-space: nowrap;"><span style="background-color: white; color: #222222; font-family: Verdana, sans-serif; font-size: x-small; line-height: 18px; white-space: normal;">PHP
</span></span></li>
<li><span style="background-color: #f6f6f6; font-family: ariel, sans-serif; font-size: 13px; white-space: nowrap;"><span style="background-color: white; color: #222222; font-family: Verdana, sans-serif; font-size: x-small; line-height: 18px; white-space: normal;">Perl
</span></span></li>
<li><span style="color: #222222; font-family: Verdana, sans-serif; font-size: x-small; line-height: 18px;">Plain Text</span>
</li>
<li><span style="color: #222222; font-family: Verdana, sans-serif; font-size: x-small; line-height: 18px;">Python
</span></li>
<li><span style="color: #222222; font-family: Verdana, sans-serif; font-size: x-small; line-height: 18px;">Ruby
</span></li>
<li><span style="color: #222222; font-family: Verdana, sans-serif; font-size: x-small; line-height: 18px;">Scheme
</span></li>
<li><span style="color: #222222; font-family: Verdana, sans-serif; font-size: x-small; line-height: 18px;">Tcl
</span></li>
</ol>
</div><div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>Anonymoushttp://www.blogger.com/profile/11837588965426020130noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-84079623888386766322012-02-25T13:04:00.000+05:302012-02-25T13:06:10.662+05:30Create Linked List In C<div dir="ltr" style="text-align: left;" trbidi="on">
The linked list is a chain of structures in which each structures consists of data as well as as pointer , which store the address (links) of the next logical structure in the list.A linked list is a data structures used to maintain a dynamic series of data .Each nodes consists two parts field . First field holds the value or data part and second field holds the reference to the next node .<br />
<a name='more'></a><br />
<b><u><span style="color: #6aa84f;">Example</span></u> :</b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9VOWrThf0lNL2LLr_biv64gMiP4JSdJKVVIYjIyITFmxbhxzfOtMzjaqKj5dEwFDUkyMEGzw2F0ziNtbisSzT2y_HFH16X3SxE6vOEZflgt95SAZN7wD98BREk_4IXug_EhjMkR9dGg0/s1600/linked_list_example.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="46" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9VOWrThf0lNL2LLr_biv64gMiP4JSdJKVVIYjIyITFmxbhxzfOtMzjaqKj5dEwFDUkyMEGzw2F0ziNtbisSzT2y_HFH16X3SxE6vOEZflgt95SAZN7wD98BREk_4IXug_EhjMkR9dGg0/s320/linked_list_example.png" width="320" /></a></div>
<b><br /></b><br />
<br />
<b><u><span style="color: #6aa84f;">Program</span></u> :</b><br />
<pre style="background: #f1f0f0; color: black;"><span style="color: #004a43;">#</span><span style="color: #004a43;">include</span><span style="color: maroon;"><</span><span style="color: #40015a;">stdio.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include</span><span style="color: maroon;"><</span><span style="color: #40015a;">conio.h</span><span style="color: maroon;">></span>
<span style="color: #400000; font-weight: bold;">struct</span> node
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">int</span> data<span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">struct</span> node <span style="color: #806030;">*</span>next<span style="color: #806030;">;</span>
<span style="color: #806030;">}</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">void</span> add<span style="color: #806030;">(</span><span style="color: #400000; font-weight: bold;">struct</span> node <span style="color: #806030;">*</span><span style="color: #806030;">*</span><span style="color: #806030;">,</span> <span style="color: #400000; font-weight: bold;">int</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span> <span style="color: #c34e00;">// double pointer </span>
<span style="color: #400000; font-weight: bold;">void</span> display<span style="color: #806030;">(</span><span style="color: #400000; font-weight: bold;">struct</span> node <span style="color: #806030;">*</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span> <span style="color: #c34e00;">// single pointer </span>
<span style="color: #400000; font-weight: bold;">void</span> <span style="color: maroon; font-weight: bold;">main</span><span style="color: #806030;">(</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">int</span> ch<span style="color: #806030;">,</span>num<span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">struct</span> node <span style="color: #806030;">*</span>h<span style="color: #806030;">=</span><span style="color: #007d45;">NULL</span><span style="color: #806030;">;</span>
clrscr<span style="color: #806030;">(</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">while</span><span style="color: #806030;">(</span><span style="color: #c00000;">1</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;">1.Add a no: </span><span style="color: #0f6900;">\n</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;">2.Display:</span><span style="color: #0f6900;">\n</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;">3.Exit</span><span style="color: #0f6900;">\n</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #e60000;">Enter ur choice:</span><span style="color: #0f6900;">\n</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">scanf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">%d</span><span style="color: maroon;">"</span><span style="color: #806030;">,</span><span style="color: #806030;">&</span>ch<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">switch</span><span style="color: #806030;">(</span>ch<span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">case </span><span style="color: #c00000;">1</span><span style="color: #e34adc;">:</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;">Enter no:</span><span style="color: #0f6900;">\n</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">scanf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">%d</span><span style="color: maroon;">"</span><span style="color: #806030;">,</span><span style="color: #806030;">&</span>num<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
add<span style="color: #806030;">(</span><span style="color: #806030;">&</span>h<span style="color: #806030;">,</span>num<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">break</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">case </span><span style="color: #c00000;">2</span><span style="color: #e34adc;">:</span>display<span style="color: #806030;">(</span>h<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">break</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">case </span><span style="color: #c00000;">3</span><span style="color: #e34adc;">:</span><span style="color: #800040;">exit</span><span style="color: #806030;">(</span><span style="color: #c00000;">0</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">default</span> <span style="color: #806030;">:</span><span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;">Invalid no </span><span style="color: #0f6900;">\n</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
<span style="color: #806030;">}</span>
<span style="color: #806030;">}</span>
<span style="color: #400000; font-weight: bold;">void</span> add<span style="color: #806030;">(</span><span style="color: #400000; font-weight: bold;">struct</span> node <span style="color: #806030;">*</span><span style="color: #806030;">*</span>s<span style="color: #806030;">,</span><span style="color: #400000; font-weight: bold;">int</span> num<span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">struct</span> node <span style="color: #806030;">*</span>temp<span style="color: #806030;">,</span><span style="color: #806030;">*</span>r<span style="color: #806030;">;</span>
temp<span style="color: #806030;">=</span><span style="color: #806030;">(</span><span style="color: #400000; font-weight: bold;">struct</span> node<span style="color: #806030;">*</span><span style="color: #806030;">)</span><span style="color: #800040;">malloc</span><span style="color: #806030;">(</span><span style="color: #400000; font-weight: bold;">sizeof</span><span style="color: #806030;">(</span><span style="color: #400000; font-weight: bold;">struct</span> node<span style="color: #806030;">)</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
temp<span style="color: #806030;">-</span><span style="color: #806030;">></span>data<span style="color: #806030;">=</span>num<span style="color: #806030;">;</span>
temp<span style="color: #806030;">-</span><span style="color: #806030;">></span>next<span style="color: #806030;">=</span><span style="color: #007d45;">NULL</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">if</span><span style="color: #806030;">(</span><span style="color: #806030;">*</span>s<span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #007d45;">NULL</span><span style="color: #806030;">)</span>
<span style="color: #806030;">*</span>s<span style="color: #806030;">=</span>temp<span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">else</span>
<span style="color: #806030;">{</span> r<span style="color: #806030;">=</span><span style="color: #806030;">*</span>s<span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">while</span><span style="color: #806030;">(</span>r<span style="color: #806030;">-</span><span style="color: #806030;">></span>next<span style="color: #806030;">!</span><span style="color: #806030;">=</span><span style="color: #007d45;">NULL</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
r<span style="color: #806030;">=</span>r<span style="color: #806030;">-</span><span style="color: #806030;">></span>next<span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
r<span style="color: #806030;">-</span><span style="color: #806030;">></span>next<span style="color: #806030;">=</span>temp<span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
<span style="color: #806030;">}</span>
<span style="color: #400000; font-weight: bold;">void</span> display<span style="color: #806030;">(</span><span style="color: #400000; font-weight: bold;">struct</span> node <span style="color: #806030;">*</span>s<span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">struct</span> node <span style="color: #806030;">*</span> ptr<span style="color: #806030;">;</span>
ptr<span style="color: #806030;">=</span>s<span style="color: #806030;">;</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;">Dispaly:</span><span style="color: #0f6900;">\t</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">while</span><span style="color: #806030;">(</span>ptr<span style="color: #806030;">!</span><span style="color: #806030;">=</span><span style="color: #007d45;">NULL</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">%d</span><span style="color: #e60000;">-></span><span style="color: maroon;">"</span><span style="color: #806030;">,</span>ptr<span style="color: #806030;">-</span><span style="color: #806030;">></span>data<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
ptr<span style="color: #806030;">=</span>ptr<span style="color: #806030;">-</span><span style="color: #806030;">></span>next<span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #e60000;">NULL </span><span style="color: #0f6900;">\n</span><span style="color: #0f6900;">\n</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
</pre>
<b><br /></b><br />
<b><u><span style="color: #6aa84f;">Output</span></u> :</b><br />
<b><br /></b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYccizdjs3o7rZBOI6UjZK7d5mTHlk0K924Twnsc8_y24jx2hvQc6ONAc5cySz6AabzdCuJiZyhWhsXlNVxPtFxUcNK4Hyt5knNrn5zL6mX1Ks44QdR435JpCm-LMyRXuONeTlyGv6EUA/s1600/linked_list_c.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYccizdjs3o7rZBOI6UjZK7d5mTHlk0K924Twnsc8_y24jx2hvQc6ONAc5cySz6AabzdCuJiZyhWhsXlNVxPtFxUcNK4Hyt5knNrn5zL6mX1Ks44QdR435JpCm-LMyRXuONeTlyGv6EUA/s1600/linked_list_c.png" /></a></div>
<b><br /></b><br />
<b><br /></b><br />
<b><br /></b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJu6MRUpH48raY6_VHR4Q7jdRZi7zELRNM4aiBKGjI4V4ov3d0Bwy8GKQItZPanc3-YATqzaKA4mCZDTAZXuCr6XhyphenhyphenIUcqFY3pNNr_mq8ufufnFcqMvDrGxkXcDNL3C5r0ziKWXuM8bc8/s1600/footer.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJu6MRUpH48raY6_VHR4Q7jdRZi7zELRNM4aiBKGjI4V4ov3d0Bwy8GKQItZPanc3-YATqzaKA4mCZDTAZXuCr6XhyphenhyphenIUcqFY3pNNr_mq8ufufnFcqMvDrGxkXcDNL3C5r0ziKWXuM8bc8/s1600/footer.png" /></a></div>
</div><div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>Anonymoushttp://www.blogger.com/profile/11837588965426020130noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-23000677551658544712012-02-20T22:44:00.001+05:302012-02-20T22:44:49.365+05:30String Sorting Using C<div dir="ltr" style="text-align: left;" trbidi="on">
String sorting c program compare words alphabetically . Easy sorting method used in this program.<br />
<a name='more'></a><br />
<b><u><span style="color: #6aa84f;">Program </span></u>:</b><br />
<br />
<pre style="background: #f1f0f0; color: black;"><span style="color: #c34e00;">/* STRING SORT */</span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include</span><span style="color: maroon;"><</span><span style="color: #40015a;">stdio.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include</span><span style="color: maroon;"><</span><span style="color: #40015a;">conio.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include</span><span style="color: maroon;"><</span><span style="color: #40015a;">string.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">define</span><span style="color: #004a43;"> ITEMS 5 </span><span style="color: #c34e00;">/* defines preprocessor macro */</span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">define</span><span style="color: #004a43;"> MAXCHAR 20</span>
<span style="color: #400000; font-weight: bold;">void</span> <span style="color: maroon; font-weight: bold;">main</span><span style="color: #806030;">(</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">char</span> st<span style="color: #806030;">[</span>ITEMS<span style="color: #806030;">]</span><span style="color: #806030;">[</span>MAXCHAR<span style="color: #806030;">]</span><span style="color: #806030;">,</span>dummy<span style="color: #806030;">[</span>MAXCHAR<span style="color: #806030;">]</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">int</span> i<span style="color: #806030;">=</span><span style="color: #c00000;">0</span><span style="color: #806030;">,</span>j<span style="color: #806030;">=</span><span style="color: #c00000;">0</span><span style="color: #806030;">;</span>
clrscr<span style="color: #806030;">(</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\n</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;"> Enter names </span><span style="color: #0f6900;">%d</span><span style="color: #e60000;"> items </span><span style="color: #0f6900;">\n</span><span style="color: maroon;">"</span><span style="color: #806030;">,</span>ITEMS<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">while</span><span style="color: #806030;">(</span>i<span style="color: #806030;"><</span>ITEMS<span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #800040;">scanf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\t</span><span style="color: #0f6900;">%s</span><span style="color: maroon;">"</span><span style="color: #806030;">,</span><span style="color: #806030;">&</span>st<span style="color: #806030;">[</span>i<span style="color: #806030;">+</span><span style="color: #806030;">+</span><span style="color: #806030;">]</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
<span style="color: #400000; font-weight: bold;">for</span><span style="color: #806030;">(</span>i<span style="color: #806030;">=</span><span style="color: #c00000;">0</span><span style="color: #806030;">;</span>i<span style="color: #806030;"><</span>ITEMS<span style="color: #806030;">-</span><span style="color: #c00000;">1</span><span style="color: #806030;">;</span>i<span style="color: #806030;">+</span><span style="color: #806030;">+</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">for</span><span style="color: #806030;">(</span>j<span style="color: #806030;">=</span>i<span style="color: #806030;">+</span><span style="color: #c00000;">1</span><span style="color: #806030;">;</span>j<span style="color: #806030;"><</span>ITEMS<span style="color: #806030;">;</span>j<span style="color: #806030;">+</span><span style="color: #806030;">+</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">if</span><span style="color: #806030;">(</span><span style="color: #800040;">strcmp</span><span style="color: #806030;">(</span>st<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">,</span>st<span style="color: #806030;">[</span>j<span style="color: #806030;">]</span><span style="color: #806030;">)</span><span style="color: #806030;">></span><span style="color: #c00000;">0</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #800040;">strcpy</span><span style="color: #806030;">(</span>dummy<span style="color: #806030;">,</span>st<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">strcpy</span><span style="color: #806030;">(</span>st<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">,</span>st<span style="color: #806030;">[</span>j<span style="color: #806030;">]</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">strcpy</span><span style="color: #806030;">(</span>st<span style="color: #806030;">[</span>j<span style="color: #806030;">]</span><span style="color: #806030;">,</span>dummy<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
<span style="color: #806030;">}</span>
<span style="color: #806030;">}</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #e60000;"> </span><span style="color: #0f6900;">\n</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;"> Alphabetiacl list</span><span style="color: #0f6900;">\n</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">for</span><span style="color: #806030;">(</span>i<span style="color: #806030;">=</span><span style="color: #c00000;">0</span><span style="color: #806030;">;</span>i<span style="color: #806030;"><</span>ITEMS<span style="color: #806030;">;</span>i<span style="color: #806030;">+</span><span style="color: #806030;">+</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\t</span><span style="color: #0f6900;">%s</span><span style="color: #e60000;"> </span><span style="color: #0f6900;">\n</span><span style="color: maroon;">"</span><span style="color: #806030;">,</span>st<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
getch<span style="color: #806030;">(</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">exit</span><span style="color: #806030;">(</span><span style="color: #c00000;">0</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
</pre>
<br />
<b><u><span style="color: #6aa84f;">Output</span></u></b> <b>:</b><br />
<b><br /></b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxhFtrsoYAESyDI0D7owEjqvp0h_DPj3evb9DXzICTFbhssEvLyWY6HIkMPif8M7fVMJQnXZDJBUV-6shVhU0q1MUFBv8x8Orli4_ICDZ1iELXfMcyh3mWhIo8fEAU0SDtpDPI7boUQ2g/s1600/string_sort_c.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxhFtrsoYAESyDI0D7owEjqvp0h_DPj3evb9DXzICTFbhssEvLyWY6HIkMPif8M7fVMJQnXZDJBUV-6shVhU0q1MUFBv8x8Orli4_ICDZ1iELXfMcyh3mWhIo8fEAU0SDtpDPI7boUQ2g/s1600/string_sort_c.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<b><br /></b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJu6MRUpH48raY6_VHR4Q7jdRZi7zELRNM4aiBKGjI4V4ov3d0Bwy8GKQItZPanc3-YATqzaKA4mCZDTAZXuCr6XhyphenhyphenIUcqFY3pNNr_mq8ufufnFcqMvDrGxkXcDNL3C5r0ziKWXuM8bc8/s1600/footer.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJu6MRUpH48raY6_VHR4Q7jdRZi7zELRNM4aiBKGjI4V4ov3d0Bwy8GKQItZPanc3-YATqzaKA4mCZDTAZXuCr6XhyphenhyphenIUcqFY3pNNr_mq8ufufnFcqMvDrGxkXcDNL3C5r0ziKWXuM8bc8/s1600/footer.png" /></a></div>
<b><br /></b></div><div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>Anonymoushttp://www.blogger.com/profile/11837588965426020130noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-22573812235066174822012-02-15T21:45:00.001+05:302012-02-15T21:45:15.587+05:30How To Change Webpage Background Color Using Javascript<div dir="ltr" style="text-align: left;" trbidi="on">
This JavaScript program use switch case and radio button for change webpage background color.When you on-click radio button then radio button pass the value to JavaScript function . Switch case compare the value with the case which value is similar to the case ,then change webpage background color .<br />
<a name='more'></a><br />
<span style="color: #6aa84f;"><b><u>Program</u></b></span><b> : </b><br />
<br />
<pre style="background: #f1f0f0; color: black;"><span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">html</span><span style="color: #a65700;">></span><span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">head</span><span style="color: #a65700;">></span><span style="color: #a65700;"></</span><span style="color: #400000; font-weight: bold;">head</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">body</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">script language="</span><span style="color: #e60000;">JavaScript</span><span style="color: #400000; font-weight: bold;">"</span><span style="color: #a65700;">></span>
<span style="color: #400000; font-weight: bold;">function</span> colors<span style="color: #806030;">(</span>col<span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">switch</span><span style="color: #806030;">(</span>col<span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">case</span> <span style="color: #e60000;">'red'</span><span style="color: #806030;">:</span>
document<span style="color: #806030;">.</span>bgColor<span style="color: #806030;">=</span><span style="color: maroon;">"</span><span style="color: #e60000;">#FF0000</span><span style="color: maroon;">"</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">break</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">case</span> <span style="color: #e60000;">'green'</span><span style="color: #806030;">:</span>
document<span style="color: #806030;">.</span>bgColor<span style="color: #806030;">=</span><span style="color: maroon;">"</span><span style="color: #e60000;">#00FF00</span><span style="color: maroon;">"</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">break</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">case</span> <span style="color: #e60000;">'blue'</span><span style="color: #806030;">:</span>
document<span style="color: #806030;">.</span>bgColor<span style="color: #806030;">=</span><span style="color: maroon;">"</span><span style="color: #e60000;">#0000FF</span><span style="color: maroon;">"</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">break</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
<span style="color: #806030;">}</span>
<span style="color: #a65700;"></</span><span style="color: #400000; font-weight: bold;">script</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">form</span><span style="color: #074726;"> </span><span style="color: #074726;">name</span><span style="color: #806030;">=</span><span style="color: #074726;">”form1” </span><span style="color: #074726;">method</span><span style="color: #806030;">=</span><span style="color: #074726;">”post” </span><span style="color: #074726;">action</span><span style="color: #806030;">=</span><span style="color: #074726;">””</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">p</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">label</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">input</span><span style="color: #074726;"> </span><span style="color: #074726;">type</span><span style="color: #806030;">=</span><span style="color: #e60000;">"radio"</span><span style="color: #074726;"> </span><span style="color: #074726;">name</span><span style="color: #806030;">=</span><span style="color: #074726;">”Colors” </span><span style="color: #074726;">value</span><span style="color: #806030;">=</span><span style="color: #074726;">”radio” </span><span style="color: #074726;">onClick</span><span style="color: #806030;">=</span><span style="color: #e60000;">"colors('red')"</span><span style="color: #a65700;">></span>
Red<span style="color: #a65700;"></</span><span style="color: #400000; font-weight: bold;">label</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">br</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">label</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">input</span><span style="color: #074726;"> </span><span style="color: #074726;">type</span><span style="color: #806030;">=</span><span style="color: #e60000;">"radio"</span><span style="color: #074726;"> </span><span style="color: #074726;">name</span><span style="color: #806030;">=</span><span style="color: #074726;">”Colors” </span><span style="color: #074726;">value</span><span style="color: #806030;">=</span><span style="color: #074726;">”radio” </span><span style="color: #074726;">onClick</span><span style="color: #806030;">=</span><span style="color: #e60000;">"colors('green')"</span><span style="color: #a65700;">></span>
Green<span style="color: #a65700;"></</span><span style="color: #400000; font-weight: bold;">label</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">br</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">label</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">input</span><span style="color: #074726;"> </span><span style="color: #074726;">type</span><span style="color: #806030;">=</span><span style="color: #e60000;">"radio"</span><span style="color: #074726;"> </span><span style="color: #074726;">name</span><span style="color: #806030;">=</span><span style="color: #074726;">”Colors” </span><span style="color: #074726;">value</span><span style="color: #806030;">=</span><span style="color: #074726;">”radio” </span><span style="color: #074726;">onClick</span><span style="color: #806030;">=</span><span style="color: #e60000;">"colors('blue')"</span><span style="color: #a65700;">></span>
Blue<span style="color: #a65700;"></</span><span style="color: #400000; font-weight: bold;">label</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">br</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"></</span><span style="color: #400000; font-weight: bold;">p</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"></</span><span style="color: #400000; font-weight: bold;">form</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"></</span><span style="color: #400000; font-weight: bold;">body</span><span style="color: #a65700;">></span><span style="color: #a65700;"></</span><span style="color: #400000; font-weight: bold;">html</span><span style="color: #a65700;">></span>
</pre>
<br />
<b><u><span style="color: #6aa84f;">Output</span></u> :</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAp4J8a4BGpb6RSPRdHIxTIpxRHLDAX28H6IU-TR1uW3DYSl5hScLrwhsbiYZuuvEuugW0n03vUWINF3xOjG5crBmrRfBZAqzHbep79u_rAE8fYbdI_NUWvt27fH5HadRhLZqf2YjYCyo/s1600/webpage_color_change.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="195" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAp4J8a4BGpb6RSPRdHIxTIpxRHLDAX28H6IU-TR1uW3DYSl5hScLrwhsbiYZuuvEuugW0n03vUWINF3xOjG5crBmrRfBZAqzHbep79u_rAE8fYbdI_NUWvt27fH5HadRhLZqf2YjYCyo/s320/webpage_color_change.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJu6MRUpH48raY6_VHR4Q7jdRZi7zELRNM4aiBKGjI4V4ov3d0Bwy8GKQItZPanc3-YATqzaKA4mCZDTAZXuCr6XhyphenhyphenIUcqFY3pNNr_mq8ufufnFcqMvDrGxkXcDNL3C5r0ziKWXuM8bc8/s1600/footer.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJu6MRUpH48raY6_VHR4Q7jdRZi7zELRNM4aiBKGjI4V4ov3d0Bwy8GKQItZPanc3-YATqzaKA4mCZDTAZXuCr6XhyphenhyphenIUcqFY3pNNr_mq8ufufnFcqMvDrGxkXcDNL3C5r0ziKWXuM8bc8/s1600/footer.png" /></a></div>
</div><div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>Anonymoushttp://www.blogger.com/profile/11837588965426020130noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-52529551964347390862012-02-15T15:44:00.002+05:302012-02-15T15:46:33.756+05:30Change Blogger/Blogspot Template<div dir="ltr" style="text-align: left;" trbidi="on">
Blogger platform easy platform for beginners that are easily handle not so much technical . Its have many facilities easily handle, nothing complicated to change template etc .<br />
<a name='more'></a><br />
<b><u><span style="color: #6aa84f;">Change Blogger Template</span></u></b> :<br />
<ul style="text-align: left;">
<li>Login to your blogger template .</li>
<li> Dashboard -> Template ->Pick new template .</li>
</ul>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDe_-5QEcgQTmUm4o4f14mmfeEpyFefe6DG82AuklxTtb5PNTnpBvT_Q7kElG1IHQkssH2VBA4ZZSQqseVCuSzsEJU2LosLB-VVZBc-Uf5nL1pAXSsG4rQrdtEPeQzcOE8It_aefIQA54/s1600/b_templat_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDe_-5QEcgQTmUm4o4f14mmfeEpyFefe6DG82AuklxTtb5PNTnpBvT_Q7kElG1IHQkssH2VBA4ZZSQqseVCuSzsEJU2LosLB-VVZBc-Uf5nL1pAXSsG4rQrdtEPeQzcOE8It_aefIQA54/s400/b_templat_1.png" width="400" /></a></div>
<br />
<br />
<ul style="text-align: left;">
<li>Then you choose your favorite template on blogger </li>
<li>Click save template. </li>
</ul>
<br />
<span style="color: #6aa84f;"><u style="font-weight: bold;">Install Third Party Blogger Template </u> </span>:<br />
<br />
You want to install dynamic third party template which is not available blogger site.<br />
<br />
<div>
<ul style="text-align: left;">
<li> Go to this side and download third party template or another sites and save template on your hard drive.</li>
</ul>
<span style="color: #3d85c6;"></span><br />
<ol style="text-align: left;"><span style="color: #3d85c6;">
<li>http://btemplates.com/</li>
<li>http://bloggertemplateplace.com/</li>
<li>http://besttheme.net/ </li>
</span></ol>
<span style="color: #3d85c6;">
</span><br />
<ul style="text-align: left;">
<li>Login to your blogger template .</li>
<li>Then you need to back up your original template .</li>
</ul>
<div>
Dashboard ->Template-> Backup/Restore </div>
</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg67tbezE-aBGryuvB724b9DIVMa7x5Eagi4hGfcyk0Q-sfAkzdTsWt_XQe3iY9CVOm2lLkC-kb349VNbwkPgqm4i6s2rOHJnMu9-P7e0LtyzYYAzsDiTRF0ADjsL3bgbtnL9Vme3tZacI/s1600/b_templat_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg67tbezE-aBGryuvB724b9DIVMa7x5Eagi4hGfcyk0Q-sfAkzdTsWt_XQe3iY9CVOm2lLkC-kb349VNbwkPgqm4i6s2rOHJnMu9-P7e0LtyzYYAzsDiTRF0ADjsL3bgbtnL9Vme3tZacI/s400/b_templat_2.png" width="400" /></a></div>
<div>
<ul style="text-align: left;">
<li>" Download Full Template " on your hard drive. This backup helpful anything goes wrong with new template.</li>
</ul>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT4DwyAWPqqcA_HLydkGzIxKfln9vyuF-ckXtDWRNpiFdpDOjPiuuNMeurknfERMpt4RC_zLfxd7z8PELPWGBfjCHSl-VDCb2CFJ1EfayNeMQn-xZeTejuJnNuJqLffvZPiT1g_flC8PE/s1600/b_templat_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="163" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT4DwyAWPqqcA_HLydkGzIxKfln9vyuF-ckXtDWRNpiFdpDOjPiuuNMeurknfERMpt4RC_zLfxd7z8PELPWGBfjCHSl-VDCb2CFJ1EfayNeMQn-xZeTejuJnNuJqLffvZPiT1g_flC8PE/s320/b_templat_3.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<ul style="text-align: left;">
<li>Now go to Dashboard -> Template -> Backup/Restore -> Choose File ( Choose saved Template file from your hard disk ) .</li>
<li>Choose Xml file from Template folder .Click on Open.</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXZ5FPMcQLEQ7kqtJjW1Ki3eJUos-_t0I9BGuaVvH9bBCso_Sya5yOeWnPLpAgQ7_eIIJr9bTINzTKqCMc9HfQ0yQjEpgDjM9u_st8GaRSZwI1Jzgo5zp1Pf-IbY0oOcI8KuZW5P5Icgg/s1600/b_templat_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="245" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXZ5FPMcQLEQ7kqtJjW1Ki3eJUos-_t0I9BGuaVvH9bBCso_Sya5yOeWnPLpAgQ7_eIIJr9bTINzTKqCMc9HfQ0yQjEpgDjM9u_st8GaRSZwI1Jzgo5zp1Pf-IbY0oOcI8KuZW5P5Icgg/s400/b_templat_4.png" width="400" /></a></div>
<div>
<br /></div>
<br />
<div>
<ul style="text-align: left;">
<li>Click on " Upload " .Then automatically upload your template xml file.</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkjsTZBY2cxpmOuptt3fKUJS5ZsXm841I1XoAbdFBCnQC8snf6FGFiQjOGkp-6MHuZmQtIfjKeMcjL1MNwAD4OaoW6TyriKfP62a0NAf8l48dNQGr_QaOx63cwdrEq1_br1RaMRkKjFGM/s1600/b_templat_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="211" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkjsTZBY2cxpmOuptt3fKUJS5ZsXm841I1XoAbdFBCnQC8snf6FGFiQjOGkp-6MHuZmQtIfjKeMcjL1MNwAD4OaoW6TyriKfP62a0NAf8l48dNQGr_QaOx63cwdrEq1_br1RaMRkKjFGM/s400/b_templat_5.png" width="400" /></a></div>
<div>
<ul style="text-align: left;">
<li>When your template install , then refresh blogger dashboard .</li>
</ul>
<div>
<br /></div>
</div>
</div>
<div>
<br />
<div style="background-color: white; font-size: small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJu6MRUpH48raY6_VHR4Q7jdRZi7zELRNM4aiBKGjI4V4ov3d0Bwy8GKQItZPanc3-YATqzaKA4mCZDTAZXuCr6XhyphenhyphenIUcqFY3pNNr_mq8ufufnFcqMvDrGxkXcDNL3C5r0ziKWXuM8bc8/s1600/footer.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJu6MRUpH48raY6_VHR4Q7jdRZi7zELRNM4aiBKGjI4V4ov3d0Bwy8GKQItZPanc3-YATqzaKA4mCZDTAZXuCr6XhyphenhyphenIUcqFY3pNNr_mq8ufufnFcqMvDrGxkXcDNL3C5r0ziKWXuM8bc8/s1600/footer.png" /></a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div><div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>Anonymoushttp://www.blogger.com/profile/11837588965426020130noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-81212651994620129552012-02-14T13:30:00.000+05:302012-02-14T13:32:30.756+05:30JavaScript Calculator<div dir="ltr" style="text-align: left;" trbidi="on">
This is a simple calculator implementing with JavaScript and Html .This calculator will do division , multiplication ,addition and subtraction operations .<br />
<a name='more'></a><br />
<b><span style="color: #6aa84f;"><u>Program</u></span> :</b><br />
<b><br /></b><br />
<pre style="background: #f1f0f0; color: black;"><span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">html</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">head</span><span style="color: #a65700;">></span><span style="color: #a65700;"></</span><span style="color: #400000; font-weight: bold;">head</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">script language="</span><span style="color: #e60000;">JavaScript</span><span style="color: #400000; font-weight: bold;">"</span><span style="color: #a65700;">></span>
<span style="color: #400000; font-weight: bold;">function</span> calc<span style="color: #806030;">(</span>ch<span style="color: #806030;">)</span><span style="color: #806030;">{</span> <span style="color: #c34e00;">// javasript function with parameter </span>
<span style="color: #400000; font-weight: bold;">if</span><span style="color: #806030;">(</span>ch<span style="color: #806030;">==</span><span style="color: maroon;">"</span><span style="color: #e60000;">=</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span>
form1<span style="color: #806030;">.</span>t<span style="color: #806030;">.</span>value<span style="color: #806030;">=</span> <span style="color: #400000; font-weight: bold;">eval</span><span style="color: #806030;">(</span>form1<span style="color: #806030;">.</span>t<span style="color: #806030;">.</span>value<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">else</span>
<span style="color: #400000; font-weight: bold;">if</span><span style="color: #806030;">(</span>ch<span style="color: #806030;">==</span><span style="color: maroon;">"</span><span style="color: #e60000;">C</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span>
form1<span style="color: #806030;">.</span>t<span style="color: #806030;">.</span>value<span style="color: #806030;">=</span> <span style="color: maroon;">"</span><span style="color: maroon;">"</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">else</span>
form1<span style="color: #806030;">.</span>t<span style="color: #806030;">.</span>value<span style="color: #806030;">+=</span>ch<span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
<span style="color: #a65700;"></</span><span style="color: #400000; font-weight: bold;">script</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">body</span><span style="color: #074726;"> </span><span style="color: #074726;">onLoad</span><span style="color: #806030;">=</span><span style="color: #e60000;">"getTimes()"</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">form</span><span style="color: #074726;"> </span><span style="color: #074726;">name</span><span style="color: #806030;">=</span><span style="color: #e60000;">"form1"</span><span style="color: #074726;"> </span><span style="color: #074726;">method</span><span style="color: #806030;">=</span><span style="color: #e60000;">"post"</span><span style="color: #074726;"> </span><span style="color: #074726;">action</span><span style="color: #806030;">=</span><span style="color: #e60000;">""</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">input</span><span style="color: #074726;"> </span><span style="color: #074726;">name</span><span style="color: #806030;">=</span><span style="color: #e60000;">"t"</span><span style="color: #074726;"> </span><span style="color: #074726;">type</span><span style="color: #806030;">=</span><span style="color: #e60000;">"text"</span><span style="color: #074726;"> </span><span style="color: #074726;">id</span><span style="color: #806030;">=</span><span style="color: #e60000;">"t"</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">br</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">input</span><span style="color: #074726;"> </span><span style="color: #074726;">type</span><span style="color: #806030;">=</span><span style="color: #e60000;">"button"</span><span style="color: #074726;"> </span><span style="color: #074726;">name</span><span style="color: #806030;">=</span><span style="color: #e60000;">"Button"</span><span style="color: #074726;"> </span><span style="color: #074726;">value</span><span style="color: #806030;">=</span><span style="color: #e60000;">"7"</span><span style="color: #074726;"> </span><span style="color: #074726;">onClick</span><span style="color: #806030;">=</span><span style="color: #e60000;">"calc('7')"</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">input</span><span style="color: #074726;"> </span><span style="color: #074726;">type</span><span style="color: #806030;">=</span><span style="color: #e60000;">"button"</span><span style="color: #074726;"> </span><span style="color: #074726;">name</span><span style="color: #806030;">=</span><span style="color: #e60000;">"Submit2"</span><span style="color: #074726;"> </span><span style="color: #074726;">value</span><span style="color: #806030;">=</span><span style="color: #e60000;">"8"</span><span style="color: #074726;"> </span><span style="color: #074726;">onClick</span><span style="color: #806030;">=</span><span style="color: #e60000;">"calc('8')"</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">input</span><span style="color: #074726;"> </span><span style="color: #074726;">type</span><span style="color: #806030;">=</span><span style="color: #e60000;">"button"</span><span style="color: #074726;"> </span><span style="color: #074726;">name</span><span style="color: #806030;">=</span><span style="color: #e60000;">"Submit3"</span><span style="color: #074726;"> </span><span style="color: #074726;">value</span><span style="color: #806030;">=</span><span style="color: #e60000;">"9"</span><span style="color: #074726;"> </span><span style="color: #074726;">onClick</span><span style="color: #806030;">=</span><span style="color: #e60000;">"calc('9')"</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">input</span><span style="color: #074726;"> </span><span style="color: #074726;">type</span><span style="color: #806030;">=</span><span style="color: #e60000;">"button"</span><span style="color: #074726;"> </span><span style="color: #074726;">name</span><span style="color: #806030;">=</span><span style="color: #e60000;">"Submit4"</span><span style="color: #074726;"> </span><span style="color: #074726;">value</span><span style="color: #806030;">=</span><span style="color: #e60000;">"+"</span><span style="color: #074726;"> </span><span style="color: #074726;">onClick</span><span style="color: #806030;">=</span><span style="color: #e60000;">"calc('+')"</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">br</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">input</span><span style="color: #074726;"> </span><span style="color: #074726;">type</span><span style="color: #806030;">=</span><span style="color: #e60000;">"button"</span><span style="color: #074726;"> </span><span style="color: #074726;">name</span><span style="color: #806030;">=</span><span style="color: #e60000;">"Submit5"</span><span style="color: #074726;"> </span><span style="color: #074726;">value</span><span style="color: #806030;">=</span><span style="color: #e60000;">"4"</span><span style="color: #074726;"> </span><span style="color: #074726;">onClick</span><span style="color: #806030;">=</span><span style="color: #e60000;">"calc('4')"</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">input</span><span style="color: #074726;"> </span><span style="color: #074726;">type</span><span style="color: #806030;">=</span><span style="color: #e60000;">"button"</span><span style="color: #074726;"> </span><span style="color: #074726;">name</span><span style="color: #806030;">=</span><span style="color: #e60000;">"Submit6"</span><span style="color: #074726;"> </span><span style="color: #074726;">value</span><span style="color: #806030;">=</span><span style="color: #e60000;">"5"</span><span style="color: #074726;"> </span><span style="color: #074726;">onClick</span><span style="color: #806030;">=</span><span style="color: #e60000;">"calc('5')"</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">input</span><span style="color: #074726;"> </span><span style="color: #074726;">type</span><span style="color: #806030;">=</span><span style="color: #e60000;">"button"</span><span style="color: #074726;"> </span><span style="color: #074726;">name</span><span style="color: #806030;">=</span><span style="color: #e60000;">"Submit7"</span><span style="color: #074726;"> </span><span style="color: #074726;">value</span><span style="color: #806030;">=</span><span style="color: #e60000;">"6"</span><span style="color: #074726;"> </span><span style="color: #074726;">onClick</span><span style="color: #806030;">=</span><span style="color: #e60000;">"calc('6')"</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">input</span><span style="color: #074726;"> </span><span style="color: #074726;">type</span><span style="color: #806030;">=</span><span style="color: #e60000;">"button"</span><span style="color: #074726;"> </span><span style="color: #074726;">name</span><span style="color: #806030;">=</span><span style="color: #e60000;">"Submit8"</span><span style="color: #074726;"> </span><span style="color: #074726;">value</span><span style="color: #806030;">=</span><span style="color: #e60000;">"-"</span><span style="color: #074726;"> </span><span style="color: #074726;">onClick</span><span style="color: #806030;">=</span><span style="color: #e60000;">"calc('-')"</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">br</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">input</span><span style="color: #074726;"> </span><span style="color: #074726;">type</span><span style="color: #806030;">=</span><span style="color: #e60000;">"button"</span><span style="color: #074726;"> </span><span style="color: #074726;">name</span><span style="color: #806030;">=</span><span style="color: #e60000;">"Submit9"</span><span style="color: #074726;"> </span><span style="color: #074726;">value</span><span style="color: #806030;">=</span><span style="color: #e60000;">"1"</span><span style="color: #074726;"> </span><span style="color: #074726;">onClick</span><span style="color: #806030;">=</span><span style="color: #e60000;">"calc('1')"</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">input</span><span style="color: #074726;"> </span><span style="color: #074726;">type</span><span style="color: #806030;">=</span><span style="color: #e60000;">"button"</span><span style="color: #074726;"> </span><span style="color: #074726;">name</span><span style="color: #806030;">=</span><span style="color: #e60000;">"Submit10"</span><span style="color: #074726;"> </span><span style="color: #074726;">value</span><span style="color: #806030;">=</span><span style="color: #e60000;">"2"</span><span style="color: #074726;"> </span><span style="color: #074726;">onClick</span><span style="color: #806030;">=</span><span style="color: #e60000;">"calc('2')"</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">input</span><span style="color: #074726;"> </span><span style="color: #074726;">type</span><span style="color: #806030;">=</span><span style="color: #e60000;">"button"</span><span style="color: #074726;"> </span><span style="color: #074726;">name</span><span style="color: #806030;">=</span><span style="color: #e60000;">"Submit11"</span><span style="color: #074726;"> </span><span style="color: #074726;">value</span><span style="color: #806030;">=</span><span style="color: #e60000;">"3"</span><span style="color: #074726;"> </span><span style="color: #074726;">onClick</span><span style="color: #806030;">=</span><span style="color: #e60000;">"calc('3')"</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">input</span><span style="color: #074726;"> </span><span style="color: #074726;">type</span><span style="color: #806030;">=</span><span style="color: #e60000;">"button"</span><span style="color: #074726;"> </span><span style="color: #074726;">name</span><span style="color: #806030;">=</span><span style="color: #e60000;">"Submit12"</span><span style="color: #074726;"> </span><span style="color: #074726;">value</span><span style="color: #806030;">=</span><span style="color: #e60000;">"*"</span><span style="color: #074726;"> </span><span style="color: #074726;">onClick</span><span style="color: #806030;">=</span><span style="color: #e60000;">"calc('*')"</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">br</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">input</span><span style="color: #074726;"> </span><span style="color: #074726;">type</span><span style="color: #806030;">=</span><span style="color: #e60000;">"button"</span><span style="color: #074726;"> </span><span style="color: #074726;">name</span><span style="color: #806030;">=</span><span style="color: #e60000;">"Submit13"</span><span style="color: #074726;"> </span><span style="color: #074726;">value</span><span style="color: #806030;">=</span><span style="color: #e60000;">"0"</span><span style="color: #074726;"> </span><span style="color: #074726;">onClick</span><span style="color: #806030;">=</span><span style="color: #e60000;">"calc('0')"</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">input</span><span style="color: #074726;"> </span><span style="color: #074726;">type</span><span style="color: #806030;">=</span><span style="color: #e60000;">"button"</span><span style="color: #074726;"> </span><span style="color: #074726;">name</span><span style="color: #806030;">=</span><span style="color: #e60000;">"Submit14"</span><span style="color: #074726;"> </span><span style="color: #074726;">value</span><span style="color: #806030;">=</span><span style="color: #e60000;">"C"</span><span style="color: #074726;"> </span><span style="color: #074726;">onClick</span><span style="color: #806030;">=</span><span style="color: #e60000;">"calc('C')"</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">input</span><span style="color: #074726;"> </span><span style="color: #074726;">type</span><span style="color: #806030;">=</span><span style="color: #e60000;">"button"</span><span style="color: #074726;"> </span><span style="color: #074726;">name</span><span style="color: #806030;">=</span><span style="color: #e60000;">"Submit15"</span><span style="color: #074726;"> </span><span style="color: #074726;">value</span><span style="color: #806030;">=</span><span style="color: #e60000;">"="</span><span style="color: #074726;"> </span><span style="color: #074726;">onClick</span><span style="color: #806030;">=</span><span style="color: #e60000;">"calc('=')"</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">input</span><span style="color: #074726;"> </span><span style="color: #074726;">type</span><span style="color: #806030;">=</span><span style="color: #e60000;">"button"</span><span style="color: #074726;"> </span><span style="color: #074726;">name</span><span style="color: #806030;">=</span><span style="color: #e60000;">"Submit16"</span><span style="color: #074726;"> </span><span style="color: #074726;">value</span><span style="color: #806030;">=</span><span style="color: #e60000;">"/"</span><span style="color: #074726;"> </span><span style="color: #074726;">onClick</span><span style="color: #806030;">=</span><span style="color: #e60000;">"calc('/')"</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"><</span><span style="color: #400000; font-weight: bold;">br</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"></</span><span style="color: #400000; font-weight: bold;">form</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"></</span><span style="color: #400000; font-weight: bold;">body</span><span style="color: #a65700;">></span>
<span style="color: #a65700;"></</span><span style="color: #400000; font-weight: bold;">html</span><span style="color: #a65700;">></span>
</pre>
<b><br /></b><br />
<b><span style="color: #6aa84f;"><u>Output</u></span> :</b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQSwUMyeOPjx1n6KxH8qcZX8Qmy9wFBaF8eydv1v8Y3Pg84okelX3oXk97BCcxlYmkq346JMrvthgSyHPlXJZai4jjSDhp2WRixWM6BfCmji0geTnEpSgFFUPd-8tqPi53ccAGycNPPow/s1600/calculator_javascript.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQSwUMyeOPjx1n6KxH8qcZX8Qmy9wFBaF8eydv1v8Y3Pg84okelX3oXk97BCcxlYmkq346JMrvthgSyHPlXJZai4jjSDhp2WRixWM6BfCmji0geTnEpSgFFUPd-8tqPi53ccAGycNPPow/s1600/calculator_javascript.png" /></a></div>
<br />
<table style="background-color: white; color: black; font-family: 'Georgia Serif'; font-size: small; text-align: left;"><tbody>
<tr bgcolor="#E3E4FA"><td><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">If you have any <span class="Apple-style-span" style="color: red;">Further Information</span> and <span class="Apple-style-span" style="color: red;">Quires</span> about this Article don't hesitate to comment in comment box below.</span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> AND</span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> If you like this article , like our <span class="Apple-style-span" style="color: red;">Facebook like page</span> and <span class="Apple-style-span" style="color: red;">click +1</span> to support 123techguide</span></div>
</div>
</td></tr>
</tbody></table>
</div><div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>Anonymoushttp://www.blogger.com/profile/11837588965426020130noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-36898115174136833372012-02-13T23:07:00.000+05:302012-02-14T13:31:48.529+05:30To Count Number Of Occurrences Of A Characters/Letters Sequence In A String<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: -webkit-auto;">
Here C program to count the number of <span style="font-family: inherit;"> <span style="color: #222222;"><span style="line-height: 16px;">occurrences of a</span></span></span> characters/letters sequence in a string.This c program use ASCII value of small letter for looping and checking .</div>
<a name='more'></a><br />
<b><u><span style="color: #6aa84f;">Example</span></u></b> <b>:</b><br />
<br />
<ul style="text-align: left;">
<li>String : hello </li>
<li>"h" found 1 time</li>
<li>"e" found 1 time </li>
<li>" l" found 2 time</li>
<li>"o" found 1 time</li>
</ul>
<b><u><span style="color: #6aa84f;">Program</span></u> :</b><br />
<b><br /></b><br />
<b><br /></b><br />
<pre style="background: #f1f0f0; color: black;"><span style="color: #004a43;">#</span><span style="color: #004a43;">include</span><span style="color: maroon;"><</span><span style="color: #40015a;">stdio.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include</span><span style="color: maroon;"><</span><span style="color: #40015a;">conio.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include</span><span style="color: maroon;"><</span><span style="color: #40015a;">string.h</span><span style="color: maroon;">></span>
<span style="color: #400000; font-weight: bold;">void</span> <span style="color: maroon; font-weight: bold;">main</span><span style="color: #806030;">(</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">char</span> ch<span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">do</span><span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">char</span> a<span style="color: #806030;">[</span><span style="color: #c00000;">20</span><span style="color: #806030;">]</span><span style="color: #806030;">,</span>f<span style="color: #806030;">=</span><span style="color: #c00000;">0</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">int</span> i<span style="color: #806030;">,</span>n<span style="color: #806030;">,</span>ascii<span style="color: #806030;">;</span>
clrscr<span style="color: #806030;">(</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #e60000;">enter a string:</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">gets</span><span style="color: #806030;">(</span>a<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
strlwr<span style="color: #806030;">(</span>a<span style="color: #806030;">)</span><span style="color: #806030;">;</span> <span style="color: #c34e00;">// Sting convert in small letter </span>
<span style="color: #400000; font-weight: bold;">for</span><span style="color: #806030;">(</span>ascii<span style="color: #806030;">=</span><span style="color: #c00000;">97</span><span style="color: #806030;">;</span>ascii<span style="color: #806030;"><</span><span style="color: #806030;">=</span><span style="color: #c00000;">122</span><span style="color: #806030;">;</span>ascii<span style="color: #806030;">+</span><span style="color: #806030;">+</span><span style="color: #806030;">)</span><span style="color: #c34e00;">// a=97 and z=122 ascii value for looping </span>
<span style="color: #806030;">{</span>
n<span style="color: #806030;">=</span><span style="color: #c00000;">0</span><span style="color: #806030;">;</span>
f<span style="color: #806030;">=</span><span style="color: #c00000;">0</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">for</span><span style="color: #806030;">(</span>i<span style="color: #806030;">=</span><span style="color: #c00000;">0</span><span style="color: #806030;">;</span>a<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">!</span><span style="color: #806030;">=</span><span style="color: #007d45;">NULL</span><span style="color: #806030;">;</span>i<span style="color: #806030;">+</span><span style="color: #806030;">+</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">if</span><span style="color: #806030;">(</span>ascii<span style="color: #806030;">=</span><span style="color: #806030;">=</span>a<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">)</span><span style="color: #c34e00;">// Ascii value for checking</span>
<span style="color: #806030;">{</span>
n<span style="color: #806030;">+</span><span style="color: #806030;">+</span><span style="color: #806030;">;</span> <span style="color: #c34e00;">// If Checking sucessfull ..increment +1</span>
f<span style="color: #806030;">=</span><span style="color: #c00000;">1</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
<span style="color: #806030;">}</span>
<span style="color: #400000; font-weight: bold;">if</span><span style="color: #806030;">(</span>f<span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #c00000;">1</span><span style="color: #806030;">)</span> <span style="color: #c34e00;">// Checking f value is similar or not </span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\t</span><span style="color: #0f6900;">\t</span><span style="color: #0f6900;">%c</span><span style="color: #e60000;"> value found </span><span style="color: #0f6900;">%d</span><span style="color: #e60000;"> times </span><span style="color: maroon;">"</span><span style="color: #806030;">,</span>ascii<span style="color: #806030;">,</span>n<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\n</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;"> continue (y/n):</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
ch<span style="color: #806030;">=</span>getch<span style="color: #806030;">(</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span><span style="color: #400000; font-weight: bold;">while</span><span style="color: #806030;">(</span>ch<span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'y'</span><span style="color: #806030;">|</span><span style="color: #806030;">|</span>ch<span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'Y'</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
</pre>
<b><br /></b><br />
<b><u><span style="color: #6aa84f;">Output </span></u>:</b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU7Dmt6CQC4d77KaNgUP3FRK9qBKLZ3V3U5WlRotF_X_JPEDxS2x9ixP7AZI1GrVis_dmgC_q1-4g2vMsrxJ1zQeLKh1sB7uJTQmndITq5ldrCwoDAWDiHvR0La06PUAj5aCSDRR1C25k/s1600/Character_sequenc_c.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU7Dmt6CQC4d77KaNgUP3FRK9qBKLZ3V3U5WlRotF_X_JPEDxS2x9ixP7AZI1GrVis_dmgC_q1-4g2vMsrxJ1zQeLKh1sB7uJTQmndITq5ldrCwoDAWDiHvR0La06PUAj5aCSDRR1C25k/s1600/Character_sequenc_c.png" /></a></div>
<b><br /></b><br />
<b><br /></b><br />
<br />
<div style="background-color: white; font-size: small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<table style="background-color: white; color: black; font-family: 'Georgia Serif'; font-size: small; text-align: left;"><tbody>
<tr bgcolor="#E3E4FA"><td><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">If you have any <span class="Apple-style-span" style="color: red;">Further Information</span> and <span class="Apple-style-span" style="color: red;">Quires</span> about this Article don't hesitate to comment in comment box below.</span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> AND</span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> If you like this article , like our <span class="Apple-style-span" style="color: red;">Facebook like page</span> and <span class="Apple-style-span" style="color: red;">click +1</span> to support 123techguide</span></div>
</div>
</td></tr>
</tbody></table>
</div>
</div>
</div>
</div>
</div><div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>Anonymoushttp://www.blogger.com/profile/11837588965426020130noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-9959586119651128692012-02-12T21:04:00.000+05:302012-02-12T21:04:21.282+05:30Word and Character Count<div dir="ltr" style="text-align: left;" trbidi="on">
This C program counts number of words and characters in a string.<br />
<a name='more'></a><br />
<b><u><span style="color: #6aa84f;">Example</span></u></b> <b>: </b><br />
<br />
<ul style="text-align: left;">
<li>" hello world " is a string.</li>
<li>No of word in a string : 2</li>
<li>No of character in a string :10</li>
</ul>
<div>
<u><span style="color: #6aa84f;"><br /></span></u></div>
<div>
<b><u><span style="color: #6aa84f;">Program</span></u> :</b></div>
<div>
<b><br /></b></div>
<div>
<pre style="background: #f1f0f0; color: black;"><span style="color: #004a43;">#</span><span style="color: #004a43;">include</span><span style="color: maroon;"><</span><span style="color: #40015a;">stdio.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include</span><span style="color: maroon;"><</span><span style="color: #40015a;">conio.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include</span><span style="color: maroon;"><</span><span style="color: #40015a;">string.h</span><span style="color: maroon;">></span>
<span style="color: #400000; font-weight: bold;">void</span> <span style="color: maroon; font-weight: bold;">main</span><span style="color: #806030;">(</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">char</span> ch<span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">do</span><span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">char</span> a<span style="color: #806030;">[</span><span style="color: #c00000;">20</span><span style="color: #806030;">]</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">int</span> i<span style="color: #806030;">,</span>w<span style="color: #806030;">=</span><span style="color: #c00000;">1</span><span style="color: #806030;">,</span>c<span style="color: #806030;">=</span><span style="color: #c00000;">0</span><span style="color: #806030;">;</span>
clrscr<span style="color: #806030;">(</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #e60000;">Enter a string:</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">gets</span><span style="color: #806030;">(</span>a<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
strlwr<span style="color: #806030;">(</span>a<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">for</span><span style="color: #806030;">(</span>i<span style="color: #806030;">=</span><span style="color: #c00000;">0</span><span style="color: #806030;">;</span>a<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">!</span><span style="color: #806030;">=</span><span style="color: #007d45;">NULL</span><span style="color: #806030;">;</span>i<span style="color: #806030;">+</span><span style="color: #806030;">+</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">if</span><span style="color: #806030;">(</span>a<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">' '</span><span style="color: #806030;">&</span><span style="color: #806030;">&</span> a<span style="color: #806030;">[</span>i<span style="color: #806030;">+</span><span style="color: #c00000;">1</span><span style="color: #806030;">]</span><span style="color: #806030;">!</span><span style="color: #806030;">=</span><span style="color: green;">'.'</span><span style="color: #806030;">)</span>
w<span style="color: #806030;">+</span><span style="color: #806030;">+</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">if</span><span style="color: #806030;">(</span>a<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">></span><span style="color: #806030;">=</span><span style="color: green;">'a'</span> <span style="color: #806030;">&</span><span style="color: #806030;">&</span> a<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;"><</span><span style="color: #806030;">=</span><span style="color: green;">'z'</span><span style="color: #806030;">)</span>
c<span style="color: #806030;">+</span><span style="color: #806030;">+</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #e60000;"> No of Word in a String : <</span><span style="color: #0f6900;">%d</span><span style="color: #e60000;">></span><span style="color: maroon;">"</span><span style="color: #806030;">,</span>w<span style="color: #806030;">)</span><span style="color: #806030;">;</span> <span style="color: #c34e00;">// Check next character [i+1]</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #e60000;"> No of Character in a String : <</span><span style="color: #0f6900;">%d</span><span style="color: #e60000;">></span><span style="color: maroon;">"</span><span style="color: #806030;">,</span>c<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\n</span><span style="color: #e60000;"> Continue(y/n):</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
ch<span style="color: #806030;">=</span>getch<span style="color: #806030;">(</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span><span style="color: #400000; font-weight: bold;">while</span><span style="color: #806030;">(</span>ch<span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'y'</span><span style="color: #806030;">|</span><span style="color: #806030;">|</span>ch<span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'Y'</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
</pre>
<b><br /></b></div>
<div>
<b><u><span style="color: #6aa84f;">Output</span></u> :</b><br />
<b><br /></b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0JoKW1vGsDYK9EtzDQUogd5WtXr42PRwBAfMvqpp07uNdK0cya9BzORoHshDCP73tHhrIyNuWxLnbgFzu6kSB19yUo-sIRfeYvaAL5iGqqpeEKR6-zQBHPaLG7HvTh76M0plCPbJaNdw/s1600/word_count_c.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0JoKW1vGsDYK9EtzDQUogd5WtXr42PRwBAfMvqpp07uNdK0cya9BzORoHshDCP73tHhrIyNuWxLnbgFzu6kSB19yUo-sIRfeYvaAL5iGqqpeEKR6-zQBHPaLG7HvTh76M0plCPbJaNdw/s1600/word_count_c.png" /></a></div>
<b><br /></b></div>
<div>
<b><br /></b><br />
<b><br /></b><br />
<br />
<table style="background-color: white; color: black; font-family: 'Georgia Serif'; font-size: small; text-align: left;"><tbody>
<tr bgcolor="#E3E4FA"><td><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">If you have any <span class="Apple-style-span" style="color: red;">Further Information</span> and <span class="Apple-style-span" style="color: red;">Quires</span> about this Article don't hesitate to comment in comment box below.</span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> AND</span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> If you like this article , like our <span class="Apple-style-span" style="color: red;">Facebook like page</span> and <span class="Apple-style-span" style="color: red;">click +1</span> to support 123techguide</span></div>
</div>
</td></tr>
</tbody></table>
</div>
</div><div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>Anonymoushttp://www.blogger.com/profile/11837588965426020130noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-32623067596162557502012-02-12T11:56:00.001+05:302012-02-12T11:59:19.502+05:30Count Number Of Vowels And Consonants In A String<div dir="ltr" style="text-align: left;" trbidi="on">
This C program to count number of vowels and consonants in an entered string. Here variables " v mean vowel " is increment whenever is a vowel found in tracing otherwise " c mean consonant " is increment .<br />
<br />
<a name='more'></a><br />
<br />
<span style="color: #6aa84f;"><u><b>Program</b></u></span><b> :</b><br />
<b><br />
</b>
<br />
<pre style="background: #f1f0f0; color: black;"><span style="color: #004a43;">#</span><span style="color: #004a43;">include</span><span style="color: maroon;"><</span><span style="color: #40015a;">stdio.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include</span><span style="color: maroon;"><</span><span style="color: #40015a;">conio.h</span><span style="color: maroon;">></span>
<span style="color: #400000; font-weight: bold;">void</span> <span style="color: maroon; font-weight: bold;">main</span><span style="color: #806030;">(</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">char</span> ch<span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">do</span><span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">char</span> s<span style="color: #806030;">[</span><span style="color: #c00000;">100</span><span style="color: #806030;">]</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">int</span> i<span style="color: #806030;">,</span>v<span style="color: #806030;">=</span><span style="color: #c00000;">0</span><span style="color: #806030;">,</span>c<span style="color: #806030;">=</span><span style="color: #c00000;">0</span><span style="color: #806030;">;</span>
clrscr<span style="color: #806030;">(</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\n</span><span style="color: #e60000;"> Enter a string :</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">gets</span><span style="color: #806030;">(</span>s<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">for</span><span style="color: #806030;">(</span>i<span style="color: #806030;">=</span><span style="color: #c00000;">0</span><span style="color: #806030;">;</span>s<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">!</span><span style="color: #806030;">=</span><span style="color: #007d45;">NULL</span><span style="color: #806030;">;</span>i<span style="color: #806030;">+</span><span style="color: #806030;">+</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">if</span><span style="color: #806030;">(</span>s<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'a'</span><span style="color: #806030;">|</span><span style="color: #806030;">|</span>s<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'e'</span><span style="color: #806030;">|</span><span style="color: #806030;">|</span>s<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'i'</span><span style="color: #806030;">|</span><span style="color: #806030;">|</span>s<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'o'</span><span style="color: #806030;">|</span><span style="color: #806030;">|</span>s<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'u'</span><span style="color: #806030;">|</span><span style="color: #806030;">|</span>
s<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'A'</span><span style="color: #806030;">|</span><span style="color: #806030;">|</span>s<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'E'</span><span style="color: #806030;">|</span><span style="color: #806030;">|</span>s<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'I'</span><span style="color: #806030;">|</span><span style="color: #806030;">|</span>s<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'O'</span><span style="color: #806030;">|</span><span style="color: #806030;">|</span>s<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'U'</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
v<span style="color: #806030;">+</span><span style="color: #806030;">+</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
<span style="color: #400000; font-weight: bold;">else</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">if</span><span style="color: #806030;">(</span>s<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">!</span><span style="color: #806030;">=</span><span style="color: green;">' '</span><span style="color: #806030;">|</span><span style="color: #806030;">|</span>s<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">!</span><span style="color: #806030;">=</span><span style="color: green;">'.'</span><span style="color: #806030;">)</span>
c<span style="color: #806030;">+</span><span style="color: #806030;">+</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
<span style="color: #806030;">}</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\n</span><span style="color: #e60000;"> The total number of vowel is[</span><span style="color: #0f6900;">%d</span><span style="color: #e60000;">] and consonants is [</span><span style="color: #0f6900;">%d</span><span style="color: #e60000;">] </span><span style="color: maroon;">"</span><span style="color: #806030;">,</span>v<span style="color: #806030;">,</span>c<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\n</span><span style="color: #e60000;"> Continue (y/n):</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
ch<span style="color: #806030;">=</span>getch<span style="color: #806030;">(</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span><span style="color: #400000; font-weight: bold;">while</span><span style="color: #806030;">(</span>ch<span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'y'</span><span style="color: #806030;">|</span><span style="color: #806030;">|</span>ch<span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'Y'</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
</pre>
<br />
<b><u><span style="color: #6aa84f;">Output</span></u> :</b><br />
<b><br /></b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtczHBIxtL1DdvrQt54xic1F4u9EwII2P20mvXbh6DnK3QgobFJMNYrNxlqXb4o8Q2OEPjIviU4LMJbABj3v2_ziedotLrxQmF2B5d7s0EXZR0hnIzkKua_uZeXg9xBAWjG9XQ6vvmc6E/s1600/vowel_consonant.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtczHBIxtL1DdvrQt54xic1F4u9EwII2P20mvXbh6DnK3QgobFJMNYrNxlqXb4o8Q2OEPjIviU4LMJbABj3v2_ziedotLrxQmF2B5d7s0EXZR0hnIzkKua_uZeXg9xBAWjG9XQ6vvmc6E/s1600/vowel_consonant.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<b><br /></b><br />
<br />
<table style="background-color: white; color: black; font-family: 'Georgia Serif'; font-size: small; text-align: left;"><tbody>
<tr bgcolor="#E3E4FA"><td><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">If you have any <span class="Apple-style-span" style="color: red;">Further Information</span> and <span class="Apple-style-span" style="color: red;">Quires</span> about this Article don't hesitate to comment in comment box below.</span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> AND</span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> If you like this article , like our <span class="Apple-style-span" style="color: red;">Facebook like page</span> and <span class="Apple-style-span" style="color: red;">click +1</span> to support 123techguide</span></div>
</div>
</td></tr>
</tbody></table>
</div><div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>Anonymoushttp://www.blogger.com/profile/11837588965426020130noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-51117942305253272542012-02-10T12:14:00.001+05:302012-02-10T12:16:13.202+05:30Linear Search<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Arial, Helvetica, sans-serif;">Linear search is not the most efficient way to search for an item in a collection of items . If the array elements are arranged in random order , it is the only reasonable way to search . Linear search is very simple to implement .The simplest of all the searching techniques is Linear or Sequential search.</span><br />
<a name='more'></a><br />
<b><u><span style="color: #6aa84f;">Program</span></u></b> <b>:</b><br />
<br />
<pre style="background: #f1f0f0; color: black;"><span style="color: #004a43;">#</span><span style="color: #004a43;">include</span><span style="color: maroon;"><</span><span style="color: #40015a;">stdio.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include</span><span style="color: maroon;"><</span><span style="color: #40015a;">conio.h</span><span style="color: maroon;">></span>
<span style="color: #c34e00;">/* Global variables */</span>
<span style="color: #400000; font-weight: bold;">int</span> flag<span style="color: #806030;">;</span>
<span style="color: #c34e00;">/* Function Declarations */</span>
<span style="color: #400000; font-weight: bold;">void</span> liner_search<span style="color: #806030;">(</span><span style="color: #400000; font-weight: bold;">int</span> <span style="color: #806030;">[</span><span style="color: #806030;">]</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">void</span> <span style="color: maroon; font-weight: bold;">main</span><span style="color: #806030;">(</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">char</span> ch<span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">int</span> i<span style="color: #806030;">,</span> arr<span style="color: #806030;">[</span><span style="color: #c00000;">10</span><span style="color: #806030;">]</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">do</span><span style="color: #806030;">{</span>
clrscr<span style="color: #806030;">(</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">for</span><span style="color: #806030;">(</span>i<span style="color: #806030;">=</span><span style="color: #c00000;">0</span><span style="color: #806030;">;</span>i<span style="color: #806030;"><</span><span style="color: #c00000;">10</span><span style="color: #806030;">;</span>i<span style="color: #806030;">+</span><span style="color: #806030;">+</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\n</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;"> Enter No : </span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">scanf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">%d</span><span style="color: maroon;">"</span><span style="color: #806030;">,</span><span style="color: #806030;">&</span>arr<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
liner_search<span style="color: #806030;">(</span>arr<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\n</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;">Continue(y/n):</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
ch<span style="color: #806030;">=</span>getch<span style="color: #806030;">(</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span><span style="color: #400000; font-weight: bold;">while</span><span style="color: #806030;">(</span>ch<span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'y'</span><span style="color: #806030;">|</span><span style="color: #806030;">|</span>ch<span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'Y'</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
<span style="color: #400000; font-weight: bold;">void</span> liner_search<span style="color: #806030;">(</span><span style="color: #400000; font-weight: bold;">int</span> arr<span style="color: #806030;">[</span><span style="color: #c00000;">10</span><span style="color: #806030;">]</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">int</span> i<span style="color: #806030;">,</span>s<span style="color: #806030;">;</span>
flag<span style="color: #806030;">=</span><span style="color: #c00000;">0</span><span style="color: #806030;">;</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\n</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;"> Searching No: </span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">scanf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">%d</span><span style="color: maroon;">"</span><span style="color: #806030;">,</span><span style="color: #806030;">&</span>s<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">for</span><span style="color: #806030;">(</span>i<span style="color: #806030;">=</span><span style="color: #c00000;">0</span><span style="color: #806030;">;</span>i<span style="color: #806030;"><</span><span style="color: #c00000;">10</span><span style="color: #806030;">;</span>i<span style="color: #806030;">+</span><span style="color: #806030;">+</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">if</span><span style="color: #806030;">(</span>arr<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">=</span><span style="color: #806030;">=</span>s<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
flag<span style="color: #806030;">=</span><span style="color: #c00000;">1</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
<span style="color: #400000; font-weight: bold;">if</span><span style="color: #806030;">(</span>flag<span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #c00000;">1</span><span style="color: #806030;">)</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\n</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;"> Search sucessful </span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">else</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\n</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;"> Unscessful </span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
</pre>
<br />
<b><u><span style="color: #6aa84f;">Output</span></u> :</b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlTDldPGK2hOrIGr8M-uRLPR4FTg78uFUC_cO4K-yIZDzBqReUC7bN2tbE6TElu9_45vp7HCg1eCGXkrI1LUK2wKB05BvpZ2rQftR-XjsNklYCjtNGWoAZrjeOWmVdTDkdVinh4lGUefA/s1600/linera_search.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlTDldPGK2hOrIGr8M-uRLPR4FTg78uFUC_cO4K-yIZDzBqReUC7bN2tbE6TElu9_45vp7HCg1eCGXkrI1LUK2wKB05BvpZ2rQftR-XjsNklYCjtNGWoAZrjeOWmVdTDkdVinh4lGUefA/s1600/linera_search.png" /></a></div>
<br />
<br />
<br />
<table style="background-color: white; color: black; font-family: 'Georgia Serif'; font-size: small; text-align: left;"><tbody>
<tr bgcolor="#E3E4FA"><td><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">If you have any <span class="Apple-style-span" style="color: red;">Further Information</span> and <span class="Apple-style-span" style="color: red;">Quires</span> about this Article don't hesitate to comment in comment box below.</span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> AND</span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> If you like this article , like our <span class="Apple-style-span" style="color: red;">Facebook like page</span> and <span class="Apple-style-span" style="color: red;">click +1</span> to support 123techguide</span></div>
</div>
</td></tr>
</tbody></table>
</div><div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>Anonymoushttp://www.blogger.com/profile/11837588965426020130noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-16932551197061698492012-02-03T21:44:00.000+05:302012-02-03T21:44:50.702+05:30Binary Search Using C Program<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Arial, Helvetica, sans-serif;">A sorted array is searched by Binary search.If the array is sorted , we can employ binary search , which brilliantly halves the size of the search space each time it examines one array element.Binary means two , so it divides an array two halves for searching . This searching is applicable only to an ordered table ( in either ascending or in descending order ) .</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<a name='more'></a><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #6aa84f;"><u><b>Program code</b></u></span> :</span><br />
<br />
<br />
<pre style="background: #f1f0f0; color: black;"><span style="color: #004a43;">#</span><span style="color: #004a43;">include</span><span style="color: maroon;"><</span><span style="color: #40015a;">stdio.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include</span><span style="color: maroon;"><</span><span style="color: #40015a;">conio.h</span><span style="color: maroon;">></span>
<span style="color: #400000; font-weight: bold;">void</span> binary_search<span style="color: #806030;">(</span><span style="color: #400000; font-weight: bold;">int</span> <span style="color: #806030;">[</span><span style="color: #806030;">]</span><span style="color: #806030;">,</span><span style="color: #400000; font-weight: bold;">int</span><span style="color: #806030;">,</span><span style="color: #400000; font-weight: bold;">int</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">void</span> <span style="color: maroon; font-weight: bold;">main</span><span style="color: #806030;">(</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">char</span> ch<span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">int</span> arr<span style="color: #806030;">[</span><span style="color: #c00000;">100</span><span style="color: #806030;">]</span><span style="color: #806030;">,</span>v<span style="color: #806030;">,</span>size<span style="color: #806030;">,</span>i<span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">do</span><span style="color: #806030;">{</span>
clrscr<span style="color: #806030;">(</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;"> Enter array size : </span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">scanf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">%d</span><span style="color: maroon;">"</span><span style="color: #806030;">,</span><span style="color: #806030;">&</span>size<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">for</span><span style="color: #806030;">(</span>i<span style="color: #806030;">=</span><span style="color: #c00000;">0</span><span style="color: #806030;">;</span>i<span style="color: #806030;"><</span>size<span style="color: #806030;">;</span>i<span style="color: #806030;">+</span><span style="color: #806030;">+</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\n</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;"> Enter element :</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">scanf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">%d</span><span style="color: maroon;">"</span><span style="color: #806030;">,</span><span style="color: #806030;">&</span>arr<span style="color: #806030;">[</span>i<span style="color: #806030;">]</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\n</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;"> Search element :</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">scanf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">%d</span><span style="color: maroon;">"</span><span style="color: #806030;">,</span><span style="color: #806030;">&</span>v<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
binary_search<span style="color: #806030;">(</span>arr<span style="color: #806030;">,</span>v<span style="color: #806030;">,</span>size<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\n</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;"> Continue (y/n):</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
ch<span style="color: #806030;">=</span>getch<span style="color: #806030;">(</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span><span style="color: #400000; font-weight: bold;">while</span><span style="color: #806030;">(</span>ch<span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'y'</span><span style="color: #806030;">|</span><span style="color: #806030;">|</span>ch<span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'Y'</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
<span style="color: #400000; font-weight: bold;">void</span> binary_search<span style="color: #806030;">(</span><span style="color: #400000; font-weight: bold;">int</span> arr<span style="color: #806030;">[</span><span style="color: #806030;">]</span><span style="color: #806030;">,</span><span style="color: #400000; font-weight: bold;">int</span> v<span style="color: #806030;">,</span><span style="color: #400000; font-weight: bold;">int</span> size<span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">int</span> found<span style="color: #806030;">=</span><span style="color: #c00000;">0</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">int</span> high<span style="color: #806030;">=</span>size<span style="color: #806030;">-</span><span style="color: #c00000;">1</span><span style="color: #806030;">,</span>low<span style="color: #806030;">=</span><span style="color: #c00000;">0</span><span style="color: #806030;">,</span>mid<span style="color: #806030;">;</span>
mid<span style="color: #806030;">=</span><span style="color: #806030;">(</span>high<span style="color: #806030;">+</span>low<span style="color: #806030;">)</span><span style="color: #806030;">/</span><span style="color: #c00000;">2</span><span style="color: #806030;">;</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\n</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;"> Looking for </span><span style="color: #0f6900;">%d</span><span style="color: #0f6900;">\n</span><span style="color: #0f6900;">\t</span><span style="color: maroon;">"</span><span style="color: #806030;">,</span>v<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">while</span><span style="color: #806030;">(</span><span style="color: #806030;">(</span><span style="color: #806030;">!</span>found<span style="color: #806030;">)</span><span style="color: #806030;">&</span><span style="color: #806030;">&</span><span style="color: #806030;">(</span>high<span style="color: #806030;">></span><span style="color: #806030;">=</span>low<span style="color: #806030;">)</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #e60000;">Low:</span><span style="color: #0f6900;">%d</span><span style="color: #e60000;"> Mid:</span><span style="color: #0f6900;">%d</span><span style="color: #e60000;"> High:</span><span style="color: #0f6900;">%d</span><span style="color: #0f6900;">\n</span><span style="color: #0f6900;">\t</span><span style="color: maroon;">"</span><span style="color: #806030;">,</span>low<span style="color: #806030;">,</span>mid<span style="color: #806030;">,</span>high<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">if</span><span style="color: #806030;">(</span>v<span style="color: #806030;">=</span><span style="color: #806030;">=</span>arr<span style="color: #806030;">[</span>mid<span style="color: #806030;">]</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #e60000;">Key value found at position </span><span style="color: #0f6900;">%d</span><span style="color: maroon;">"</span><span style="color: #806030;">,</span>mid<span style="color: #806030;">+</span><span style="color: #c00000;">1</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
found<span style="color: #806030;">=</span><span style="color: #c00000;">1</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
<span style="color: #400000; font-weight: bold;">else</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">if</span><span style="color: #806030;">(</span>v<span style="color: #806030;"><</span>arr<span style="color: #806030;">[</span>mid<span style="color: #806030;">]</span><span style="color: #806030;">)</span>
high<span style="color: #806030;">=</span>mid<span style="color: #806030;">-</span><span style="color: #c00000;">1</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">else</span>
low<span style="color: #806030;">=</span>mid<span style="color: #806030;">+</span><span style="color: #c00000;">1</span><span style="color: #806030;">;</span>
mid<span style="color: #806030;">=</span><span style="color: #806030;">(</span>high<span style="color: #806030;">+</span>low<span style="color: #806030;">)</span><span style="color: #806030;">/</span><span style="color: #c00000;">2</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
<span style="color: #806030;">}</span>
<span style="color: #400000; font-weight: bold;">if</span><span style="color: #806030;">(</span>found<span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #c00000;">1</span><span style="color: #806030;">)</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\n</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;"> Search sucessful</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">else</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\n</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;"> key value not found</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
</pre>
<br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;"><b><u><span style="color: #6aa84f;">Output</span></u></b> :</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFKKdWFsXDRbS4jj5C7KQNV0qE_J6CnzfMKcnilw6NFSBC4BwQqU_NoNUVclv6S7OZoP2cL5hMX2FqV0otkirKAH1mh-2-CwJfPga5-Cj1a5jj96429Xp00zkpzgf-h_f3OuXyrW_nwzw/s1600/Binary_search.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Binary search" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFKKdWFsXDRbS4jj5C7KQNV0qE_J6CnzfMKcnilw6NFSBC4BwQqU_NoNUVclv6S7OZoP2cL5hMX2FqV0otkirKAH1mh-2-CwJfPga5-Cj1a5jj96429Xp00zkpzgf-h_f3OuXyrW_nwzw/s1600/Binary_search.png" /></a></div>
<br />
<br />
<br />
<table style="background-color: white; color: black; font-family: 'Georgia Serif'; font-size: small; text-align: left;"><tbody>
<tr bgcolor="#E3E4FA"><td><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">If you have any <span class="Apple-style-span" style="color: red;">Further Information</span> and <span class="Apple-style-span" style="color: red;">Quires</span> about this Article don't hesitate to comment in comment box below.</span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> AND</span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> If you like this article , like our <span class="Apple-style-span" style="color: red;">Facebook like page</span> and <span class="Apple-style-span" style="color: red;">click +1</span> to support 123techguide</span></div>
</div>
</td></tr>
</tbody></table>
</div><div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>Anonymoushttp://www.blogger.com/profile/11837588965426020130noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-49533472221098502152012-01-30T21:11:00.000+05:302012-02-02T01:27:43.738+05:30Checking Prime Number : Program In C<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Arial, Helvetica, sans-serif;">A prime number is a integer number greater than 1 and which number can be divided by 1 or itself .</span><br />
<a name='more'></a><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><b><u style="background-color: white;"><span style="color: #6aa84f;">Example</span></u></b> <b>:</b></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">2,3,5,7,11,13,17,19,23,29,31,37,41,43</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><b><u><span style="color: #6aa84f;">Prime Number program In C</span></u></b> <b>:</b></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><b><br /></b></span><br />
<pre style="background: #f1f0f0; color: black;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #004a43;">#</span><span style="color: #004a43;">include</span><span style="color: maroon;"><</span><span style="color: #40015a;">stdio.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include</span><span style="color: maroon;"><</span><span style="color: #40015a;">conio.h</span><span style="color: maroon;">></span>
<span style="color: #400000; font-weight: bold;">void</span> <span style="color: maroon; font-weight: bold;">main</span><span style="color: #806030;">(</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">char</span> ch<span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">do</span><span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">int</span> a<span style="color: #806030;">,</span>b<span style="color: #806030;">,</span>flag<span style="color: #806030;">=</span><span style="color: #c00000;">0</span><span style="color: #806030;">;</span>
clrscr<span style="color: #806030;">(</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;">Enter a no (1-2000):</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">scanf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">%d</span><span style="color: maroon;">"</span><span style="color: #806030;">,</span><span style="color: #806030;">&</span>a<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">if</span><span style="color: #806030;">(</span>a<span style="color: #806030;"><</span><span style="color: #c00000;">1</span> <span style="color: #806030;">&</span><span style="color: #806030;">&</span> a<span style="color: #806030;">></span><span style="color: #c00000;">2000</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #800040;">exit</span><span style="color: #806030;">(</span><span style="color: #c00000;">0</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
<span style="color: #400000; font-weight: bold;">for</span><span style="color: #806030;">(</span>b<span style="color: #806030;">=</span><span style="color: #c00000;">2</span><span style="color: #806030;">;</span>b<span style="color: #806030;"><</span>a<span style="color: #806030;">;</span>b<span style="color: #806030;">+</span><span style="color: #806030;">+</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">if</span><span style="color: #806030;">(</span>a<span style="color: #806030;">%</span>b<span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #c00000;">0</span> <span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
flag<span style="color: #806030;">=</span><span style="color: #c00000;">1</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">break</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
<span style="color: #806030;">}</span>
<span style="color: #400000; font-weight: bold;">if</span><span style="color: #806030;">(</span>flag<span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: #c00000;">0</span><span style="color: #806030;">)</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\n</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;"><</span><span style="color: #0f6900;">%d</span><span style="color: #e60000;">> is a prime no</span><span style="color: #0f6900;">\n</span><span style="color: maroon;">"</span><span style="color: #806030;">,</span>a<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">else</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\n</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;"><</span><span style="color: #0f6900;">%d</span><span style="color: #e60000;">> is not a prime no</span><span style="color: #0f6900;">\n</span><span style="color: maroon;">"</span><span style="color: #806030;">,</span>a<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\n</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;">Continue(y/n):</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
ch<span style="color: #806030;">=</span>getch<span style="color: #806030;">(</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span><span style="color: #400000; font-weight: bold;">while</span><span style="color: #806030;">(</span>ch<span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'y'</span><span style="color: #806030;">|</span><span style="color: #806030;">|</span>ch<span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'Y'</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
</span></pre>
<b><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></b><br />
<b><span style="font-family: Arial, Helvetica, sans-serif;"><u><span style="color: #6aa84f;">Output</span></u> :</span></b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8XHRRWFsapiynPVLHVmrn5AVR4gZJzfKT5yLTDJ54wtMxFY3ckxmII97Kq4lq8Jf3_tSSMlvmRakhDCh1end4l1zLp-i1LhuwJQ-DnVWfPfM9vGfwUvdzJ-lpZreML7ZE_R4sYMrAGHU/s1600/prime_no.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Arial, Helvetica, sans-serif;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8XHRRWFsapiynPVLHVmrn5AVR4gZJzfKT5yLTDJ54wtMxFY3ckxmII97Kq4lq8Jf3_tSSMlvmRakhDCh1end4l1zLp-i1LhuwJQ-DnVWfPfM9vGfwUvdzJ-lpZreML7ZE_R4sYMrAGHU/s1600/prime_no.png" alt="Prime_number.png"/></span></a></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><b><br /></b></span><br />
<b><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></b><br />
<br />
<table style="background-color: white; color: black; font-size: small; text-align: left;"><tbody>
<tr bgcolor="#E3E4FA"><td><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">If you have any <span class="Apple-style-span" style="color: red;">Further Information</span> and <span class="Apple-style-span" style="color: red;">Quires</span> about this Article don't hesitate to comment in comment box below.</span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> AND</span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> If you like this article , like our <span class="Apple-style-span" style="color: red;">Facebook like page</span> and <span class="Apple-style-span" style="color: red;">click +1</span> to support 123techguide</span></div>
</div>
</td></tr>
</tbody></table>
</div><div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>Anonymoushttp://www.blogger.com/profile/11837588965426020130noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-72354918732211778152012-01-27T20:48:00.003+05:302012-02-02T01:31:00.148+05:3012 Free Blog Hosting Sites<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
1. <b><span style="color: #3d85c6;"> <u>Blogger.com</u></span> : </b>It is a great site easy to use.Blogger is a free blog website that allow users post , text , video etc.<br />
<a name='more'></a></div>
<b><span style="color: #6aa84f;"> <u>Features</u></span></b> <b>:</b><br />
<br />
<ul style="text-align: left;">
<li>Gorgeous themes.</li>
<li>Great tools for writing.</li>
<li>Team members 100.</li>
<li>Individual pages are limited to 1 MB.</li>
<li>Widgets.</li>
<li>Multi-author blog.</li>
<li>Google adsense plugin.</li>
<li>Full Html/Css control.</li>
<li>Detailed traffic states.</li>
<li>Gorgeous dashboard.</li>
</ul>
2. <b><u><span style="color: #3d85c6;">Wordpress.org</span></u> :</b> Wordpress is a another similar and popular website beside blogger.More benefits for paid members .<br />
<br />
<b><span style="color: #6aa84f;"> <u>Features</u></span> :</b><br />
<br />
<ul style="text-align: left;">
<li>Gorgeous themes</li>
<li>Integrated state system. </li>
<li>Track replies your comment.</li>
<li>Spam detect.</li>
<li>Great tools for writing. </li>
</ul>
<br />
3. <b><u><span style="color: #3d85c6;">Blogster.com</span></u></b> <b>:</b> Blogster is a blogging community.its offers free blog and image hosting.<br />
<br />
4. <span style="color: #3d85c6;"><b> <u>Blog.com</u></b></span> <b>:</b> Blog.com offers free and paid plans.It offers unlimited bandwidth for free members .<br />
<br />
<span style="color: #6aa84f; font-weight: bold;"> </span><u style="color: #6aa84f; font-weight: bold;">Features</u><b> :</b><br />
<br />
<ul style="text-align: left;">
<li>Choose best domain.</li>
<li>Beautiful themes.</li>
<li>Multi-author blog.</li>
<li>Service Integration.</li>
<li>Multimedia support.</li>
<li>Earn money.</li>
<li>Widgets.</li>
</ul>
<div>
5. <b><u><span style="color: #3d85c6;">Tmblr.com</span></u></b> <b>:</b> Tumblr is a free micro blogging site that allow users post ,text, image ,video,quote etc.Do not pay storage and bandwidth.</div>
<div>
<br /></div>
<div>
<b><span style="background-color: white;"><span style="color: #6aa84f;"> <u>Features</u></span></span></b> <b>:</b></div>
<div>
<ul style="text-align: left;">
<li>Create original themes and hundred of themes choose from.</li>
<li>Mobile-ability.</li>
<li>Post anything.</li>
<li>Custom domains.</li>
<li>Third part apps.</li>
<li>Google optimized .</li>
<li>Get asked and answer.</li>
<li>Publish to Facebook.</li>
<li>Community power blogs. </li>
</ul>
<div>
6. <b><u><span style="color: #3d85c6;"> Livejournal.com</span></u></b> <b>:</b> Livejournal is a blogging website as well as social networking site .It offers multiple accounts.</div>
</div>
<div>
<br /></div>
<div>
7. <b><u><span style="color: #3d85c6;">Weebly.com</span></u></b> <b>:</b> Webbly allows you to create blog and site.It offers free and paid service .</div>
<div>
<br /></div>
<div>
<b><u><span style="color: #6aa84f;">Features</span></u></b> <b>:</b></div>
<div>
<ul style="text-align: left;">
<li>Drag and drop website builder .</li>
<li>Professional themes available.</li>
<li>Photo galleries and slide shows.</li>
<li>Image Editor.</li>
<li>No forced for Advertising.</li>
<li>Detailed Traffic states .</li>
<li>Full Html/CSS control.</li>
</ul>
</div>
<div>
8. <b><u><span style="color: #3d85c6;">Open Diary.com</span></u></b> <b>: </b>Open Diary is a blogging site as well as online diary.Offers unlimited storage and post.<br />
<br /></div>
<div>
9. <b><u><span style="color: #3d85c6;">Blogetery.com</span></u></b> <b>:</b> Blogetery is a blogging website .Offers free and paid service.</div>
<div>
<br /></div>
<div>
<b><u><span style="color: #6aa84f;">Features</span></u></b> :</div>
<div>
<ul style="text-align: left;">
<li>Domain mapping .</li>
<li>Google adsense plugin.</li>
<li>Customizable themes.</li>
<li>Great tools for writing .</li>
</ul>
</div>
<div>
10. <span style="color: #3d85c6;"><u><b>Blogsome.com</b></u></span> <b>:</b> Blogsome is a free web hosting site for blogs.</div>
<div>
</div>
<div>
<span style="color: #6aa84f;"><b><u>Features</u></b></span> :</div>
<div>
<ul style="text-align: left;">
<li>Fast , easy and free.</li>
<li>Themes.</li>
<li>Upload photos.</li>
<li>Personalize your design.</li>
</ul>
</div>
<div>
11. <b> <u><span style="color: #3d85c6;">Blog.co.uk</span></u></b> <b>:</b> Another blog site is Blog.co.uk.<br />
<b><br /></b><br />
<b><span style="color: #6aa84f;"> <u>Features</u></span> : </b><br />
<br />
<ul style="text-align: left;">
<li>Uploading photo and videos.</li>
<li>Your individual design.</li>
<li>Media features .</li>
</ul>
12. <b><u><span style="color: #3d85c6;">Myblogsite.com</span></u></b> <b>:</b> Myblogsite is offers best blog tools on net.It is easy to use .<br />
<br />
<span style="color: #6aa84f;"><b><u>Features</u> </b></span><b>:</b><br />
<br />
<ul style="text-align: left;">
<li>Easy management .</li>
<li>Convenient tools .</li>
<li>Notification tools .</li>
<li>Syndication .</li>
</ul>
<br />
<div style="background-color: white; font-size: small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
</div>
</div>
</div>
<table style="background-color: white; color: black; font-size: small; text-align: left;"><tbody>
<tr bgcolor="#E3E4FA"><td><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">If you have any <span class="Apple-style-span" style="color: red;">Further Information</span> and <span class="Apple-style-span" style="color: red;">Quires</span> about this Article don't hesitate to comment in comment box below.</span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> AND</span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> If you like this article , like our <span class="Apple-style-span" style="color: red;">Facebook like page</span> and <span class="Apple-style-span" style="color: red;">click +1</span> to support 123techguide</span></div>
</div>
</td></tr>
</tbody></table>
</div>
</div>
</div><div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>Anonymoushttp://www.blogger.com/profile/11837588965426020130noreply@blogger.comtag:blogger.com,1999:blog-7265013926024308218.post-45885827547073860002012-01-26T15:33:00.000+05:302012-02-02T01:32:27.815+05:30Find Sum OF Digits : C<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Arial, Helvetica, sans-serif;">This program find sum of the digits entered number.The idea is slice the every digits from number and then sum of digits.</span><br />
<a name='more'></a><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<b><span style="font-family: Arial, Helvetica, sans-serif;"><u><span style="color: #6aa84f;">Example</span></u> :</span></b><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<ul style="text-align: left;">
<li><span style="font-family: Arial, Helvetica, sans-serif;">Assume Entered number is : 789</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Now slice the given number : 9 , 8 ,7.</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Sum of the digits is : 9+8+7=24.</span></li>
</ul>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><b><u><span style="color: #6aa84f;">Sum Of Digits</span></u></b> <b>:</b></span></div>
<div>
<b><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></b></div>
<div>
<b><span style="font-family: Arial, Helvetica, sans-serif;"><u style="color: #3d85c6;">Program</u> :</span></b></div>
<div>
<b><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></b></div>
<pre style="background: #f1f0f0; color: black;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #004a43;">#</span><span style="color: #004a43;">include</span><span style="color: maroon;"><</span><span style="color: #40015a;">stdio.h</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include</span><span style="color: maroon;"><</span><span style="color: #40015a;">conio.h</span><span style="color: maroon;">></span>
<span style="color: #400000; font-weight: bold;">void</span> <span style="color: maroon; font-weight: bold;">main</span><span style="color: #806030;">(</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">char</span> ch<span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">do</span><span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">long</span> <span style="color: #400000; font-weight: bold;">int</span> n<span style="color: #806030;">,</span>i<span style="color: #806030;">,</span>s<span style="color: #806030;">=</span><span style="color: #c00000;">0</span> <span style="color: #806030;">,</span>r<span style="color: #806030;">;</span>
clrscr<span style="color: #806030;">(</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\n</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;">Enter Number(1-999999999):</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">scanf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">%ld</span><span style="color: maroon;">"</span><span style="color: #806030;">,</span><span style="color: #806030;">&</span>n<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #400000; font-weight: bold;">if</span><span style="color: #806030;">(</span>n<span style="color: #806030;">></span><span style="color: #806030;">=</span><span style="color: #c00000;">1</span> <span style="color: #806030;">|</span><span style="color: #806030;">|</span> n<span style="color: #806030;"><</span><span style="color: #806030;">=</span><span style="color: #c00000;">999999999</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
<span style="color: #400000; font-weight: bold;">while</span><span style="color: #806030;">(</span>n<span style="color: #806030;">></span><span style="color: #806030;">=</span><span style="color: #c00000;">1</span><span style="color: #806030;">)</span>
<span style="color: #806030;">{</span>
r<span style="color: #806030;">=</span>n<span style="color: #806030;">%</span><span style="color: #c00000;">10</span><span style="color: #806030;">;</span>
s<span style="color: #806030;">=</span>s<span style="color: #806030;">+</span>r<span style="color: #806030;">;</span>
n<span style="color: #806030;">=</span>n<span style="color: #806030;">/</span><span style="color: #c00000;">10</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
<span style="color: #806030;">}</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\n</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;"> Sum of digit:<</span><span style="color: #0f6900;">%d</span><span style="color: #e60000;">></span><span style="color: maroon;">"</span><span style="color: #806030;">,</span>s<span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #800040;">printf</span><span style="color: #806030;">(</span><span style="color: maroon;">"</span><span style="color: #0f6900;">\n</span><span style="color: #0f6900;">\t</span><span style="color: #e60000;"> Continue(y/n):</span><span style="color: maroon;">"</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span></span></pre>
<pre style="background-attachment: initial; background-clip: initial; background-color: #f1f0f0; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"><span style="font-family: Arial, Helvetica, sans-serif;">
ch<span style="color: #806030;">=</span>getch<span style="color: #806030;">(</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span><span style="color: #400000; font-weight: bold;">while</span><span style="color: #806030;">(</span>ch<span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'y'</span><span style="color: #806030;">|</span><span style="color: #806030;">|</span>ch<span style="color: #806030;">=</span><span style="color: #806030;">=</span><span style="color: green;">'Y'</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
getch<span style="color: #806030;">(</span><span style="color: #806030;">)</span><span style="color: #806030;">;</span>
<span style="color: #806030;">}</span>
</span></pre>
<div>
<b><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></b></div>
<div>
<b><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #3d85c6;"><u>Output</u></span> :</span></b><br />
<b><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAV3AzkcZOPzy9RWZ69ApFWMHCz0sX5YICFN_cHIDUvtzA1KcXHWbCFfQmevc5JRJLcv_7CaqUQDs92-dUmLVq-mQF_58ZTu7ECUgwU3qNrFrbJLfttUjdPOplUeR15Y4jqQaCAo82HYo/s1600/sum_digit.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Arial, Helvetica, sans-serif;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAV3AzkcZOPzy9RWZ69ApFWMHCz0sX5YICFN_cHIDUvtzA1KcXHWbCFfQmevc5JRJLcv_7CaqUQDs92-dUmLVq-mQF_58ZTu7ECUgwU3qNrFrbJLfttUjdPOplUeR15Y4jqQaCAo82HYo/s1600/sum_digit.png" alt="No Preview " /></span></a></div>
<b><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></b><br />
<b><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></b></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<table style="background-color: white; color: black; font-size: small; text-align: left;"><tbody>
<tr bgcolor="#E3E4FA"><td><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">If you have any <span class="Apple-style-span" style="color: red;">Further Information</span> and <span class="Apple-style-span" style="color: red;">Quires</span> about this Article don't hesitate to comment in comment box below.</span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> AND</span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> If you like this article , like our <span class="Apple-style-span" style="color: red;">Facebook like page</span> and <span class="Apple-style-span" style="color: red;">click +1</span> to support 123techguide</span></div>
</div>
</td></tr>
</tbody></table>
</div>
</div><div class="blogger-post-footer">If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide</div>Anonymoushttp://www.blogger.com/profile/11837588965426020130noreply@blogger.com