Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.


+5 votes
asked Mar 19 by Kashish Bhadana (170 points)

1 Answer

0 votes
answered Mar 21 by Peter Minarik (86,160 points)

A string data type is used to store character sequences, i.e. text.

For instance in C, you could write the following:

const char * myName = "Bob the builder";

in C++, you'd do

std::string myName = "Bob the builder";

In C# or Java you'd write:

string myName = "Bob the builder";
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.