C++ String

Go to main Page

String in C++

A String variable is a collection of characters that are surrounded by double-quotes.

Strings are used to store text and collection of Characters.

string name="shameer";


#include <iostream>
    using namespace std;
    int main()
        string name="shameer";
        string address="pakistan";
        cout<<"Your name is " << name <<"Your address is << address";



Your name is shameer your address is Pakistan.