Operators of c-language

in operators •  last year 

Hello people!

digital-marketing-1433427_1280.jpg

An operator is a symbol which help the user to command the computer to do a certain mathematical or logical conduct.

vintage-649760_1280.jpg

IMG_20231025_204256.jpg

There are different types of operators in c-language, some of them are :-

•} Arithmetic operators : These operators are used to perform arithmetic operations such as addition, Subtraction, multiplication, division, and modulus.
Eg- (a+b), (a-b), (a*b), (a/b), (a%b).

•} Rational operators : These operators are used to compare the values between the operants and then give out a decision.
Eg- [a= =b, checks if 'a' is equal to 'b'], [a > b, checks if 'a' is greater than 'b'], etc.

•} Logical operators : These operators are used to perform logical operations on the given expression and give the result.
Eg- [a && b, returns true when both the conditions are true], [a | | b, returns true if any one condition is true], ['! a' returns the opposite of 'a'].

•} Assignment operators : These operator are used to assign the values for the variables.
Eg- [a=b, assigns the value of 'b' to 'a'], [a+=b, meant as "a = a + b"], etc.

•} Conditional operators : These operators are used to return one value if condition is true and return another value of condition is false.
Eg- [(a>b)?, a : b, returns ' a is larger'].

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE BLURT!