+ 3
Printf cout
differences between cout and printf
7 Respuestas
+ 11
Printf() is a function defined in stdio.h of C to print something on the screen,
cout is a reference to an object of class ofstream defined in iostream.h, which is used to print something in C++
+ 9
It's your perspective.
Both are same but created in two different languages
+ 5
which one is better ?
+ 5
thx
+ 2
If you are using C++, avoid using C functions (like printf). It is not a good practice. cout is designed to support c++ native features (like STL libraries) and to work the same way as any other output channel.
+ 1
if u r using c++ use cout, if u are using c use printf..both do the same exact thing which is print the output on the screen.
0
If we want to print a massage
We use cout keyword