Important MCQ

A C-style string ends with

Q.A C-style string ends with

A) the letter e
B) the null character '\0'
C) a semicolon
D) a space
Correct Answer:
Option B
Detailed Explanation:
B) the null character '\0' is correct. The string class is provided by . String indexes start at 0; length() and size() report character count, substr extracts part of a string, and getline reads spaces.