Which measure counts the number of characters in a string?

Study for the IGCSE Algorithms and Pseudocode exam to demonstrate mastery of computing foundations. Enhance learning with quizzes, in-depth explanations, and custom study plans. Begin your journey to success now!

Multiple Choice

Which measure counts the number of characters in a string?

Explanation:
The measure that counts how many characters are in a string is its length. Length tells you the total number of characters, including letters, digits, spaces, and punctuation, and it returns that count as a number. Substring returns a portion of the string, so it doesn’t give you a count. Arithmetic operators perform calculations, not character counting. Lower changes the case of characters, not how many there are. In code you’ll often see this concept named length (or size or len), and you access it as something like string.length or LEN(string) depending on the language.

The measure that counts how many characters are in a string is its length. Length tells you the total number of characters, including letters, digits, spaces, and punctuation, and it returns that count as a number. Substring returns a portion of the string, so it doesn’t give you a count. Arithmetic operators perform calculations, not character counting. Lower changes the case of characters, not how many there are. In code you’ll often see this concept named length (or size or len), and you access it as something like string.length or LEN(string) depending on the language.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy