Computer Science, asked by yogavamsi1999, 6 months ago

explain concept of operator's in c language. please.faster.. ​

Answers

Answered by Anonymous
0

Answer:

An operator is a symbol that tells the compiler to perform a certain mathematical or logical manipulation. Operators are used in programs to manipulate data and variables. C operators can be classified into following types: Arithmetic operators. Relational operators.

Explanation:

hope it helps u!

Answered by Anonymous
1

Answer:

Arithmetic Operators:

These are the operators used to perform arithmetic/mathematical operations on operands. Examples: (+, -, *, /, %,++,–). Arithmetic operator are of two types:

Unary Operators: Operators that operates or works with a single operand are unary operators. For example: (++ , –)

Binary Operators: Operators that operates or works with two operands are binary operators. For example: (+ , – , * , /)

To learn Arithmetic Operators in details visit this link.

Relational Operators:

These are used for comparison of the values of two operands. For example, checking if one operand is equal to the other operand or not, an operand is greater than the other operand or not etc. Some of the relational operators are (==, >= , <= ). To learn about each of these operators in details go to this link.

Logical Operators:

Logical Operators are used to combine two or more conditions/constraints or to complement the evaluation of the original condition in consideration. The result of the operation of a logical operator is a boolean value either true or false. For example, the logical AND represented as ‘&&’ operator in C or C++ returns true when both the conditions under consideration are satisfied. Otherwise it returns false. Therfore, a && b returns true when both a and b are true (i.e. non-zero). To learn about different logical operators in details please visit this link.

Bitwise Operators:

The Bitwise operators is used to perform bit-level operations on the operands. The operators are first converted to bit-level and then the calculation is performed on the operands. The mathematical operations such as addition, subtraction, multiplication etc. can be performed at bit-level for faster processing. For example, the bitwise AND represented as & operator in C or C++ takes two numbers as operands and does AND on every bit of two numbers. The result of AND is 1 only if both bits are 1. To learn bitwise operators in details, visit this link.

Assignment Operators:

Assignment operators are used to assign value to a variable. The left side operand of the assignment operator is a variable and right side operand of the assignment operator is a value. The value on the right side must be of the same data-type of variable on the left side otherwise the compiler will raise an error.

Different types of assignment operators are shown below:

“=”: This is the simplest assignment operator. This operator is used to assign the value on the right to the variable on the left.

For example:

a = 10;

b = 20;

ch = 'y';

Similar questions