Ask Question

Class string belongs to which namespace?

A.

std

B.

C.

D.

All of the above

+2
Answers (1)
  1. 28 December, 13:57
    0
    A. std

    Explanation:

    Class string belongs to std namespace. Its complete representation is std::string. Besides string, std namespace also contains other standardized objects such as cout, cin, vector etc. If we use the declaration

    using namespace std in our C+ + program, then we can use string datatype directly without having to prefix it with std:: in the rest of the code. This aids in readability.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Class string belongs to which namespace? A. std B. C. D. All of the above ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers