NAME:-SIMRAN ROY BRANCH:- INFORMATIONTECHNOLOGY SECTION:- G ROLL NO:-0991503124 PROGRAMING IN C Dr. Akhilesh Das Gupta Institute of Professional Studies Submitted to Ms. Anita Yadav OPERATORS
2.
OPERATORS In Programming ,an operator is a symbol that tells the compiler or interpreter to perform a specific mathematical or logical operation on one or more values .
3.
DIFFERENT TYPES OFOPERATORS IN C • ARITHMETIC OPERATORS • RELATIONAL OPERATORS • LOGICAL OPERATORS • ASSIGNMENT OPERATORS • INCREMENT OPERATORS • DECREMENT OPERATORS • BITWISE OPERATORS • TERNARY OPERATOR • TYPE CASTING OPERATOR • SIZE OF OPERATOR
4.
Arithmetic Operators • ARITHMETICOPERATORS ARE SYMBOLS USED IN MATHEMATICS AND PROGRAMMING TO PERFORM BASIC ARITHMETIC OPERATIONS ON NUMBERS • EXAMPLE:-Addition(+), Subtraction (-), Multiplication (*), Division (/), Modulus (%).
5.
Relational Operators Relational operatorsare used to compare two values and determine the relationship between them. They are commonly used in programming languages to perform logical comparisons, which return a Boolean value (true(1) or false(0) . EXAMPLE:-Equal to (==),Not Equal to(! =),Greater then(>),Less then(<), Greater then Equal to(>=),Less Then Equal to(<=)
6.
Logical Operators LOGICAL OPERATORSARE USED TO PERFORM LOGICAL OPERATIONS, COMMONLY IN PROGRAMMING . THEY OPERATE ON ONE OR MORE BOOLEAN VALUES (TRUE/FALSE) AND RETURN A BOOLEAN RESULT EXAMPLE:- AND (&&), OR (||), NOT (!)
7.
Assignment Operators ASSIGNMENT OPERATORSARE USED TO ASSIGN VALUES TO VARIABLES. THEY SIMPLIFY THE PROCESS OF UPDATING THE VALUE OF A VARIABLE IN PROGRAMMING EXAMPLE:- (=), (+=),(-=),(*+),(/=),(**+)
Bitwise Operators It performsoperations on each individual bit of the binary values of the operands EXAMPLE:-Bitwise AND (&),Bitwise OR (|),Bitwise XOR (^),Bitwise NOT (~),Left Shift (<<), Right Shift (>>)
11.
Ternary Operators IT'S USEDTO ASSIGN AVALUE TO AVARIABLE BASED ON A CONDITION LIKE: CONDITION ? EXPRESSION1 : EXPRESSION2;
12.
Sizeof Operator THE sizeofOPERATOR IS USED TO GET THE SIZE, IN BYTES, OF A DATA TYPE OR VARIABLE EXAMPLE:- sizeof(int), sizeof(a)
13.
Type Casting Operator Thetype casting operator in C is used to convert a variable from one data type to another