Important MCQ

The header file for the string class is

Q.The header file for the string class is

A) <text>
B) <strng>
C) <char>
D) <string>
Correct Answer:
Option D
Detailed Explanation:
D) is correct. Header files provide declarations needed by library features. For example, iostream provides cin/cout, iomanip provides setw/setprecision, cmath provides math functions, and string provides the string class.