Skip to main content
Contents
Dark Mode Prev Up Next Scratch ActiveCode Profile
\(
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section 2.4 Character Data
In Python strings can be created with single or double quotes. In C++ single quotes are used for the character (
char
) data type, and double quotes are used for the string data type.
Consider the following code.
Try the following question.
Reading Questions Reading Question
1.
If I want to create a string in C++, what set of symbols may be used?
No, single quotes are only used for single characters.
Good job reading!
β β or " " may be used
No. Only one set of symbols may be used.
It depends upon the implementation.
No. The implementation is consistent.
One of the above is indeed correct.
You have attempted
of
activities on this page.