+ 3

What is the difference between cout and print??

4th Nov 2016, 1:50 PM
ashwani sharma
17 Answers
+ 6
both have the same functionality to display but 'cout' is used in c++ ,'print' is used in c
4th Nov 2016, 5:10 PM
Krishna Teja
Krishna Teja - avatar
+ 4
cout is used in C++ to display whatever you want when print is used in python for the same purpose. Every programming language has different method for this for ex; Java ==> System.out.println(); System.out.printf(); etc...PHP ==>echo ""; print""; JS ==>window.alert () , document.write().
4th Nov 2016, 2:41 PM
Mateusz Wiezik
Mateusz Wiezik - avatar
+ 4
1.cout is an object of iostream class printf is an funtion of (stdio.h) 2. we need format specifiers in printf like %d , %c etc.. for printing integer , charters etc.. but not in cout 3. printf returns integer value i.e no. of charters inside " " for ex. int a=printf("abc"); // so a=3 but cout return address
17th Nov 2016, 5:25 PM
Ajay Nagar
Ajay Nagar - avatar
+ 2
printf is used in c where as using object orientation to make c++ completely object oriented they defined printf inside ostream class and created an object named as cout to perform printing task on a console
11th Feb 2017, 6:05 PM
Bharath yadav
Bharath yadav - avatar
+ 1
cout is a reserved word. print is not, in c++. cout is the standard function to write something on the standard OUTput (screen, nowadays, printer before). Formely print, tells a programm to print on printer, cout on the screen.
9th Nov 2016, 8:39 PM
Matthieu Viguier
Matthieu Viguier - avatar
+ 1
1.cout is an object of iostream class and printf is an funtion of stdio.h 2. we need format specifiers in printf like %d , %c,%f etc.. for printing integer , charters etc.. but not in cout 3. printf returns integer value i.e no. of charters inside " " for ex. int a=printf("mrk"); // a=3 but cout return address 4. cout is a reserved word. print is not, in c++. cout is the standard function to write something on the standard OUTput (screen, nowadays, printer before). Formely print, tells a programm to print on printer, cout on the screen
9th Mar 2018, 3:24 PM
mudit
mudit - avatar
0
I have told the same na!!@rahul
7th Nov 2016, 7:10 AM
Krishna Teja
Krishna Teja - avatar
0
we use print when we are using header file <stdioh>, and we use cout when we use header file <iostream>
21st Nov 2016, 2:05 PM
Haider Ali Khan
0
the cout is the word for sow a output and print use for multiple text
25th Nov 2016, 7:32 AM
HACKER HITMAN
HACKER HITMAN - avatar
0
both are same for display msg and output but cout an object in c++ and printf() is a function in c programming cout use with tha insertion operator <<
31st Jan 2017, 9:32 AM
sonam
sonam - avatar
0
I am learning c++ using printf statement
11th Jan 2018, 8:25 PM
ameila jordon
- 1
Guyz printf is used in c but both printf and cout both can we used in c++ the main difference is printf is s function whereas cout is an object of some class whose I have froget but this is the main difference.
12th Nov 2016, 1:56 PM
ROHAN JOSHI
ROHAN JOSHI - avatar
- 1
both do same work but cout is use for object and print used in c
15th Nov 2016, 5:51 AM
SAHIL KUMAR
SAHIL KUMAR - avatar
- 2
both is used to print the value but 'print ' used in c and 'cout' used in c++
7th Nov 2016, 5:36 AM
rathod rahul
rathod rahul - avatar
- 2
cout is an output statement in c++ programming language while print is just a statement used when writing pseudocodes for and it becomes an output statement in C when it is written as printf.
7th Nov 2016, 7:04 AM
Chisembe James Abuti
Chisembe James Abuti - avatar
- 2
both tasks is same but difference is cout is used in c++ n print is used in c .
10th Nov 2016, 4:53 PM
Senpai Anubhav
Senpai Anubhav - avatar
- 2
bella zii
19th Nov 2016, 8:33 AM
Andrea Pizzuto
Andrea Pizzuto - avatar