Answer Posted / Arun Pratap Saroj
len() returns the length of a slice or string, while cap() returns the allocated capacity (maximum length) of a slice. For example, if you have a slice with length 5 and capacity 10, len() would return 5 and cap() would return 10.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
No New Questions to Answer in this Category !! You can
Post New Questions
Answer Questions in Different Category