English

Explain the following with one example. Arithmetic operator - Computer Science (Python)

Advertisements
Advertisements

Questions

Explain the following with one example. 

Arithmetic operator 

Give two examples of Arithmetic operators. 

Answer in Brief

Solution

Arithmetic operators perform arithmetic operations within a program. Unary arithmetic operators apply to a single operand (prefix or postfix), while Binary arithmetic operators deal with two operands. Shorthand binary operations also employ Binary operators. 

Example: 

  • +, −, ++, −−, *, /, &, %
  • sum += b; // shorthand
  • int c = num % 2
shaalaa.com

Notes

Students should refer to the answer according to their question and preferred marks. 

  Is there an error in this question or solution?
Chapter 1.04: Operators in Java - EXERCISES [Page 44]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 1.04 Operators in Java
EXERCISES | Q V. 3. (a) | Page 44
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×