Multiple choice

Which of the following is an invalid character string constant?

  1. “It is a gift to be simple”

  2. ‘Every day with you”

  3. “There was an old lady who”

  4. “Everybody likes computers”

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Character string constants must be enclosed in matching quotation marks. You can use either single quotes (') or double quotes ("), but you must use the same type at the beginning and end. Option B starts with a single quote and ends with a double quote, making it invalid.