Sunday, 14 August 2022

Arithmetic Operators in C Programming

  • Arithmetic operators are used to perform basic arithmetic operations.

  • There are five Arithmetic Operators used in C Language:

    Addition(+), Subtraction(-), Multiplication(*), Division(/) & Modulus(%).

  • Modulus gives us remainder of two operands and can only be applied on integer data.

  • Addition, subtraction, multiplication and division can be applied on both integer as well as real data.

  • Arithmetic operators are binary in nature i.e. they require at least two operands to perform operation.

  • Arithmetic Operators can be Applied on both +ve as well as -ve numbers.

  • Symbols used for Arithmetic operators are:




  • Arithmetic Operation Eg:






  • Applying '/' & '%' on -ve numbers :





  • On applying '%' to -ve numbers, sign of numerator will be assigned to the result.





Program


Output















#codingmadeasy #codingmadeasy #clanguage #cprogramming #java #javaprogramming #datastructure #algorithms #complexity #coding #codeforfun #codinglife #coderlife #programming #program #computerscience #it #technology #ugc #gate #gate #nta #net

No comments:

Post a Comment