MULTIPLE CHOICE QUESTIONS AND ANSWERS
  1. True/False: C-strings cannot be concatenated by + operator

    Answer: True

  2. The end of the string is marked with the help of _______ character.
    • none of these
    • return(enter)
    • null
    • tab
    • semicolon

    Answer: (c)

  3. True/False: C-strings can be lexicographically compared by relational operators.

    Answer: False

  4. True/False: Length of the string is obtained by length() function.

    Answer: False

  5. True/False: As string constants are enclosed within a pair of double quote characters, it cannot contain a double quote character.

    Answer: False

  6. True/False: We can use assignment operator (=) for copying one C-string into another.

    Answer: False

  7. True/False: A C-string can contain return (new line) character.

    Answer: True

Get Object Oriented Programming with C++, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.