subject

Provide very specific details to earn credit. - Memory Area 1: Environment
- Memory Area 2: Runtime Stack
- Memory Area 3: Free-store
- Memory Area 4A: Uninitialized Data
- Memory Area 4B: Initialized Data
- Memory Area 5: Binary Program
#include
#include
using namespace std;
static string model;
class Car {
public:
Car() {};
static string carModel;
string name{ "McQueen" };
};
string Car::carModel = "S";
Car* testCar(string str) {
unique_ptr uCarPtr { make_unique() };
static Car car;
Car* driverlessCar = new Car();
return &car;
}
function testLambda() {
int price = 100000;
int rank = 1;
function carLambda = [rank, &price]()->int {
cout << "carLambda in testLambda" << endl;
return price + rank;
};
return carLambda;
}
int main(int argc, char* argv[], char* envp[]) {
Car* carPtr = testCar("CS");
string carName{ carPtr->name };
model = Car::carModel;
auto testLambdaPtr = testLambda();
cout << testLambdaPtr() << endl;
return 0;}
In which memory area is this element stored? Please state your choice and explain why?
The lifetime, beginning & end, of this element? Why?
uCarPtr object [1] [2] [3] [4a] [4b] [5]
Why [area]?
What lifetime and why?
carLambda expression [1] [2] [3] [4a] [4b] [5]
Why [area]?
What lifetime and why?
testLambdaPtr object [1] [2] [3] [4a] [4b] [5]
Why [area]?
What lifetime and why?
envp [1] [2] [3] [4a] [4b] [5]
Why [area]?
What lifetime and why?

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:00
What are procedures that keep a data base current
Answers: 1
question
Computers and Technology, 22.06.2019 16:30
The most common battery cable terminal is a that provides a large surface contact area with the ability to tighten the terminal onto the battery post using a nut and bolt.
Answers: 2
question
Computers and Technology, 22.06.2019 22:30
Jason needs to learn a new web tool. he went through his books to understand more about it. now he wants hands-on experience with using that tool. what would him? jason can use websites where workspace is provided to test the results of your code.
Answers: 2
question
Computers and Technology, 23.06.2019 00:10
My has been slow anyone else’s ?
Answers: 1
You know the right answer?
Provide very specific details to earn credit. - Memory Area 1: Environment
- Memory Area 2: R...
Questions
Questions on the website: 13722367