English

Differentiate between the following: length and length() - Computer Applications

Advertisements
Advertisements

Questions

Differentiate between the following:

length and length()

Write the difference between length and length() functions.

Distinguish Between

Solution

S. No. length length()
1. This method is used to determine the size of an array. The length() method is used to determine the size of a string.
2. Example: int a[] = new int[100] Example: Strings = "summer";
3. In the above example, a.length returns 100 In the above example, s.length() returns 6
shaalaa.com
  Is there an error in this question or solution?
Chapter 3: Arrays (Single Dimensional and Double Dimensional) - EXERCISES [Page 240]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 3 Arrays (Single Dimensional and Double Dimensional)
EXERCISES | Q VI. 8. | Page 240
Avichal Computer Applications [English] Class 10 ICSE
Chapter 3 Arrays (Single Dimensional and Double Dimensional)
Review Insight | Q 4. | Page 236
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×