Question: Please solve those two questions. It's C++ language 3. In the following code fragment; string a - hello; string b - a; string * -

Please solve those two questions. It's C++ language
3. In the following code fragment; string a - "hello"; string b - a; string * - &a; string &d - *C; string e-*c; How many instances of the string type exist in memory? Draw a picture of automatic storage for these variables. 4. Ada is writing several functions that each accept a string parameter. For each function description, decide if the function should accept its parameter as a string, a strings, a string&, or a const string&: (a) In Funca, Ada will read individual characters from the string to make a computation. She will not mutate the string- (b) In FuncB, Ada will mutate the string parameter, but doesn't want the original string passed to the function to mutate. (c) In Funcc, Ada will mutate the string parameter, and the string cannot be "null": nullptr. (d) In FuncD, Ada does not want to duplicate the string passed to the function, and is prepared to handle a null value as well
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
