Which measure counts the number of characters in a string?

Prepare for the IGCSE Algorithms and Pseudocode Exam. Study with comprehensive questions covering key algorithms and pseudocode techniques. Access hints and explanations to gear up for your exam success!

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