<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4374953614255982024</id><updated>2024-10-25T14:22:14.752+05:30</updated><category term="Data structure and algorithm"/><category term="Patterns."/><category term="C language"/><category term="C++"/><category term="Learn programming for free"/><category term="Programs"/><category term="Web development"/><title type='text'>Learn programming for free</title><subtitle type='html'>A guide for geeks!</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-7827522749595153375</id><published>2020-12-08T19:26:00.004+05:30</published><updated>2020-12-14T09:39:57.081+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Data structure and algorithm"/><title type='text'>Learn recursion for beginners.</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Learn recursion for beginners.&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Recursion is a function that call itself. It is an important concept. Recursion should must have a base condition that stop it from further calling.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;General syntax of recursion.&lt;/span&gt;&lt;/h2&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;b&gt;void fun(int x)&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; //&amp;nbsp; logic&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;b&gt;int main()&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; fun(x);&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&amp;nbsp;return 0;&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;When we call the recursion then printing is done at two time;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;b&gt;Printing at calling time.&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;b&gt;Printing at returning time.&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Printing at calling time:&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;#include&amp;lt;stdio.h&amp;gt;&lt;/b&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;void fun(int x)&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;{&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if(x&amp;gt;0)&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;printf(&quot;%d&quot;,x);&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;fun(x-1);&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;}&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;int main()&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;{&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int x = 3;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;fun(x);&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;}&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Printing at returning time:&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;#include&amp;lt;stdio.h&amp;gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;void fun(int x)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if(x&amp;gt;0)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;fun(x-1);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;printf(&quot;%d&quot;,x);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;int main()&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int x = 3;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;fun(x);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Difference between loop and recursion:&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;1. Loop is repetitive statement.&lt;/div&gt;&lt;div&gt;2. Recursion is also repetitive statement.But loop will have ascending phase and recursion will have both ascending and descending phase.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;


  
  &lt;br /&gt;
  &lt;br /&gt;

&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Types of recursion:&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Tail recursion&lt;/li&gt;&lt;li&gt;Head recursion&lt;/li&gt;&lt;li&gt;Tree recursion&lt;/li&gt;&lt;li&gt;Indirect recursion&lt;/li&gt;&lt;li&gt;Nested recursion&lt;/li&gt;&lt;/ol&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/h3&gt;&amp;nbsp;1.Tail recursion:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is type of recursion where everything performed at calling time.Function will not do anything at returning time.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Program:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;b&gt;#include&amp;lt;stdio.h&amp;gt;&lt;/b&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;void fun(int x)&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;{&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if(x&amp;gt;0)&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;printf(&quot;%d&quot;,x);&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;fun(x-1);&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;}&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;int main()&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;{&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int x = 3;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;fun(x);&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;}&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;2.Head recursion:&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This type of recursion will perform everything at returning time.This will not do anything at calling time.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If the function is performing something at returning time it can&#39;t be easily converted into loop but it can be converted.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Program that explain head recursion:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;#include&amp;lt;stdio.h&amp;gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;void fun(int x)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if(x&amp;gt;0)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;fun(x-1);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;printf(&quot;%d&quot;,x);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;int main()&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int x = 3;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;fun(x);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;3. Tree recursion.&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In this type of recursion a function is called multiple time.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Program that explain tree recursion:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;#include&amp;lt;stdio.h&amp;gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;void fun(int x)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if(x&amp;gt;0)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;printf(&quot;%d&quot;,x);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;fun(x-1);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;fun(x-1);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;int main()&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int x = 3;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;fun(x);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;4. Indirect recursion.&lt;/b&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;In indirect recursion there may be more than one function calling each other in circular fashion.So that the first function calls second one and then second function calls third one and then third function again callback first function.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Then it become a cycle so it become recursion.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;5. Nested recursion.&lt;/h3&gt;&lt;div&gt;This is basically recursion inside recursion.&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;#include&amp;lt;stdio.h&amp;gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;int fun(int n)&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;{&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if(n&amp;gt;100)&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;return n-10;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;else&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;return fun(fun(n+10));&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;}&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;int main()&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;{&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int x = 3;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int d = fun(x);&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;printf(&quot;%d&quot;,d);&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;}&lt;/b&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/7827522749595153375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/learn-recursion-for-beginners.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/7827522749595153375'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/7827522749595153375'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/learn-recursion-for-beginners.html' title='Learn recursion for beginners.'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>West Bengal, India</georss:featurename><georss:point>22.9867569 87.8549755</georss:point><georss:box>-5.3234769361788459 52.698725499999995 51.296990736178842 123.0112255</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-282356661344355305</id><published>2020-12-08T15:04:00.003+05:30</published><updated>2020-12-08T15:04:50.630+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Web development"/><title type='text'>Web development for beginners.</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Web development for beginners.&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;This course will make you an expert in web development.But before moving on this advance topic you should be very well versed with your fundamentals of programming.Because it will boost your journey to become full stack web developer.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;This course is designed for absolute beginner covering all aspect of web development.Here you will find all topic covering all aspect of web development.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: georgia; font-size: 14px;&quot;&gt;Before knowing what is a full stack web developer or what work a full stack developer does,we should know what is frontend and backend&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; box-sizing: border-box; color: #474747; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 1.84615rem; line-height: 1.3em; margin: 0.76923rem 0px; padding: 0px;&quot;&gt;What is frontend?&lt;/h3&gt;&lt;br style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px;&quot; /&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: times;&quot;&gt;Let&#39;s understand it with very simple example we all are aware from facebook,when we type facebook.com in our web browser it redirects us to official website of facebook.Where it wither tells us to login or signup.This is frontend part of facebook.So basically frontend part communicate with clients. The part which communicate with client is called as frontend part.&lt;/span&gt;&lt;/div&gt;&lt;br style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px;&quot; /&gt;&lt;br style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px;&quot; /&gt;&lt;h3 style=&quot;background-color: white; box-sizing: border-box; color: #474747; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 1.84615rem; line-height: 1.3em; margin: 0.76923rem 0px; padding: 0px;&quot;&gt;What is backend?&lt;/h3&gt;&lt;br style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px;&quot; /&gt;&lt;br style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px;&quot; /&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;Let&#39;s continue with our facebook example while we enter our details like name,email,password.We must imagine where all these data goes.All these data gets stored inside a database.So that again when we logged in, facebook can authenticate a valid user and must identifies every user as independent identity.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;So this part come into playing with data.This is what a backend developer does.&lt;/p&gt;&lt;br style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px;&quot; /&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px;&quot;&gt;So know i hope you all must be aware from frontend and backend part in brief. Now come to our main topic we should now in position to know what is a full stack we developer.So a developer which can handle both frontend and backend part is called as a full stack web developer.This is what we will cover in this course.&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Tools that we required to become a frontend web developer&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are very basic tools or you can say a frontend web developer should must know these tools.&lt;/div&gt;&lt;div&gt;These are :&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;HTML&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;CSS&lt;br /&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;JAVASCRIPT&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;1.HTML&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is what a web developer should must know.Without HTML&lt;/div&gt;&lt;div&gt;you can&#39;t consider any web page or web application.This should be known by every web developer.HTML is used to structure our web page.The page that you are seeing right now is structure using HTML.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;2.CSS&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is used to give style to web page.Without CSS our web page might not looks so good and interactive as compared to when we use CSS to designed our web page.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So you can consider CSS as web styler who style our web page.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;3.JAVASCRIPT&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;This is used to add interactivity with our web page.Have you ever seen when we click on button then modals open up or when we click on drop-down menu then it will display all element.All these things are implemented using javascript.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As i think according to today market skills every one should must know javascript.Because javascript is used every where in web application from frontend to backend.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2&gt;Tools that we required to become a frontend web developer&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To become backend web developer there are many popular language you can pick up any one and just learn it thoroughly.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In this course we will learn two most popular backend language:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;PHP&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Node.js&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/282356661344355305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/web-development-for-beginners.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/282356661344355305'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/282356661344355305'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/web-development-for-beginners.html' title='Web development for beginners.'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>West Bengal, India</georss:featurename><georss:point>22.9867569 87.8549755</georss:point><georss:box>-5.3234769361788459 52.698725499999995 51.296990736178842 123.0112255</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-7387027298766054050</id><published>2020-12-08T14:32:00.004+05:30</published><updated>2020-12-08T14:33:59.920+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Programs"/><title type='text'>Programs for beginners.</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Programs for beginners.&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;In this tutorial you will get all topic wise program links for free:&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Topics wise:&lt;/h2&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/arrays-for-beginners-for-free.html&quot; target=&quot;_blank&quot;&gt;Array&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Linked list&lt;/li&gt;&lt;li&gt;Recursion&lt;/li&gt;&lt;li&gt;Trees&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/7387027298766054050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/programs-for-beginners.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/7387027298766054050'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/7387027298766054050'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/programs-for-beginners.html' title='Programs for beginners.'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>West Bengal, India</georss:featurename><georss:point>22.9867569 87.8549755</georss:point><georss:box>-5.3234769361788459 52.698725499999995 51.296990736178842 123.0112255</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-8419634571838522785</id><published>2020-12-08T14:21:00.000+05:30</published><updated>2020-12-08T14:21:01.101+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Data structure and algorithm"/><title type='text'>Find whether an element is present in an array or not.</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Find whether an element is present in an array or not.&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Question: Write a program to find whether an element is present in an array or not?&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Explanation:&amp;nbsp;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;A[10] = {10,20,30,40,50,60},ele = 60&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;We have to find whether element 60 is present in our array or not.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span&gt;&lt;span&gt;Programs:&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;#include&amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;using namespace std;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;int main()&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;{&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int A[10] = {10,20,30,40,50,60},pos,ele,flag=0;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;cout&amp;lt;&amp;lt;&quot;Enter an element to search:&quot;&amp;lt;&amp;lt;endl;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;cin&amp;gt;&amp;gt;ele;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;for(int i=0;i&amp;lt;6;i++)&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;if(A[i] == ele)&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;{&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;flag = 1;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;break;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;}&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if(flag==1)&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;cout&amp;lt;&amp;lt;&quot;Element found&quot;;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}else{&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;cout&amp;lt;&amp;lt;&quot;Element not found&quot;;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/8419634571838522785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/find-whether-element-is-present-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/8419634571838522785'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/8419634571838522785'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/find-whether-element-is-present-in.html' title='Find whether an element is present in an array or not.'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>India</georss:featurename><georss:point>20.593684 78.96288</georss:point><georss:box>-7.7165498361788458 43.80663 48.903917836178849 114.11913</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-5431327675970618441</id><published>2020-12-08T14:14:00.000+05:30</published><updated>2020-12-08T14:14:11.683+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Data structure and algorithm"/><title type='text'>FInd index of an element in array.</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Find index of an element in array.&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Question: write a program to find index of an element in array ?&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Explanation:&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;A[10] = {10,20,30,40,50,60},ele = 60.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Answer: 5&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Because element 60 is present at index 5.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Program:&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;#include&amp;lt;iostream&amp;gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;using namespace std;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;int main()&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;{&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int A[10] = {10,20,30,40,50,60},pos,ele,flag=0;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;cout&amp;lt;&amp;lt;&quot;Enter an element to search:&quot;&amp;lt;&amp;lt;endl;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;cin&amp;gt;&amp;gt;ele;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;for(int i=0;i&amp;lt;6;i++)&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;if(A[i] == ele)&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;{&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;pos = i;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;flag = 1;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;break;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;}&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if(flag==1)&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;cout&amp;lt;&amp;lt;&quot;Element found&quot;&amp;lt;&amp;lt;pos;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}else{&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;cout&amp;lt;&amp;lt;&quot;Element not found&quot;;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;}&lt;/b&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/5431327675970618441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/find-index-of-element-in-array.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/5431327675970618441'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/5431327675970618441'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/find-index-of-element-in-array.html' title='FInd index of an element in array.'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>West Bengal, India</georss:featurename><georss:point>22.9867569 87.8549755</georss:point><georss:box>-5.3234769361788459 52.698725499999995 51.296990736178842 123.0112255</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-7890295041601511134</id><published>2020-12-08T13:41:00.000+05:30</published><updated>2020-12-08T13:41:00.542+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Data structure and algorithm"/><title type='text'>Deletion in an array for beginner for free.</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Deletion in an array.&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;For example:&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;After deletion: A[] = {10,20,30,40,50,60};&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Delete an element at index = 3.&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;After deletion:&amp;nbsp; A[] = {10,20,30,50,60};&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Programs:&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;#include&amp;lt;iostream&amp;gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;using namespace std;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;int main()&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;{&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int A[10] = {10,20,30,40,50,60},delPos = 3;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;b&gt;	&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;for(int i=delPos+1;i&amp;lt;6;i++)&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;A[i-1] = A[i];&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;b&gt;	&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;for(int i=0;i&amp;lt;5;i++)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;cout&amp;lt;&amp;lt;A[i]&amp;lt;&amp;lt;endl;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;}&lt;/b&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/7890295041601511134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/deletion-in-array-for-beginner-for-free.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/7890295041601511134'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/7890295041601511134'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/deletion-in-array-for-beginner-for-free.html' title='Deletion in an array for beginner for free.'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>West Bengal, India</georss:featurename><georss:point>22.9867569 87.8549755</georss:point><georss:box>-5.3234769361788459 52.698725499999995 51.296990736178842 123.0112255</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-8195628878495497661</id><published>2020-12-08T13:29:00.003+05:30</published><updated>2020-12-08T13:29:24.054+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Data structure and algorithm"/><title type='text'>Insertion in an array for beginner in c++.</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Insertion in an array.&lt;/h1&gt;&lt;div&gt;For example:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Before insertion:&amp;nbsp; A[] = {10,20,30,40,50,60};&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Insert an element = 100 at position index = 3.&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;After insertion: A[] = {10,20,30,100,40,50,60};&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Program:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;#include&amp;lt;iostream&amp;gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;using namespace std;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;int main()&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int A[10] = {10,20,30,40,50,60},position = 3,element = 100;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;b&gt;	&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;for(int i=5;i&amp;gt;= position;i--)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;A[i+1] = A[i];&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;b&gt;	&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;A[position] = element;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;for(int i=0;i&amp;lt;7;i++)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;cout&amp;lt;&amp;lt;A[i]&amp;lt;&amp;lt;endl;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/8195628878495497661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/insertion-in-array-for-beginner-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/8195628878495497661'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/8195628878495497661'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/insertion-in-array-for-beginner-in-c.html' title='Insertion in an array for beginner in c++.'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>West Bengal, India</georss:featurename><georss:point>22.9867569 87.8549755</georss:point><georss:box>-5.3234769361788459 52.698725499999995 51.296990736178842 123.0112255</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-2059739965918034793</id><published>2020-12-08T13:10:00.008+05:30</published><updated>2020-12-08T14:21:40.562+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Data structure and algorithm"/><title type='text'>Arrays for beginners for free.</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;Array.&lt;/h1&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Array is basically a contiguous memory allocation of same data type.It can&#39;t be of different data type.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;It is a homogeneous continuous memory allocation.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;We will learn about:&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;What is an Array&lt;/li&gt;&lt;li&gt;Declaring and initializing&lt;/li&gt;&lt;li&gt;Accessing array element&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;1.What is an array:&lt;/h2&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Array is basically a contiguous memory allocation of same data type.It can&#39;t be of different data type.&lt;/p&gt;&lt;div&gt;&lt;p&gt;It is a homogeneous continuous memory allocation.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;2.Declaring and initializing:&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;int A[5];&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The above statement is used for declaring an array.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;int A[5] = {1,2,3,4,5};&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The above statement is used for initialing an array.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Program to illustrate difference between declaring and initializing:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;#include&amp;lt;iostream&amp;gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;using namespace std;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;int main()&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int A[5];&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;b&gt;	&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int B[5] = {1,2,3,4,5};&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;b&gt;	&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;for(int i=0;i&amp;lt;5;i++)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;cout&amp;lt;&amp;lt;&quot;Enter element for array A&quot;;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;cin&amp;gt;&amp;gt;A[i];&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;b&gt;	&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;for(int i=0;i&amp;lt;5;i++)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;cout&amp;lt;&amp;lt;A[i]&amp;lt;&amp;lt;&quot; &quot;;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;cout&amp;lt;&amp;lt;endl;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;for(int i=0;i&amp;lt;5;i++)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;cout&amp;lt;&amp;lt;B[i]&amp;lt;&amp;lt;&quot; &quot;;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;3.Accessing array element:&lt;/h2&gt;&lt;div&gt;We can access array element with their position index.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;Program that will explain how to access array element:&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;div&gt;#include&amp;lt;iostream&amp;gt;&lt;/div&gt;&lt;div&gt;using namespace std;&lt;/div&gt;&lt;div&gt;int main()&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int A[5];&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;for(int i=0;i&amp;lt;5;i++)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;cout&amp;lt;&amp;lt;&quot;Enter element for array A&quot;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;cin&amp;gt;&amp;gt;A[i];&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;for(int i=0;i&amp;lt;5;i++)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;cout&amp;lt;&amp;lt;A[i]&amp;lt;&amp;lt;&quot; &quot;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Programs on array:&lt;/h3&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/insertion-in-array-for-beginner-in-c.html&quot; target=&quot;_blank&quot;&gt;Insertion in array&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/deletion-in-array-for-beginner-for-free.html&quot; target=&quot;_blank&quot;&gt;Deletion in array&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/find-index-of-element-in-array.html&quot; target=&quot;_blank&quot;&gt;Finding an index of&amp;nbsp; a element in array&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/find-whether-element-is-present-in.html&quot; target=&quot;_blank&quot;&gt;Finding whether an element in present in an array or not&lt;/a&gt;&lt;/li&gt;&lt;li&gt;How to increase an array size&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/2059739965918034793/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/arrays-for-beginners-for-free.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/2059739965918034793'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/2059739965918034793'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/arrays-for-beginners-for-free.html' title='Arrays for beginners for free.'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>India</georss:featurename><georss:point>20.593684 78.96288</georss:point><georss:box>-7.7165498361788458 43.80663 48.903917836178849 114.11913</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-71577321884264535</id><published>2020-12-08T12:19:00.006+05:30</published><updated>2020-12-08T19:27:46.155+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Data structure and algorithm"/><title type='text'>Data structure and algorithm for beginner for free</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Data structure and algorithm for free&lt;/h1&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;In this blog you will get to know each data structure and algorithm in details for free.This course is designed absolutely for free for beginners.Each topic is explain in depth for free for beginners.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;But before moving to understand each topic in depth we should know fundamentals of programming.So prerequisite of this course would be familiar with fundamentals of programming like how to take input,outout,loops,functions.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;If you don&#39;t know you can &lt;a href=&quot;https://codeial.blogspot.com/2020/12/programming.html&quot; target=&quot;_blank&quot;&gt;click here&lt;/a&gt; to learn fundamental of programming for free in depth.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;But before moving to know what is data structure and algorithm we should definitely know what is programming.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;Programs:&lt;/span&gt;&lt;/h2&gt;&lt;div&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;A program is set of instructions which perform some operations on data.Data is important part of program.When a program executes it operates on some data.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;Data structure and algorithm:&lt;/span&gt;&lt;/h2&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;How we organise data in main memory during execution of program this is known as data structure and algorithm.This become very important part for any program that you they are organizing their data so that it could be used very effectively.How our program is using our data.What is complexity of our program.These are very important factor when we designed an algorithm to solve our problem.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;b&gt;So we can say that data structure is all about how you are going to store your data in your main memory so that it could be effectively used by your programs.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;Now in this course you will get to know each data structure and algorithm in depth for free.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;Here we are going to use C as our fundamental language to implement our data structure.Because if you will use C++ then you have STL to do everything and similarly for java we have collection class.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;If you want to learn C in depth then &lt;a href=&quot;https://codeial.blogspot.com/2020/12/c-language.html&quot; target=&quot;_blank&quot;&gt;click here&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;C is not having any built in data structure.That&#39;s why we are going to use this because it is not sufficient to know data structure.It become very important for us how to implement them also.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;Types of data structure:&lt;/span&gt;&lt;/h2&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;Physical data structure&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;Logical data structure&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;1.Physical data structure&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;These are type of data structure which helps in how to organise your data in main memory.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;Example of physical data structure.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;Arrays&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;Matrices&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;Linked list&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;2.Logical data structure&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;These are type of data structure which helps in how data can be utilized very effectively.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;Example of logical data structure.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;Stack&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;Queues&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;Trees&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;Graph&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;Hashing&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;We will discuss each of them in depth.Here is topic wise links of each data structure.&lt;br /&gt;Happy coding...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/arrays-for-beginners-for-free.html&quot; target=&quot;_blank&quot;&gt;Array&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/learn-recursion-for-beginners.html&quot; target=&quot;_blank&quot;&gt;Recursion&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;Matrices&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;Linked list&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;Stack&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;Queues&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;Trees&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;Graph&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;Hashing&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/71577321884264535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/data-structure-and-algorithm-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/71577321884264535'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/71577321884264535'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/data-structure-and-algorithm-for.html' title='Data structure and algorithm for beginner for free'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>West Bengal, India</georss:featurename><georss:point>22.9867569 87.8549755</georss:point><georss:box>-5.3234769361788459 52.698725499999995 51.296990736178842 123.0112255</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-503688358748627180</id><published>2020-12-05T14:33:00.006+05:30</published><updated>2020-12-05T14:33:46.727+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Patterns."/><title type='text'>Simple pattern 6 in C++ language.</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Simple pattern 6 in C++ language.&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;In this blog we will learn to print simple pattern in C++.It is very simple pattern printing.It is fundamental part of programming.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;We are going to print below pattern:&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/p&gt;&lt;h1 style=&quot;background-color: white; box-sizing: border-box; color: #474747; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 2.76923rem; line-height: 1.1em; margin: 0.76923rem 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #333333; font-size: 14px;&quot;&gt;Question: Write a program in c++ that take input from user and print following pattern till user input?&lt;/span&gt;&lt;/h1&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;1&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;1&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;2&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;2&lt;span&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;3&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;1&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;2&amp;nbsp; &amp;nbsp; 3&amp;nbsp; &amp;nbsp;4&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h1 style=&quot;background-color: white; box-sizing: border-box; color: #474747; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 2.76923rem; line-height: 1.1em; margin: 0.76923rem 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #333333; font-size: 14px;&quot;&gt;solution:&lt;/span&gt;&lt;/h1&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;box-sizing: border-box; color: #333333; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px;&quot;&gt;&lt;span style=&quot;color: #333333; font-family: courier;&quot;&gt;&lt;div&gt;#include&amp;lt;iostream&amp;gt;&lt;/div&gt;&lt;div&gt;using namespace std;&lt;/div&gt;&lt;div&gt;int main()&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int n;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;cin&amp;gt;&amp;gt;n;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;for(int i=1;i&amp;lt;=n;i++)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;int count = 1;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;for(int j=1;j&amp;lt;=n;j++)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;if(j &amp;gt;= n-i+1)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;				&lt;/span&gt;cout&amp;lt;&amp;lt;count++;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;else&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;				&lt;/span&gt;cout&amp;lt;&amp;lt;&quot; &quot;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;cout&amp;lt;&amp;lt;endl;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/503688358748627180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/simple-pattern-6-in-c-language.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/503688358748627180'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/503688358748627180'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/simple-pattern-6-in-c-language.html' title='Simple pattern 6 in C++ language.'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>West Bengal, India</georss:featurename><georss:point>22.9867569 87.8549755</georss:point><georss:box>-5.3234769361788459 52.698725499999995 51.296990736178842 123.0112255</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-1192426489890049851</id><published>2020-12-05T14:22:00.005+05:30</published><updated>2020-12-05T14:22:38.492+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Patterns."/><title type='text'>Simple pattern 5 in C++.</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;Simple pattern 5 in C++.&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;In this blog we will learn to print simple pattern in C++.It is very simple pattern printing.It is fundamental part of programming.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;We are going to print below pattern:&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/p&gt;&lt;h1 style=&quot;background-color: white; box-sizing: border-box; color: #474747; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 2.76923rem; line-height: 1.1em; margin: 0.76923rem 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #333333; font-size: 14px;&quot;&gt;Question: Write a program in c++ that take input from user and print following pattern till user input?&lt;/span&gt;&lt;/h1&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;box-sizing: border-box; color: #333333; font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;p style=&quot;font-family: courier; font-size: 14px;&quot;&gt;1&lt;/p&gt;&lt;p style=&quot;font-family: courier; font-size: 14px;&quot;&gt;1 2&lt;/p&gt;&lt;p style=&quot;font-family: courier; font-size: 14px;&quot;&gt;2 3 4&lt;/p&gt;&lt;p style=&quot;font-family: courier; font-size: 14px;&quot;&gt;4 5 6 7&lt;/p&gt;&lt;p style=&quot;font-family: courier; font-size: 14px;&quot;&gt;7 8 9 10 11&lt;/p&gt;&lt;p style=&quot;font-family: courier; font-size: 14px;&quot;&gt;11 12 13 14 15 16&lt;/p&gt;&lt;p style=&quot;font-family: courier; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h1 style=&quot;background-color: white; box-sizing: border-box; color: #474747; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 2.76923rem; line-height: 1.1em; margin: 0.76923rem 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #333333; font-size: 14px;&quot;&gt;solution:&lt;/span&gt;&lt;/h1&gt;&lt;div style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #333333; font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;div&gt;#include&amp;lt;iostream&amp;gt;&lt;/div&gt;&lt;div&gt;using namespace std;&lt;/div&gt;&lt;div&gt;int main()&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int n,now=1,prev=1;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;cin&amp;gt;&amp;gt;n;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;for(int i=1;i&amp;lt;=n;i++)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;for(int j=1;j&amp;lt;=i;j++)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;prev = now;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;cout&amp;lt;&amp;lt;now++&amp;lt;&amp;lt;&quot; &quot;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;now = prev;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;cout&amp;lt;&amp;lt;endl;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/1192426489890049851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/simple-pattern-5-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/1192426489890049851'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/1192426489890049851'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/simple-pattern-5-in-c.html' title='Simple pattern 5 in C++.'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>West Bengal, India</georss:featurename><georss:point>22.9867569 87.8549755</georss:point><georss:box>-5.3234769361788459 52.698725499999995 51.296990736178842 123.0112255</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-2716404905291953716</id><published>2020-12-05T14:09:00.006+05:30</published><updated>2020-12-05T14:09:41.266+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Patterns."/><title type='text'>Simple pattern 4 in C++.</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;Simple pattern 4 in C++.&lt;/h1&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/h1&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;In this blog we will learn to print simple pattern in C++.It is very simple pattern printing.It is fundamental part of programming.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;We are going to print below pattern:&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/p&gt;&lt;h1 style=&quot;background-color: white; box-sizing: border-box; color: #474747; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 2.76923rem; line-height: 1.1em; margin: 0.76923rem 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #333333; font-size: 14px;&quot;&gt;Question: Write a program in c++ that take input from user and print following pattern till user input?&lt;/span&gt;&lt;/h1&gt;&lt;h1 style=&quot;background-color: white; box-sizing: border-box; color: #474747; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 2.76923rem; line-height: 1.1em; margin: 0.76923rem 0px; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/h1&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;1&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;2&amp;nbsp; &amp;nbsp;3&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;4&amp;nbsp; &amp;nbsp;5&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp; &amp;nbsp; 6&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;background-color: white; box-sizing: border-box; color: #474747; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 2.76923rem; line-height: 1.1em; margin: 0.76923rem 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #333333; font-size: 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;7&amp;nbsp; &amp;nbsp; 8&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp; &amp;nbsp; 9&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp; &amp;nbsp;10&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1 style=&quot;background-color: white; box-sizing: border-box; color: #474747; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 2.76923rem; line-height: 1.1em; margin: 0.76923rem 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #333333; font-size: 14px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px;&quot;&gt;solution:&lt;/span&gt;&lt;/h1&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-size: 14px;&quot;&gt;&lt;span style=&quot;color: #333333; font-family: georgia;&quot;&gt;&lt;b&gt;&lt;div&gt;#include&amp;lt;iostream&amp;gt;&lt;/div&gt;&lt;div&gt;using namespace std;&lt;/div&gt;&lt;div&gt;int main()&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int n,count=1;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;cin&amp;gt;&amp;gt;n;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;for(int i=1;i&amp;lt;=n;i++)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;for(int j=1;j&amp;lt;=i;j++)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;cout&amp;lt;&amp;lt;count++&amp;lt;&amp;lt;&quot; &quot;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;cout&amp;lt;&amp;lt;endl;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;/h1&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/2716404905291953716/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/simple-pattern-4-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/2716404905291953716'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/2716404905291953716'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/simple-pattern-4-in-c.html' title='Simple pattern 4 in C++.'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>West Bengal, India</georss:featurename><georss:point>22.9867569 87.8549755</georss:point><georss:box>-5.3234769361788459 52.698725499999995 51.296990736178842 123.0112255</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-2438622189151385258</id><published>2020-12-05T14:06:00.003+05:30</published><updated>2020-12-05T14:06:25.248+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Patterns."/><title type='text'>Simple pattern3 in C++.</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;Simple pattern 3 in C++.&lt;/h1&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/h1&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;In this blog we will learn to print simple pattern in C++.It is very simple pattern printing.It is fundamental part of programming.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;We are going to print below pattern:&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/p&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px;&quot;&gt;Question: Write a program in c++ that take input from user and print following pattern till user input?&lt;/span&gt;&lt;/h1&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/h1&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;1&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;2&amp;nbsp; &amp;nbsp;1&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;3&amp;nbsp; &amp;nbsp; 2&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp; &amp;nbsp; 1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #333333; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;4&amp;nbsp; &amp;nbsp; 3&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp; &amp;nbsp; 2&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp; &amp;nbsp;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: #333333; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h1&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;solution:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1&gt;&lt;span style=&quot;color: #333333; font-family: Open Sans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;#include&amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1&gt;&lt;span style=&quot;color: #333333; font-family: Open Sans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;using namespace std;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1&gt;&lt;span style=&quot;color: #333333; font-family: Open Sans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;int main()&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1&gt;&lt;span style=&quot;color: #333333; font-family: Open Sans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1&gt;&lt;span style=&quot;color: #333333; font-family: Open Sans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int n;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1&gt;&lt;span style=&quot;color: #333333; font-family: Open Sans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;cin&amp;gt;&amp;gt;n;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1&gt;&lt;span style=&quot;color: #333333; font-family: Open Sans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;for(int i=1;i&amp;lt;=n;i++)&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1&gt;&lt;span style=&quot;color: #333333; font-family: Open Sans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1&gt;&lt;span style=&quot;color: #333333; font-family: Open Sans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;int x = i;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1&gt;&lt;span style=&quot;color: #333333; font-family: Open Sans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;for(int j=1;j&amp;lt;=i;j++)&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1&gt;&lt;span style=&quot;color: #333333; font-family: Open Sans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1&gt;&lt;span style=&quot;color: #333333; font-family: Open Sans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;cout&amp;lt;&amp;lt;x--&amp;lt;&amp;lt;&quot; &quot;;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1&gt;&lt;span style=&quot;color: #333333; font-family: Open Sans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1&gt;&lt;span style=&quot;color: #333333; font-family: Open Sans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;cout&amp;lt;&amp;lt;endl;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1&gt;&lt;span style=&quot;color: #333333; font-family: Open Sans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1&gt;&lt;span style=&quot;color: #333333; font-family: Open Sans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 14px;&quot;&gt;&lt;span style=&quot;color: #333333; font-family: Open Sans, sans-serif;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #333333; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;/h1&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/2438622189151385258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/simple-pattern3-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/2438622189151385258'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/2438622189151385258'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/simple-pattern3-in-c.html' title='Simple pattern3 in C++.'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>West Bengal, India</georss:featurename><georss:point>22.9867569 87.8549755</georss:point><georss:box>-5.3234769361788459 52.698725499999995 51.296990736178842 123.0112255</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-6395923629179373573</id><published>2020-12-05T14:01:00.008+05:30</published><updated>2020-12-05T14:03:05.271+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Patterns."/><title type='text'>Simple pattern2 in C++.</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;Simple pattern2 in C++.&lt;/h1&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/h1&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;In this blog we will learn to print simple pattern in C++.It is very simple pattern printing.It is fundamental part of programming.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;We are going to print below pattern:&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/p&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;span face=&quot;&amp;quot;Open Sans&amp;quot;, sans-serif&quot; style=&quot;background-color: white; color: #333333; font-size: 14px;&quot;&gt;Question: Write a program in c++ that take input from user and print following pattern till user input ?&lt;/span&gt;&lt;/h1&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/h1&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;1&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;2&amp;nbsp; &amp;nbsp;2&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;3&amp;nbsp; &amp;nbsp; 3&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp; &amp;nbsp; 3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;4&amp;nbsp; &amp;nbsp; 4&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp; &amp;nbsp; 4&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp; &amp;nbsp;4&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;solution:&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;b&gt;&lt;div&gt;#include&amp;lt;iostream&amp;gt;&lt;/div&gt;&lt;div&gt;using namespace std;&lt;/div&gt;&lt;div&gt;int main()&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int n;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;cin&amp;gt;&amp;gt;n;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;for(int i=1;i&amp;lt;=n;i++)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;for(int j=1;j&amp;lt;=i;j++)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;cout&amp;lt;&amp;lt;i&amp;lt;&amp;lt;&quot; &quot;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;cout&amp;lt;&amp;lt;endl;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/6395923629179373573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/simple-pattern-in-c_5.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/6395923629179373573'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/6395923629179373573'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/simple-pattern-in-c_5.html' title='Simple pattern2 in C++.'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>West Bengal, India</georss:featurename><georss:point>22.9867569 87.8549755</georss:point><georss:box>-5.3234769361788459 52.698725499999995 51.296990736178842 123.0112255</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-8248089161932697422</id><published>2020-12-04T13:24:00.002+05:30</published><updated>2020-12-05T14:03:18.912+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Patterns."/><title type='text'>Simple pattern1 in C++.</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Simple pattern1 in C++.&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;In this blog we will learn to print simple pattern in C++.It is very simple pattern printing.It is fundamental part of programming.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;We are going to print below pattern:&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Question: Write a program in c++ that take input from user and print following pattern till user input ?&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;1&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;1&lt;span&gt;&amp;nbsp; &amp;nbsp; 2&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span&gt;1&lt;span&gt;&amp;nbsp; &amp;nbsp; 2&lt;span&gt;&amp;nbsp; &amp;nbsp; 3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;1&lt;span&gt;&amp;nbsp; &amp;nbsp; 2&lt;span&gt;&amp;nbsp; &amp;nbsp; 3&lt;span&gt;&amp;nbsp; &amp;nbsp; 4&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;1&lt;span&gt;&amp;nbsp; &amp;nbsp; 2&lt;span&gt;&amp;nbsp; &amp;nbsp; 3&lt;span&gt;&amp;nbsp; &amp;nbsp; 4&lt;span&gt;&amp;nbsp; &amp;nbsp; 5&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;solution:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;#include&amp;lt;iostream&amp;gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;using namespace std;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;int main()&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;{&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int n;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;cin&amp;gt;&amp;gt;n;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;for(int i=1;i&amp;lt;=n;i++)&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;for(int j=1;j&amp;lt;=i;j++)&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;{&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;cout&amp;lt;&amp;lt;j&amp;lt;&amp;lt;&quot; &quot;;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;}&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;cout&amp;lt;&amp;lt;endl;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;}&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;If you want to learn c++ in depth then do visit: &lt;a href=&quot;https://codeial.blogspot.com/2020/12/c-language_3.html&quot; target=&quot;_blank&quot;&gt;learn c++ in depth.&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/8248089161932697422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/simple-pattern-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/8248089161932697422'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/8248089161932697422'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/simple-pattern-in-c.html' title='Simple pattern1 in C++.'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>West Bengal, India</georss:featurename><georss:point>22.9867569 87.8549755</georss:point><georss:box>-5.3234769361788459 52.698725499999995 51.296990736178842 123.0112255</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-922395592969697659</id><published>2020-12-04T13:15:00.003+05:30</published><updated>2020-12-05T14:37:16.798+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Patterns."/><title type='text'>Patterns in computer programming.</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://codeial.blogspot.com/&quot; target=&quot;_blank&quot;&gt;&amp;nbsp;Learn programming for free&lt;/a&gt;&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Patterns in computer programming.&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/simple-pattern-in-c.html&quot; target=&quot;_blank&quot;&gt;1.Simple pattern 1.&lt;br /&gt;&lt;/a&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/simple-pattern-in-c_5.html&quot;&gt;2.Simple pattern 2.&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/simple-pattern3-in-c.html&quot;&gt;3.Simple pattern 3.&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/simple-pattern-4-in-c.html&quot;&gt;4.Simple pattern 4.&lt;br /&gt;&lt;/a&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/simple-pattern-5-in-c.html&quot;&gt;5.Simple pattern 5.&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/simple-pattern-6-in-c-language.html&quot;&gt;6.Simple pattern 6.&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/922395592969697659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/patterns-in-computer-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/922395592969697659'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/922395592969697659'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/patterns-in-computer-programming.html' title='Patterns in computer programming.'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>West Bengal, India</georss:featurename><georss:point>22.9867569 87.8549755</georss:point><georss:box>-5.3234769361788459 52.698725499999995 51.296990736178842 123.0112255</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-3460657696223661815</id><published>2020-12-04T10:15:00.004+05:30</published><updated>2020-12-06T18:43:44.456+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><title type='text'>Function in C++ language.</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;a href=&quot;https://codeial.blogspot.com/&quot; target=&quot;_blank&quot;&gt;Learn programming for free&lt;/a&gt;&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Function in C++ language.&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Function is basically a block of statement which is used to perform some specific task.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;In C++&amp;nbsp; language we have 4 type of function.When we declare a function then it tells the compiler about&amp;nbsp;&lt;b&gt;return type of function,parameter of function and it&#39;s function name.&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;In C++ language we divide large program into blocks and call them as and when they required.&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;We will discuss function in depth in this blog.&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;h3&gt;&lt;b&gt;Types of function.&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;b&gt;Function without parameter and without return type.&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Function without parameter and with return type.&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Function with parameter and without return type.&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Function with parameter and with return type.&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;We will discuss each of them with very basic example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;1.Function without parameter and without return type:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;#include&amp;lt;iostream.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;using namespace std;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;void sum()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int a,b,sum=0;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	cout&amp;lt;&amp;lt;&quot;Enter first number:&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	cin&amp;gt;&amp;gt;a;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: georgia; white-space: pre;&quot;&gt;cout&amp;lt;&amp;lt;&quot;Enter second number:&quot;;&lt;/span&gt;&lt;span style=&quot;font-family: georgia; white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia; white-space: pre;&quot;&gt;	cin&amp;gt;&amp;gt;b;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;sum = a+b;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	cout&amp;lt;&amp;lt;sum;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;int main()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;{&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;sum();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;2.Function without parameter and with return type:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;#include&amp;lt;iostream.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;using namespace std;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;int sum()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int a,b,sum=0;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: georgia; white-space: pre;&quot;&gt;cout&amp;lt;&amp;lt;&quot;Enter first number:&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	cin&amp;gt;&amp;gt;a;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: georgia; white-space: pre;&quot;&gt;cout&amp;lt;&amp;lt;&quot;Enter second number:&quot;;&lt;/span&gt;&lt;span style=&quot;font-family: georgia; white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia; white-space: pre;&quot;&gt;	cin&amp;gt;&amp;gt;b;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;sum = a+b;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return sum;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;	&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;int main()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;{&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int x = sum();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	cout&amp;lt;&amp;lt;x;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;3.Function with parameter and without return type:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;#include&amp;lt;iostream.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;using namespace std;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;void sum(int a,int b)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int sum = a+b;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	cout&amp;lt;&amp;lt;sum;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;int main()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;{&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int a,b;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia; white-space: pre;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;cout&amp;lt;&amp;lt;&quot;Enter first number:&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	cin&amp;gt;&amp;gt;a;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: georgia; white-space: pre;&quot;&gt;cout&amp;lt;&amp;lt;&quot;Enter second number:&quot;;&lt;/span&gt;&lt;span style=&quot;font-family: georgia; white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia; white-space: pre;&quot;&gt;	cin&amp;gt;&amp;gt;b;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;sum(a,b);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;4.Function with parameter and with return type:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;#include&amp;lt;iostream.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;using namespace std;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;int sum(int a,int b)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int sum = a+b;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return sum;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;int main()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;{&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int a,b,x = 0;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: georgia; white-space: pre;&quot;&gt;cout&amp;lt;&amp;lt;&quot;Enter first number:&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	cin&amp;gt;&amp;gt;a;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: georgia; white-space: pre;&quot;&gt;cout&amp;lt;&amp;lt;&quot;Enter second number:&quot;;&lt;/span&gt;&lt;span style=&quot;font-family: georgia; white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia; white-space: pre;&quot;&gt;	cin&amp;gt;&amp;gt;b;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;x = sum(a,b);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	cout&amp;lt;&amp;lt;x;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/3460657696223661815/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/function-in-c-language_4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/3460657696223661815'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/3460657696223661815'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/function-in-c-language_4.html' title='Function in C++ language.'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>West Bengal, India</georss:featurename><georss:point>22.9867569 87.8549755</georss:point><georss:box>-5.3234769361788459 52.698725499999995 51.296990736178842 123.0112255</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-2134959473810636952</id><published>2020-12-04T09:59:00.006+05:30</published><updated>2020-12-04T10:15:40.355+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="C language"/><title type='text'>Function in C language.</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://codeial.blogspot.com/&quot; target=&quot;_blank&quot;&gt;Learn programming for free&lt;/a&gt;&lt;/h1&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;Function in C language.&quot;&gt;Function in C language.&lt;/a&gt;&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Function is basically a block of statement which is used to perform some specific task.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;In c language we have 4 type of function.When we declare a function then it tells the compiler about &lt;b&gt;return type of function,parameter of function and it&#39;s function name.&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;In C language we divide large program into blocks and call them as and when they required.&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;We will discuss function in depth in this blog.&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Types of function.&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Function without parameter and without return type.&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Function without parameter and with return type.&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Function with parameter and without return type.&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Function with parameter and with return type.&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;We will discuss each of them with very basic example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;1.Function without parameter and without return type:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;#include&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;void sum()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int a,b,sum=0;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;printf(&quot;Enter first number&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;a);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;printf(&quot;Enter second number&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;b);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;sum = a+b;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;printf(&quot;Sum of two number is %d&quot;,sum);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;	&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;int main()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;{&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;sum();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;2.Function without parameter and with return type:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;#include&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;int sum()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int a,b,sum=0;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;printf(&quot;Enter first number&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;a);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;printf(&quot;Enter second number&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;b);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;sum = a+b;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return sum;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;	&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;int main()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;{&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int x = sum();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;printf(&quot;Sum of number is: %d&quot;,x);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;3.Function with parameter and without return type:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;#include&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;void sum(int a,int b)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int sum = a+b;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;printf(&quot;Sum of number is %d&quot;,sum);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;int main()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;{&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int a,b;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;printf(&quot;Enter first number&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;a);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;printf(&quot;Enter second number&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;b);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;sum(a,b);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;4.Function with parameter and with return type:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;#include&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;int sum(int a,int b)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int sum = a+b;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return sum;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;int main()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;{&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int a,b,x = 0;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;printf(&quot;Enter first number&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;a);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;printf(&quot;Enter second number&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;b);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;x = sum(a,b);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;printf(&quot;Sum of number is %d&quot;,x);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Do you want to learn c language in depth then visit:&amp;nbsp; &lt;a href=&quot;https://codeial.blogspot.com/2020/12/c-language.html&quot;&gt;learn c language in depth.&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/2134959473810636952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/function-in-c-language.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/2134959473810636952'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/2134959473810636952'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/function-in-c-language.html' title='Function in C language.'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>West Bengal, India</georss:featurename><georss:point>22.9867569 87.8549755</georss:point><georss:box>-5.3234769361788459 52.698725499999995 51.296990736178842 123.0112255</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-2315104161466070478</id><published>2020-12-03T14:29:00.003+05:30</published><updated>2020-12-06T18:43:10.637+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><title type='text'>Loops in C++.</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;a href=&quot;https://codeial.blogspot.com/&quot; target=&quot;_blank&quot;&gt;Learn programming for free&lt;/a&gt;&lt;/h1&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/loops-in-c.html&quot;&gt;Loops in C++&lt;/a&gt;&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: georgia;&quot;&gt;In&lt;a href=&quot;https://codeial.blogspot.com/2020/12/loops-in-c.html&quot;&gt;&lt;span style=&quot;color: #349ec4;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box; transition-duration: 200ms; transition-property: all; transition-timing-function: ease-in-out;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;C++ loops &lt;/a&gt;is basically of three types.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;/p&gt;&lt;ol style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 1rem 0px; padding: 0px 0px 0px 1.53846rem;&quot;&gt;&lt;li style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: georgia;&quot;&gt;For loop&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: georgia;&quot;&gt;while loop&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: georgia;&quot;&gt;do while loop&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: georgia;&quot;&gt;We will learn all of them in depth with a question so that it becomes easy to learn and understand.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: georgia;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: georgia;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Question: Write a program in c language which will take input from user and print all number in between 1 to entered number?&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; box-sizing: border-box; color: #474747; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 1.84615rem; line-height: 1.3em; margin: 0.76923rem 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;background-color: white; box-sizing: border-box; color: #474747; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 1.84615rem; line-height: 1.3em; margin: 0.76923rem 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;1.For loop&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;/p&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;#include&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;int main()&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;	&lt;/span&gt;int n,i=1;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;	&lt;/span&gt;cout&amp;lt;&amp;lt;&quot;Enter a number&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;	&lt;/span&gt;cin&amp;gt;&amp;gt;n;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;	&lt;/span&gt;for(i=1;i&amp;lt;=n;i++)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;		&lt;/span&gt;cin&amp;gt;&amp;gt;i;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;/p&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;Syntax of for loop is:&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;for(initialization;condition;increment/decrement)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;{&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp; &amp;nbsp; //logic&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Explanation:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;According to question user will enter a number and we need to print all number between 1 to that number.So we take input from user and inside for loop we initialize our for loop to start from 1 and go till entered number.For each iteration we increment i so that when matched conditions found it terminates for loop and comes out of loop.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;And for each iteration we have printed the number.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; box-sizing: border-box; color: #474747; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 1.84615rem; line-height: 1.3em; margin: 0.76923rem 0px; padding: 0px;&quot;&gt;2.While loop&lt;/h3&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;/p&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;#include&amp;lt;stdio.h&amp;gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;int main()&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;	&lt;/span&gt;int n,i=1;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;	&lt;/span&gt;cout&amp;lt;&amp;lt;&quot;Enter a number&quot;;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;	&lt;/span&gt;cin&amp;gt;&amp;gt;n;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;	&lt;/span&gt;while(i&amp;lt;=n)&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;		&lt;/span&gt;cout&amp;lt;&amp;lt;i;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;		&lt;/span&gt;i++;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;While loop is also called as entry controlled loop because it first checks the conditions.If conditions found to be true then only it enters in loop otherwise it skips the loop.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;So in above example we have first initialize a variable i = 1.And before entering in while loop we checked the condition since 1&amp;lt;=n ( suppose n=10) then it will enter into loop and print that number.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;One&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-family: trebuchet;&quot;&gt;important point that we should keep in our mind that inside our while loop we must increment our variable otherwise it will lead to infinite loop condition.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: trebuchet;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;background-color: white; box-sizing: border-box; color: #474747; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 1.84615rem; line-height: 1.3em; margin: 0.76923rem 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: trebuchet;&quot;&gt;3. do-while loop&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: trebuchet;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: trebuchet;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;#include&amp;lt;stdio.h&amp;gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;int main()&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;	&lt;/span&gt;int n,i=1;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;	&lt;/span&gt;cout&amp;lt;&amp;lt;&quot;Enter a number&quot;;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;	&lt;/span&gt;cin&amp;gt;&amp;gt;n;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;	&lt;/span&gt;do&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;		&lt;/span&gt;cout&amp;lt;&amp;lt;i;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;		&lt;/span&gt;i++;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;	&lt;/span&gt;}while(i&amp;lt;=n);&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;do-while loop is called as exit-controlled loop because it first executes a statement then check conditions.If our initial condition is found to be false then also it will execute for once.That&#39;s why it is known as exit-controlled loop.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;If you want to learn c++ in depth then do visit: &lt;a href=&quot;https://codeial.blogspot.com/2020/12/c-language_3.html&quot; target=&quot;_blank&quot;&gt;learn c++ in depth&lt;/a&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/2315104161466070478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/loops-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/2315104161466070478'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/2315104161466070478'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/loops-in-c.html' title='Loops in C++.'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>West Bengal, India</georss:featurename><georss:point>22.9867569 87.8549755</georss:point><georss:box>-5.3234769361788459 52.698725499999995 51.296990736178842 123.0112255</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-1643035283648889973</id><published>2020-12-03T14:11:00.006+05:30</published><updated>2020-12-06T18:36:54.847+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="C language"/><title type='text'>Loops in c language.</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://codeial.blogspot.com/&quot; target=&quot;_blank&quot;&gt;&amp;nbsp;Learn programming for free&lt;/a&gt;&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/loops-in-c-language.html&quot; target=&quot;_blank&quot;&gt;Loops in c language.&lt;/a&gt;&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;In&lt;a href=&quot;https://codeial.blogspot.com/2020/12/loops-in-c-language.html&quot;&gt; c language loops&lt;/a&gt; is basically of three types.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;For loop&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;while loop&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;do while loop&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;We will learn all of them in depth with a question so that it becomes easy to learn and understand.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Question: Write a program in c language which will take input from user and print all number in between 1 to entered number?&lt;/b&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;1.For loop&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;b&gt;#include&amp;lt;stdio.h&amp;gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;int main()&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int n,i=1;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;printf(&quot;Enter number&quot;);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;n);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;for(i=1;i&amp;lt;=n;i++)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;printf(&quot;%d\n&quot;,i);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;div&gt;Syntax of for loop is:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;for(initialization;condition;increment/decrement)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;{&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; //logic&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;Explanation:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;According to question user will enter a number and we need to print all number between 1 to that number.So we take input from user and inside for loop we initialize our for loop to start from 1 and go till entered number.For each iteration we increment i so that when matched conditions found it terminates for loop and comes out of loop.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;And for each iteration we have printed the number.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;2.While loop&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;#include&amp;lt;stdio.h&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;int main()&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int n,i=1;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;printf(&quot;Enter number&quot;);&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;n);&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;while(i&amp;lt;=n)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;printf(&quot;%d&quot;,i);&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;i++;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;While loop is also called as entry controlled loop because it first checks the conditions.If conditions found to be true then only it enters in loop otherwise it skips the loop.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So in above example we have first initialize a variable i = 1.And before entering in while loop we checked the condition since 1&amp;lt;=n ( suppose n=10) then it will enter into loop and print that number.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;One &lt;span style=&quot;font-family: trebuchet;&quot;&gt;important point that we should keep in our mind that inside our while loop we must increment our variable otherwise it will lead to infinite loop condition.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;3. do-while loop&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: trebuchet;&quot;&gt;&lt;div&gt;#include&amp;lt;stdio.h&amp;gt;&lt;/div&gt;&lt;div&gt;int main()&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int n,i=1;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;printf(&quot;Enter number&quot;);&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;n);&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;do&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;printf(&quot;%d&quot;,i);&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;i++;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}while(i&amp;lt;=n);&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;do-while loop is called as exit-controlled loop because it first executes a statement then check conditions.If our initial condition is found to be false then also it will execute for once.That&#39;s why it is known as exit-controlled loop.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you want to learn c language in depth then do visit: &lt;a href=&quot;https://codeial.blogspot.com/2020/12/c-language.html&quot; target=&quot;_blank&quot;&gt;learn c language in depth.&lt;/a&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/1643035283648889973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/loops-in-c-language.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/1643035283648889973'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/1643035283648889973'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/loops-in-c-language.html' title='Loops in c language.'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>West Bengal, India</georss:featurename><georss:point>22.9867569 87.8549755</georss:point><georss:box>-5.3234769361788459 52.698725499999995 51.296990736178842 123.0112255</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-6854805985812252739</id><published>2020-12-03T13:36:00.008+05:30</published><updated>2020-12-06T18:42:32.559+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><title type='text'>C++ language.</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://codeial.blogspot.com/&quot; target=&quot;_blank&quot;&gt;&amp;nbsp;Learn programming for free&lt;/a&gt;&lt;/h1&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/c-language_3.html&quot; target=&quot;_blank&quot;&gt;C++ language&lt;/a&gt;&lt;/h2&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;C++ is powerful general purpose programming language.It is an extension of c language.It is a mid level programming language.It is used to develop operating system,browsers ,games etc.C++ is very popular programming language.It was developed by Bjarne stroustrup in 1979.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;b&gt;Features of c++.&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;ol style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 1rem 0px; padding: 0px 0px 0px 1.53846rem;&quot;&gt;&lt;li style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;The most important feature it is object oriented.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;It is simple language.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;Structured programming language.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;Powerful and fast.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;Most secure and fast than C.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;Platform dependent.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;Memory management.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span face=&quot;Open Sans, sans-serif&quot; style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;Open Sans, sans-serif&quot; style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;We will discuss &lt;a href=&quot;https://codeial.blogspot.com/2020/12/c-language_3.html&quot; target=&quot;_blank&quot;&gt;each topic of C++ in depth&lt;/a&gt;.We will discuss topic wise so that you can understand each topic in depth and with clarity.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;Open Sans, sans-serif&quot; style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;Open Sans, sans-serif&quot; style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span face=&quot;Open Sans, sans-serif&quot; style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;b&gt;Topics:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span face=&quot;Open Sans, sans-serif&quot; style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;Open Sans, sans-serif&quot; style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;b&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/getting-started-with-c.html&quot; target=&quot;_blank&quot;&gt;1.Getting started with C++&lt;/a&gt;.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;Open Sans, sans-serif&quot; style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;Open Sans, sans-serif&quot; style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;b&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/loops-in-c.html&quot; target=&quot;_blank&quot;&gt;2. Loops in c++.&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;Open Sans, sans-serif&quot; style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;Open Sans, sans-serif&quot; style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/function-in-c-language_4.html&quot; target=&quot;_blank&quot;&gt;3.Function in C++ language.&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/6854805985812252739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/c-language_3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/6854805985812252739'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/6854805985812252739'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/c-language_3.html' title='C++ language.'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>West Bengal, India</georss:featurename><georss:point>22.9867569 87.8549755</georss:point><georss:box>-5.3234769361788459 52.698725499999995 51.296990736178842 123.0112255</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-3489457678284486472</id><published>2020-12-03T13:23:00.004+05:30</published><updated>2020-12-06T18:42:49.350+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><title type='text'>Getting started with C++.</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;a href=&quot;https://codeial.blogspot.com/&quot; target=&quot;_blank&quot;&gt;Learn programming for free&lt;/a&gt;&lt;/h1&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/getting-started-with-c.html&quot; target=&quot;_blank&quot;&gt;Getting started with C++.&lt;/a&gt;&lt;/h2&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;In this blog we will learn about &lt;a href=&quot;https://codeial.blogspot.com/2020/12/getting-started-with-c.html&quot; target=&quot;_blank&quot;&gt;fundamentals of C++&lt;/a&gt;.For example how to take input,how to print output etc.This is what every student who wants to learn c++ should&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;definitely know.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;So let&#39;s understand all these things with very basic example:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;div&gt;#include&amp;lt;iostream&amp;gt;&lt;/div&gt;&lt;div&gt;using namespace std;&lt;/div&gt;&lt;div&gt;int main()&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int a,b,sum=0;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;cout&amp;lt;&amp;lt;&quot;Enter first number&quot;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;cin&amp;gt;&amp;gt;a;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;cout&amp;lt;&amp;lt;&quot;Enter second number&quot;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;cin&amp;gt;&amp;gt;b;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;sum=a+b;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;cout&amp;lt;&amp;lt;&quot;Sum is&quot;&amp;lt;&amp;lt;sum;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: times;&quot;&gt;Above program is used to find sum of two number in c++.Now understand each line of above code in detail.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;b&gt;1. #include&amp;lt;iostream&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;In programming language we call it as header file,which includes all details required to carry out current program.Like in our case we are taking two input from user so this header file includes all functionalities required to take input from user.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;b&gt;2.using namespace std&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;Here this line is used so that we can use all standard things in c++.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;For example if&amp;nbsp; we don&#39;t use this line then for writing cin we have to write syntax as&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;std::cin&amp;gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;otherwise we write syntax as cin&amp;gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;b&gt;3.int main()&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: georgia; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: georgia; font-size: 14px;&quot;&gt;This is a function don&#39;t worry we will learn it in depth here just remember it that it is simply a function.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;b&gt;4.cout&amp;lt;&amp;lt;&quot;Enter first number&quot;;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: georgia; font-size: 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;This statement is used to print&amp;nbsp; information on screen.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: georgia; font-size: 14px;&quot;&gt;Like in our case it is will print&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Enter first number&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: georgia; font-size: 14px; font-weight: 700;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: georgia; font-size: 14px; font-weight: 700;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: georgia; font-size: 14px; font-weight: 700;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: georgia; font-size: 14px; font-weight: 700;&quot;&gt;5.cin&amp;gt;&amp;gt;a;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: georgia; font-size: 14px; font-weight: 700;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: georgia; font-size: 14px; font-weight: 700;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: georgia; font-size: 14px; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;This statement is used to take input from user.In our case it will take input from user as an integer.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: georgia; font-size: 14px; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: georgia; font-size: 14px; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: georgia; font-size: 14px;&quot;&gt;&lt;b&gt;6.sum = a+b;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;I don&#39;t think this statement needs any explanation.This is a simple arithmetic operation.It will store sum of a and b into sum variable.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;7.&lt;/span&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Finally it will print sum of two number as a result.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-size: 14px; margin: 0px 0px 1.53846rem; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;If you want to learn c language in depth then do visit : &lt;a href=&quot;https://codeial.blogspot.com/2020/12/c-language.html&quot; target=&quot;_blank&quot;&gt;learn c language in depth.&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/3489457678284486472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/getting-started-with-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/3489457678284486472'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/3489457678284486472'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/getting-started-with-c.html' title='Getting started with C++.'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>West Bengal, India</georss:featurename><georss:point>22.9867569 87.8549755</georss:point><georss:box>-5.3234769361788459 52.698725499999995 51.296990736178842 123.0112255</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-2891484705085613382</id><published>2020-12-03T12:44:00.002+05:30</published><updated>2020-12-03T12:52:58.034+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="C language"/><title type='text'>Getting started with C language.</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://codeial.blogspot.com/&quot;&gt;&amp;nbsp;Learn programming for free&lt;/a&gt;&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/getting-started-with-c-language.html&quot;&gt;&lt;span style=&quot;color: #93c47d;&quot;&gt;Getting started with C language.&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;In this blog we will learn basic of c language like how to take input,how to print output etc.These are very basic things that every student should know before moving on.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;I will explain all these thing with very basic example,which is easy to understand.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;#include&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;int main()&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;{&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;int a,b,sum=0;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;printf(&quot;Enter first number&quot;);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;a);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;printf(&quot;Enter second number&quot;);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;scanf(&quot;%d&quot;,&amp;amp;b);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;sum=a+b;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;printf(&quot;Sum of two number is %d&quot;,sum);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;b&gt;Explanation:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;b&gt;This is a simple program which takes two number from user and print their sum as a result&lt;/b&gt;&lt;/span&gt;&lt;b style=&quot;font-family: georgia;&quot;&gt;.&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b style=&quot;font-family: georgia;&quot;&gt;#include&amp;lt;stdio.h&amp;gt;&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;In programming language we call it as a header file.This header files includes all information required to carry out our particular program.&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;b&gt;Like in our case it is included because we need to take input from user and print output.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;2. &lt;b&gt;int main()&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;This is a function don&#39;t worry we will learn it in depth here just remember it that it is simply a function.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;3. &lt;b&gt;printf();&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span&gt;This statement is used to print&amp;nbsp; information on screen.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;Like in our case it is will print &lt;b&gt;Enter first number&lt;/b&gt;&lt;/span&gt;&lt;b style=&quot;font-family: georgia;&quot;&gt;.&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;4. &lt;b&gt;scanf();&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;This statement is used to take input from user.In our case it will take input from user as an integer.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;5. &lt;b&gt;sum = a+b;&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;I don&#39;t think this statement needs any explanation.This is a simple arithmetic operation.It will store sum of a and b into sum variable.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;6. Finally it will print sum of two number as a result.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/2891484705085613382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/getting-started-with-c-language.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/2891484705085613382'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/2891484705085613382'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/getting-started-with-c-language.html' title='Getting started with C language.'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>West Bengal, India</georss:featurename><georss:point>22.9867569 87.8549755</georss:point><georss:box>-5.3234769361788459 52.698725499999995 51.296990736178842 123.0112255</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-3648908442889609391</id><published>2020-12-03T12:11:00.005+05:30</published><updated>2020-12-04T10:02:20.276+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="C language"/><title type='text'>C language</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&amp;nbsp;&lt;a href=&quot;https://codeial.blogspot.com/&quot; target=&quot;_blank&quot;&gt;Learn programming for free&lt;/a&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/c-language.html&quot;&gt;C language&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: georgia;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;C is powerful general purpose programming language.It was developed by&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; color: #333333; font-size: 14px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-size: medium;&quot;&gt;&lt;b&gt;Dennis Ritchie in 1972.I&lt;/b&gt;t used for many purpose like developing system software&lt;b&gt;,&lt;/b&gt;operating system,&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;compilers etc.It was initially used for developing system works.C language is procedural programming language using top-down approach.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;In this blog you will get to learn all topics of&amp;nbsp; c language in depth.Here we have divided it into topics so that it will be ease for user to learn faster.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Features of &lt;a href=&quot;https://codeial.blogspot.com/2020/12/c-language.html&quot;&gt;c language&lt;/a&gt;:&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;ol style=&quot;background-color: white; box-sizing: border-box; color: #333333; direction: ltr; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 14px; margin: 1rem 0px; padding: 0px 0px 0px 1.53846rem;&quot;&gt;&lt;li style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;It is general purpose programming language.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;Modularity.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;Fast and efficient.&amp;nbsp;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;Mother of C++ programming language.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;It is mid level programming language.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;Rich in libraries and functions.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;It is simple,machine independent.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; direction: ltr; margin: 0px; padding: 0px;&quot;&gt;Portable.&lt;/li&gt;&lt;/ol&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Topics:&lt;/h3&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/getting-started-with-c-language.html&quot; target=&quot;_blank&quot;&gt;Getting started with c language.&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/loops-in-c-language.html&quot; target=&quot;_blank&quot;&gt;Loops in c language.&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/function-in-c-language.html&quot; target=&quot;_blank&quot;&gt;Function in c language.&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/3648908442889609391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/c-language.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/3648908442889609391'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/3648908442889609391'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/c-language.html' title='C language'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4374953614255982024.post-7054270743971757396</id><published>2020-12-02T13:07:00.012+05:30</published><updated>2020-12-03T13:39:17.825+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Learn programming for free"/><title type='text'>Programming.</title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://codeial.blogspot.com/&quot; target=&quot;_blank&quot;&gt;Learn programming for free&lt;/a&gt;&lt;/h1&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/h3&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/programming.html&quot;&gt;Programming.&lt;/a&gt;&lt;/h2&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica; font-size: medium;&quot;&gt;To communicate with computer we must know a programming languae.It&#39;s just like how we human being communicate with each other likewise to communicate with computer we must know a programming language.&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;So basically we should know what is a programming language?&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Program is basically instructions given to computer to perform a specific task.For example let&#39;s understand this with an example,suppose we want to find factorial of a given number.So we must give instructions to computer to fins factorial of a given number.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;There are many programming language but in this blog we will discuss C/C++&amp;nbsp; perform our specific task.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;C is basically a superset of C++.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/c-language.html&quot;&gt;C language.&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-family: georgia; font-size: medium;&quot;&gt;This is a programming language that every programmer must be aware from.C language initially used to develop system work.C is powerful general purpose programming language.It is used to develop operating system,compilers,database.It is a procedural programming language.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;&lt;i&gt;Features of C:&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;It is general purpose programming language.&lt;/li&gt;&lt;li&gt;Modularity.&lt;/li&gt;&lt;li&gt;Fast and efficient.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Mother of C++ programming language.&lt;/li&gt;&lt;li&gt;It is mid level programming language.&lt;/li&gt;&lt;li&gt;Rich in libraries and functions.&lt;/li&gt;&lt;li&gt;It is simple,machine independent.&lt;/li&gt;&lt;li&gt;Portable.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;It was developed by Dennis Ritchie in 1972.&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-style: italic;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://codeial.blogspot.com/2020/12/c-language_3.html&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;C++ language&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-size: large; font-style: italic;&quot;&gt;&amp;nbsp;&lt;/b&gt;&lt;/a&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b style=&quot;font-size: large; font-style: italic;&quot;&gt;&amp;nbsp;&lt;/b&gt;&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;As discussed above C language is super set of C++ that means C++ is an extension of C language.It is also a mid level programming language.It is a powerful general purpose programming language used to develop operating system,browser,games etc.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;&amp;nbsp; &amp;nbsp;Features of C++&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span&gt;The most important feature it is object oriented.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;It is simple language.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;Structured programming language.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;Powerful and fast.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;Most secure and fast than C.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;Platform dependent.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;Memory management.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;It was developed by Bjarne Stroustrup in 1979.&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;/h3&gt;</content><link rel='replies' type='application/atom+xml' href='https://codeial.blogspot.com/feeds/7054270743971757396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://codeial.blogspot.com/2020/12/programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/7054270743971757396'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/4374953614255982024/posts/default/7054270743971757396'/><link rel='alternate' type='text/html' href='https://codeial.blogspot.com/2020/12/programming.html' title='Programming.'/><author><name>Learn programming for free</name><uri>http://www.blogger.com/profile/15191121818379787811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>West Bengal, India</georss:featurename><georss:point>22.9867569 87.8549755</georss:point><georss:box>-5.3234769361788459 52.698725499999995 51.296990736178842 123.0112255</georss:box></entry></feed>