title: Significance of ios_base::sync_with_stdio(false); cin.tie(NULL);
body: <p>What is the significance of including</p>
  
  <pre><code>ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  </code></pre>
  
  <p>in C++ programs?</p>
  
  <p>In my tests, it speeds up the execution time, but is there a test case I should be worried about by including this? </p>
  
  <p>Do the 2 statements always have to be together, or is the first one sufficient, i.e., ignoring <code>cin.tie(NULL)</code>?</p>
  
  <p>Also, is it permissible to use simultaneous C and C++ commands if its value has been set to <code>false</code>?</p>
  
  <p><a href="https://www.codechef.com/viewsolution/7316085" rel="noreferrer">https://www.codechef.com/viewsolution/7316085</a></p>
  
  <p>The above code worked fine, until I used <code>scanf/printf</code> in a C++ program with the value as <code>true</code>. In this case, it gave a segmentation fault. What could be the possible explanation for this?</p>