This preview shows page 1. Sign up to view the full content.
Unformatted text preview: stants. For
character variable declaration we use
character char data type
data unsigned char data type
e.g. char ch; char : character type variable , (type char) occupies 1 byte and
can store only one character
can 8 8 OPERATORS An operator is a symbol that causes the compiler to take an action.
Commonly used operators in C++ are Arithmetic operators
Arithmetic Assignment Operators
Increment & decrement operators
Conditional 9 9 Arithmetic operator
The operators who perform arithmetic operations are called Arithmetic
These operators are:
Symbol Meaning Operation + Addition 2+5 = 7 - Subtraction 5-2 = 3 * Multiplication 5*2 = 10 / Division 5/2 = 2.5 % Modulus (Remainder) 5%2 = 1 10 10 Precedence or Priority of Arithmetic
In an expression in C++, the operations are performed in an order which
is called ‘Order of Precedence of Operations’
right. First of all, parenthesi...
View Full Document
This document was uploaded on 03/16/2014.
- Spring '14