STRING

Diego Plascencia Sanabria A01229988

Strings are used very often in programming, strings are used to return non numerical values like words or phrases or even letters. Here is an example of a program that use strings:

<iostream>

using namespace std;

string my_string1 = "a string";
string my_string2 = " is this";
string my_string3 = my_string1 + my_string2;

// Will ouput "a string is this"
cout<<my_string3<<endl;

As you can see, it is very easy, hope it helps you.

CC BY 4.0 STRING by diego plascencia is licensed under a Creative Commons Attribution 4.0 International License.

Comments are closed.