title: Why does "sizeof(a ? true : false)" give an output of four bytes?
body: <p>I have a small piece of code about the <code>sizeof</code> operator with the ternary operator:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdbool.h&gt;
  
  int main()
  {
      bool a = true;
      printf("%zu\n", sizeof(bool));  // Ok
      printf("%zu\n", sizeof(a));     // Ok
      printf("%zu\n", sizeof(a ? true : false)); // Why 4?
      return 0;
  }
  </code></pre>
  
  <p><strong>Output (<a href="http://ide.geeksforgeeks.org/NE9Cfo" rel="noreferrer">GCC</a>):</strong></p>
  
  <pre><code>1
  1
  4 // Why 4?
  </code></pre>
  
  <p>But here,</p>
  
  <pre><code>printf("%zu\n", sizeof(a ? true : false)); // Why 4?
  </code></pre>
  
  <p>the ternary operator returns <code>boolean</code> type and sizeof <code>bool</code> type is <code>1</code> byte in C. </p>
  
  <p>Then <strong>why does <code>sizeof(a ? true : false)</code> give an output of four bytes?</strong></p>