Question: The first print shows the member value to be false, and the other two prints show it as true. Why does the first output differ from the last two?

```
#include <vector>
#include <iostream>

using namespace std;

class MyClass
{
public:
  bool value;
  bool stuff;
};

class Container
{
public:
  vector<MyClass> my_classes;
  Container()
  {
    MyClass c;
    cout << c.value << endl;
    my_classes.push_back(c);
  }
};

int main (int argc , char* argv[] )
{
  MyClass mc;
  cout << mc.value << endl;
  Container con;
  cout << con.my_classes[0].value << endl;
  return 0;
}

```

Answer: 
You are not initializing members to any value. They will just have any value that was in that place of memory before.
The objects you are declaring in main(..) are automatic hence allocated on the stack of the running thread. Since you don't initialize the objects, they are simply filled with the data that was previously in this very part of the stack. 

If you processor is of intel x86 architecture, the assembly language code for a typical function would look something like this (AT&T syntax)

```
pushl   %ebp 
movl    %esp, %ebp
subl    $LOCAL_VARIABLES_NUM * WORD_SIZE, %esp

...
<function code goes here>
<that is how we read variable values>
movl -4(%ebp), %ebx        
...

addl $LOCAL_VARIABLES_NUM * WORD_SIZE, %esp
popl %ebp

```

As you see, we simply add and substract the necessary number of bytes from the stack pointer, leaving the old data where it was.