What is the use of string in c++?
Answer / Vishal Nigam
The use of a string in C++ is to handle sequences of characters, which can be manipulated easily using built-in functions. It is a class template that encapsulates a null-terminated character array and provides a variety of methods for operations like concatenation, searching, replacing etc.
| Is This Answer Correct ? | 0 Yes | 0 No |
Can you explicitly call a destructor on a local variable?
class X { private: int a; protected: X(){cout<<"X constructor was called"<<endl;} ~X(){cout<<"X destructor was called"<<endl} }; Referring to the code above, which one of the following statements regarding "X" is TRUE? a) X is an abstract class. b) Only subclasses of X may create X objects. c) Instances of X cannot be created. d) X objects can only be created using the default copy constructor. e) Only friends can create instances of X objects.
What is an undefined reference/unresolved external symbol error and how do I fix it?
Difference between a copy constructor and an assignment operator.
What is a pointer with example?
Write any small program that will compile in "C" but not in "C++"
What is a terminating character in c++?
Can I learn c++ without c?
Why is it called c++?
Can a built-in function be recursive?
What are the different types of Storage classes?
What is pair in c++?