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

<channel>
	<title>Arithmetic operators | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/arithmetic-operators/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Sat, 10 Dec 2022 04:46:20 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>Operators in C++  Part I</title>
		<link>https://studentprojects.in/software-development/cpp/c-tutorials-cpp/operators-in-c-part-i/</link>
					<comments>https://studentprojects.in/software-development/cpp/c-tutorials-cpp/operators-in-c-part-i/#respond</comments>
		
		<dc:creator><![CDATA[Shubhajna Rai]]></dc:creator>
		<pubDate>Sat, 10 Dec 2022 07:46:00 +0000</pubDate>
				<category><![CDATA[C++ Tutorials]]></category>
		<category><![CDATA[operators in c]]></category>
		<category><![CDATA[Arithmetic operators]]></category>
		<guid isPermaLink="false">https://studentprojects.in/?p=9827</guid>

					<description><![CDATA[<p>Operators are unique symbols that are employed to carry out certain tasks or activities. Both unary and binary options are possible. For instance, the binary operator + is used in C++ to accomplish addition when it is placed between two numbers. Operators come in a variety of forms. These are what they are: Arithmetic Operators</p>
<p>The post <a href="https://studentprojects.in/software-development/cpp/c-tutorials-cpp/operators-in-c-part-i/">Operators in C++  Part I</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Operators are unique symbols that are employed to carry out certain tasks or activities. Both unary and binary options are possible. For instance, the binary operator + is used in C++ to accomplish addition when it is placed between two numbers. Operators come in a variety of forms. These are what they are:</p>



<h3>Arithmetic Operators</h3>



<p>Mathematical operations like addition, subtraction, etc. are carried out using arithmetic operators. They could be binary or unary. Several of the basic arithmetic operators include</p>



<figure class="wp-block-table"><table><tbody><tr><td>Operation</td><td>Description</td></tr><tr><td>a + b</td><td>Adds a and b</td></tr><tr><td>a &#8211; b</td><td>Subtracts b from a</td></tr><tr><td>a * b</td><td>Multiplies a and b</td></tr><tr><td>a / b</td><td>Divides a by b</td></tr><tr><td>a % b</td><td>Modulus of a and b</td></tr><tr><td>a++</td><td>Post increments a by 1</td></tr><tr><td>a&#8211;&nbsp;</td><td>Post decrements a by 1</td></tr><tr><td>++a</td><td>Pre increments a by 1</td></tr><tr><td>&#8211;a</td><td>Pre decrements a by 1</td></tr></tbody></table></figure>



<pre class="wp-block-code"><code lang="cpp" class="language-cpp">#include &lt;iostream&gt;
using namespace std;
 
int main()
{
    int a = 4, b = 5;
    cout &lt;&lt; "The value of a + b is " &lt;&lt; a + b &lt;&lt; endl;
    cout &lt;&lt; "The value of a - b is " &lt;&lt; a - b &lt;&lt; endl;
    cout &lt;&lt; "The value of a * b is " &lt;&lt; a * b &lt;&lt; endl;
    cout &lt;&lt; "The value of a / b is " &lt;&lt; a / b &lt;&lt; endl;
    cout &lt;&lt; "The value of a % b is " &lt;&lt; a % b &lt;&lt; endl;
    cout &lt;&lt; "The value of a++ is " &lt;&lt; a++ &lt;&lt; endl;
    cout &lt;&lt; "The value of a-- is " &lt;&lt; a-- &lt;&lt; endl;
    cout &lt;&lt; "The value of ++a is " &lt;&lt; ++a &lt;&lt; endl;
    cout &lt;&lt; "The value of --a is " &lt;&lt; --a &lt;&lt; endl;
}
</code></pre>



<p>Output:</p>



<pre class="wp-block-code"><code lang="cpp" class="language-cpp">The value of a + b is 9 
The value of a - b is -1
The value of a * b is 20
The value of a / b is 0 
The value of a % b is 4 
The value of a++ is 4   
The value of a-- is 5
The value of ++a is 5
The value of --a is 4
</code></pre><p>The post <a href="https://studentprojects.in/software-development/cpp/c-tutorials-cpp/operators-in-c-part-i/">Operators in C++  Part I</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/cpp/c-tutorials-cpp/operators-in-c-part-i/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
