+ 2

What's the different between printf and cout

3rd Oct 2018, 1:36 PM
MD. Abdullah Al Masum
MD. Abdullah Al Masum - avatar
9 Respostas
+ 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
3rd Oct 2018, 1:49 PM
blACk sh4d0w
blACk sh4d0w - avatar
+ 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.. 🙂🙂
3rd Oct 2018, 3:37 PM
Bisnu😎
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
7th Oct 2018, 9:33 AM
Sakshi Parashar
0
thx singh
7th Oct 2018, 9:53 PM
Gilboy Treblig
Gilboy Treblig - avatar
0
printf is more faster than cout
8th Oct 2018, 4:48 AM
Emilio Pozo
Emilio Pozo - avatar
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/
8th Oct 2018, 4:54 AM
deepak sharma
deepak sharma - avatar
0
how printf is faster than cout
9th Oct 2018, 4:47 AM
bharath Simhadri
0
printf is used in C language cout is used in C++ language ..Thats it
11th Oct 2018, 3:12 AM
Kishan
Kishan - avatar
0
No different only we use in different different language.
18th Aug 2019, 9:57 AM
🌠Ratnesh Rakesh Ranjan 🇼🇳
🌠Ratnesh Rakesh Ranjan 🇼🇳 - avatar