String in C++ by R4R Team

What is string in C++ :
-String is the collection of char ends with ''(NULL)
or
-String is array of char.

syntax:
char variable[size];

program:

#include< iostream>
using namespace std;
int main()
{
//string declaration
char s[20];
cout<<"Enter Stringn";
cin>>s;
cout<<"Your string is: "<< s;
return 0;
}


output-

Enter string
r4rstring
Your string is: r4rstring




Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!