0
Difference between cout and printf
What is the difference between cout and printf? I donât get it.
3 Answers
+ 6
Michaelol ,
there are quite some differences between cout and printf() in c++. one of the most inportant is that printf() can do an output formatting.
see more information here:
https://www.techtually.com/printf-vs-cout/
+ 4
printf()--- It is a formatting function that prints to the standard out. It prints to the console and takes a format specifier to print. It returns an integer value.
cout--- It is an object of iostream in C++ language. It also prints to the console. It does not take any format specifier to print. It does not return anything.
+ 1
cout and printf are both output functions used in different programming languages, namely C++ and C, respectively.