+ 2
What's the different between printf and cout
9 Antworten
+ 8
printf is C language function while cout is C++ function. Both are used to display output on the console.
printf requires stdio.h library
cout requires iostream library
printf can also be used in C++ for output purposes but cout cannot be used in C for output
+ 1
both do exactly the same operation...with printf for c for printing something n part of std i/o libray while cout z used in c++ nd part of iostream.... but printf is a function while cout z a object of ostream library as we know c z a procedural oriented language n c++ works on oops concept.. 🙂🙂
0
prinf in c language is used for printing the values
cout in c++ is used for printing the values
printf is a function of standard input output library
cout is an object of class with name ostream and requires iostream
0
thx singh
0
printf is more faster than cout
0
Originally Answered: What is the difference between cout and printf? ... cout is a output stream while printf is a function. cout requires header file iostream while printf requires header file stdio.h. cout is used only by c++ while printf can be used by both c and c++
https://stackoverflow.com/questions/2872543/printf-vs-cout-in-c
http://www.cplusplus.com/forum/beginner/36879/
0
how printf is faster than cout
0
printf is used in C language cout is used in C++ language ..Thats it
0
No different only we use in different different language.