title: Tricky interview question for mid-level C++ developer
body: <p>I was asked this question on the interview, and I can't really understand what is going on here. The question is "What would be displayed in the console?"</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  int main()
  {
      unsigned long long n = 0;
      ((char*)&amp;n)[sizeof(unsigned long long)-1] = 0xFF;
  
      n &gt;&gt;= 7*8;
  
      std::cout &lt;&lt; n;
  }
  </code></pre>
  
  <p>What is happening here, step by step?</p>