In this Tutorial, We learn about Operators And Arithmetic Operator
What is the Operator?
An Operator is a symbol that tells the computer to perform certain mathematical or logical manipulations. Operators are used in programs to manipulate data and variables. They usually form a part of the mathematical or logical expressions.
Type Of Operators?Arithmetic operators
Relational operators
Logical operators
Assignment operators
Increment and decrement operators
Conditional operators
Bitwise operators
Special operators
What is the Arithmetic Operators?
What is the Operator?
An Operator is a symbol that tells the computer to perform certain mathematical or logical manipulations. Operators are used in programs to manipulate data and variables. They usually form a part of the mathematical or logical expressions.
Type Of Operators?Arithmetic operators
Relational operators
Logical operators
Assignment operators
Increment and decrement operators
Conditional operators
Bitwise operators
Special operators
What is the Arithmetic Operators?
An arithmetic operator performs mathematical operations such as addition, subtraction, multiplication, division, etc., on numerical values (constants and variables)
Syntax:-
expression1 Operator expression2
expression1 Operator expression2
Example:-
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
a=10;
b=20;
c = a + b;
printf("sum of two number =%d\n",c);
c = a - b;
printf("substraction of two number =%d\n",c);
c = a * b;
printf("multiplication of two number =%d\n",c);
c = b / a;
printf("division of two number =%d\n",c);
c = a % b;
printf("Remainder of two number = %d\n",c);
}
OUTPUT:- sum of two number =30 substraction of two number =-10 multiplication of two number =200 division of two number =2 Remainder of two number = 10
Comment below if you have any queries related to the above tutorial for Operators And Arithmetic Operator C programming language.
0 Comments