0% found this document useful (0 votes)
9 views14 pages

Array and String in C++

The document discusses C++ arrays and strings, including initializing array elements and using strings to store character sequences.

Uploaded by

zabraham747
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views14 pages

Array and String in C++

The document discusses C++ arrays and strings, including initializing array elements and using strings to store character sequences.

Uploaded by

zabraham747
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

Array in C++

The nested initializer is preferred because as well as being more informative, it is more versatile.
For example, it makes it possible to initialize only the first element of each row and have the rest
default to zero
C++ Strings
One of the most useful data types supplied in the C++ libraries is the string. A string is a variable
that stores a sequence of letters or other characters, such as "Hello" or "May 10th is my
birthday!". Just like the other data types, to create a string we first declare it, then we can store a
value in it.

You might also like