You are on page 1of 1

Emmanuelle M.

Hermosilla

1. What are Strings in C++ Programming?

-The term string generally means an ordered sequence of characters, with a first character, a second
character, and so on, and in most programming languages such strings are enclosed in either single or
double quotes. In C++ the enclosing delimiters are double quotes.

2. How do you declare a variable to receive string values? Give examples.

First, declare a variable to receive string values by typing “string”, then the variable, then a semicolon (;).

Example:

string str1;

string str2;

3. How do you input and output strings in C++ programming? Give Examples.
By following the format cout << variable;

You might also like