LearnFrenzy
Sign in Take a free test

Input/Output with cin and cout · Input/Output MCQ · Question 17

What does sync_with_stdio(false) do? Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
Question 17 Back to Exercise

What does std::ios::sync_with_stdio(false); do?

  • A Turns off all output
  • B Stops synchronising C++ streams with C stdio, which makes cin/cout much faster – but they must not be mixed with printf/scanf afterwards Correct
  • C Makes cin read from a file
  • D Enables multithreaded I/O
Correct Answer: Option B

It is usually combined with std::cin.tie(nullptr), which stops cin from flushing cout before every read.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links