मराठी

Distinguish between Postfix decrement and Prefix decrement. - Computer Applications

Advertisements
Advertisements

प्रश्न

Distinguish between Postfix decrement and Prefix decrement.

फरक स्पष्ट करा

उत्तर

S. No. Postfix decrement Prefix decrement
1. This operator operates on the basis of 'CHANGE AFTER ACTION'.  This operator operates under the principle of 'CHANGE BEFORE ACTION'.
2. Example: 
d = 10; 
t = 5 * (d--) // t = 5 * 10 = 50 
Example: 
d = 10; 
t = 5 * (--d) // t = 5 * 9 = 45 
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 1.04: Operators in Java - EXERCISES [पृष्ठ ४४]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
पाठ 1.04 Operators in Java
EXERCISES | Q V. 4. (c) | पृष्ठ ४४
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×