0% found this document useful (0 votes)
46 views1 page

CPP Tutorial09

This document discusses the different types of operators in C++, including arithmetic, relational, logical, bitwise, and assignment operators. It explains that operators allow mathematical and logical manipulations in code and will examine each type of operator individually. As an example, it shows that the addition operator (+) adds two operands, the subtraction operator (-) subtracts one from the other, and the multiplication (*), division (/), and modulus (%) operators perform those operations.

Uploaded by

436337
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views1 page

CPP Tutorial09

This document discusses the different types of operators in C++, including arithmetic, relational, logical, bitwise, and assignment operators. It explains that operators allow mathematical and logical manipulations in code and will examine each type of operator individually. As an example, it shows that the addition operator (+) adds two operands, the subtraction operator (-) subtracts one from the other, and the multiplication (*), division (/), and modulus (%) operators perform those operations.

Uploaded by

436337
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

C++

11. OPERATORS

An operator is a symbol that tells the compiler to perform specific mathematical or logical
manipulations. C++ is rich in built-in operators and provide the following types of operators:

 Arithmetic Operators

 Relational Operators

 Logical Operators

 Bitwise Operators

 Assignment Operators

 Misc Operators

This chapter will examine the arithmetic, relational, logical, bitwise, assignment and other
operators one by one.

Arithmetic Operators
There are following arithmetic operators supported by C++ language:

Assume variable A holds 10 and variable B holds 20, then:

Operator Description Example

+ Adds two operands A + B will give 30

- Subtracts second operand from the A - B will give -10


first

* Multiplies both operands A * B will give 200

/ Divides numerator by de-numerator B / A will give 2

% Modulus Operator and remainder of B % A will give 0


after an integer division

48

You might also like