Ad
  • Custom User Avatar

    "faster" is true; "more effective" depends on the desired effect. Depending on your stdout, the behavior of the two is different, since endl forces a buffer flush.

  • Custom User Avatar

    If you want to compare these 2 printing methods, do it yourself - removing << "\n" from "Hello cout" << "\n" reduces the number of assembly commands from 10 to 4, just 1 more than with printf, and puts is in face just 2 assembly commands - 1 less than printf.

    This is not the most efficient option.

  • Custom User Avatar

    This is the most efficient solution.