The ___________ operation in strings is used to find the length of the string.
- Size
- Length
- Capacity
- Count
The correct option is "Length." In programming, especially when working with strings, the length operation is used to determine the number of characters or elements in the string. It's a fundamental operation for various string manipulations, such as substring extraction, comparison, and traversal. Understanding string length is essential for writing robust and efficient code when dealing with text data.
Loading...
Related Quiz
- What is the purpose of a router in a computer network?
- You're developing a system where user input needs to be validated against a predefined list of acceptable values. How would you use arrays or strings to handle this validation effectively?
- What is the SOLID principle in OOP? Explain one of its principles.
- Thread creation is less expensive than ___________ creation.
- Which tool is commonly used for orchestrating containerized applications across a cluster of machines?