title: Why are the outputs of printf and std::cout different?
body: <p>I tried the following code of C++. However, the outputs of <code>printf</code> and <code>std::cout</code> are different. Why?</p>
  
  <pre><code>struct Foo
  {
      int a;
      int b;
      int c;
  };
  
  int main()
  {
      printf("%d\n", &amp;Foo::c);  // The output is 8
      std::cout &lt;&lt; &amp;Foo::c &lt;&lt; "\n"; // The output is 1
  }
  </code></pre>