In some programming languages, strings are entered surrounded by either single or double quotation marks. Write a program that reads the three strings suzy, "suzy" and 'suzy'. Are the sin- gle and double quotes ignored or read as part of the string?

What will be an ideal response?

```
#include
#include
using namespace std;

int main()
{
string input; // string to hold input string

// ask user to enter three strings and then
// store and display the strings
for ( int k = 0; k < 3; k++ )
{
cout << "Enter a string: ";
cin >> input;
cout << "String is " << input << '\n';
} // end for
} // end main
```
Enter a string: suzy
String is suzy
Enter a string: 'suzy'
String is 'suzy'
Enter a string: "suzy"
String is "suzy"

Computer Science & Information Technology

You might also like to view...

What is a light modifier?

What will be an ideal response?

Computer Science & Information Technology

Which of the following is an example of propaganda?

a. Hacking into computer systems b. Using a packet sniffer to capture usernames and passwords c. Spreading misinformation to advance one's cause d. Creating viruses to steal banking information

Computer Science & Information Technology