हिंदी

What is the difference between / and % operator? - Computer Applications

Advertisements
Advertisements

प्रश्न

What is the difference between / and % operator? 

अंतर स्पष्ट करें

उत्तर

S. No. / %
1. Division (/) operator Modulus (%) operator
2. Returns the quotient of division operations. Returns the remaining from the division operation.
3. Example: 
int c = 26;
b = c / 5 returns 5 (quotient) 
Example: 
int c = 26; 
b = c / 5 returns 1 (remainder) 
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 1.04: Operators in Java - EXERCISES [पृष्ठ ४४]

APPEARS IN

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

Englishहिंदीमराठी


      Forgot password?
Use app×