September 26, 2020

Operator In Programming Language

operator in programming language, operator in c programming language, operator in basic programming language, operator in python, Operator in c,

 Operator In Programming Language

An Operator is a symbol that tells the compiler to perform specific mathematical.


Types Of Operator

  • Arithmetic Operator
  • Relational Operator
  • Logical Operator
  • Assignment Operator
Arithmetic Operator
Operator- +
Description- Adds two operands
Example- x + y will give 30
Operator Type- +, -, *, /, %

Logical Operator

Operator- &&
Description- Logical AND Operator If both the condition are true, only then the result is true, otherwise false.
Example- ((x>10) && (y=20))
Result- False
Operator Type-(||= Logical OR Operator), (!= Logical NOT Operator)

Assignment Operator


Operator- =
Description- Simple assignment operator, assigns values from right side operands to left side operand
Example- C= A + B will assign value of A + B into C

Relational Operator

Operator- ==
Description- Checks if the values of two operands are equal. If yes, the condition becomes true.
Example- (x==y)
Result- False
Operator Type- ( != - Check if the value of two operands are equal. If values are not equals, the condition becomes true), ( > - Checks if the value of left operands is greater than the value of right operands. If yes, the condition becomes, True), (< - Checks if the value of left operands is less than the value of right operand. If yes, the condition becomes true.), (>= - Checks if the value of left operands is greater is greater than or equal to the value of right operand. If yes, the condition becomes True.), (<= - Checks if the value of left operands is less than or equal to to the value of right operands. If yes, the condition becomes true.)

Arsalan Akhtar Khan

Blogger

Technology By Arsalan || Hello My name is Arsalan Khan. Beginners Blogger. From Pune City..

1 comments: