Fundamentals of C Programming / C Language



  • Arithmetic Operators are the symbols that are used for Arithmetic operations.
  • Arithmetic Operators are

 

SymbolOperation
+Addition
Subtraction
*Multiplication
/Division

%                       Modulus (Remainder)

Assignment Operator:

  • The Operator that is used to assign value to a variable is called an Assignment Operator.
  • Assignment Operator ‘=‘ is used to assign value to variable.
  • Example int age ; age = 50; or int age = 50;
  • Assignment Operator can also be used to assign one value to many variables called Compound Assignment Operator.
  • Example int x, y, z; x = y = z = 10;

 

Increment and Decrement Operators:

Increment OperatorDecrement Operator

+ + is used as Increment Operator. It is used to add 1 to the value of a variable. (e.g.) int x = 87; x + +;

– – is used as Decrements Operator. It is used to Subtract 1 to the value of a variable. (e.g.)

int x = 87; x – -;

Prefix and Post fix Operators:

Prefix Operator

  • It adds 1 to the value of the variable before the value of the variable is used in the expression.
  • (e.g.) int a = 50, b; b = + +a;

Post fix Operator

  • It adds 1 to the value of the variable after the value of the variable is used in the expression.
  • (e.g.) int a = 50, b; b = a+ +;

Relational Operators:

  • Relational operator is a symbol that is used to find a relationship between two expressions.
  • Relational operator are

About Saweel Ur Raheem

Check Also

MCSE Notes Lecture # 4 : Applying Security to Folders

LECTURE 4 APPLYING SECURITY ON FOLDERS: Open Folder Options. Go to View Tag and uncheck ...

© Copyrights 2014. All rights are reserved www.latestcontents.com