Question: Working with C - Strings We can create a string in two different ways: ( 1 ) using the C - string style, and (
Working with CStrings
We can create a string in two different ways: using the Cstring style, and using the string
class. To create an array using a Cstring, we first need to declare an array of characters to store
the characters that make the string. You have to keep in mind that when you use the Cstring
style to create a string, you are required to have an extra space at the end for character
which is known as the null character. The null character, marks the end of the string. In
general, a string in which the null character marks its end is referred to as a Cstring. The
following array is an example of a Cstring, which allows us to store or fewer characters:
char mystring;
Note this array can hold characters, but the last one is kept for If we initialize this array
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
