Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 wellStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started