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

  • Arithmetic Operators
  • Relational Operators
  • Logical Operators
  • Assignment Operators

 

 

  1. +                                         Add two operands
  2. –                                          Subtracts the second operand from the first
  3. *                                       Multiplies both operands
  4. /                                    Divides numerator by de numerator
  5. %                                        Modulus Operator and remainder of after an integer division
  6. ++                                                                                                 Increment Operator
  7. —                                                                                      decrement Operator

 

 

 

 

 

 

#include<iostream>

using namespace std;

int main() {

cout << “Size of char : ” << sizeof(char) << endl;

cout << “Size of int : ” << sizeof(int) << endl;

cout << “Size of short int : ” << sizeof(short int) << endl;

cout << “Size of long int : ” << sizeof(long int) << endl;

cout << “Size of float : ” << sizeof(float) << endl;

cout << “Size of double : ” << sizeof(double) << endl;

cout << “Size of wchar_t : ” << sizeof(wchar_t) << endl;

return 0; }

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s