0
Cout is similar to printf in c?
cout is similar to printf in c?
3 Respuestas
+ 6
The only thing similar is that both are used for console output, besides that they are totally diferent, cout is an object of ostream and printf a function of stdio.h, so the syntax are very different!
+ 1
Yeah, the purpose of both is the same. The printf is from oldies libraries, the cout from newest objective. As you can see, for printf you have always to declare the specifier (type of variable for output). For cout not,because it
is written in libraries ( OOP technique operator overloading) . So your coding with cout is more simple and more safety
0
@kamyab in java its system.out.print ?