Operators and Expressions – Part V (Relational Operator)

We have already talked about the arithmetic, assignment, increment and decrement operators. Now in this post we will see about the relational operator.

Relational Operator:

Relational Operator in C

Relational operators are used to comparing values of two expressions depending on their relations. An expression that contains relational operator is called relational expression. If the relation is true, then the value of the relational expression is 1 and if the relation is false, the value of an expression is 0. Continue reading

Operators and Expressions – Part IV (Increment and Decrement Operator)

We have already talked about the arithmetic operators and assignment operators. Now in this post we will see about the increment and decrement operator.

Increment and Decrement Operator:

Increment and Decrement Operator in C

Increment (++) and decrement (–) operators are unary operators because they operate on only the single operand. The increment operator (++) increments the value of the variable by one and decrement operator (–) decrements the value of the variable by 1.

++x is equivalent to x = x + 1

–x is equivalent to x = x -1 Continue reading

Operators and Expressions – Part III (Assignment Operator)

We have already talked about the arithmetic operators. Now in this post, we will see what assignment operator is.

Assignment Operators:

Brief Introduction about Assignment Operator

A value can be stored in a variable with the use of assignment operator. The assignment operator “=” is used in assignment expressions and assignment statements. Continue reading

Operators and Expressions – Part II (Arithmetic Operators)

We have already known the general introduction about operators and expressions. Now we will go into detail of each of its type. Let’s begin with arithmetic operators.

Arithmetic Operators:

arithmetic operators in C
Arithmetic Operators in C

They are used for numeric calculations. They can be classified as unary operators and binary operators. Continue reading

Operators and Expressions – Part I (Introduction)

We have already known the general introduction about C programming language, its constants, variables, statements and how to read input and write output in a formatted manner. Now, here we will see the various types of operators used in C. Let’s begin with its introduction in this post.

operators_in_c
Operators in C

Continue reading