Question: myString will be capable of holding a C - string with up to 9 9 characters before the terminating null character. Of course, myString can
myString will be capable of holding a Cstring with up to characters before the terminating null character. Of course, myString can hold a shorter Cstring, too. For example, these assignments give myString the value xyz myStringx;myStringy;myStringz;myString;It is legal to initialize a string variable, like this.char example "First value";Now, the string example contains the following: F i r s t v a l u e However, it is not legal to assign string variables, because you cannot assign to an entire array. myString xyz; ILLEGAL: Cannot assign to an arrayFurthermore, you cannot do comparisons like this.if myString xyz cout "fantasy land" endl; The comparison myString xyz is actually legal it will compile the addresses, not the strings! but it will always evaluate to false. To handle these kinds of difficulties, programmers can rely on the Cstring library a
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
