+ 5
C and C++ are two 'almost' separate but intertwined languages. The C language came first. 'printf' is a function that is available in the standard C library for console input and output. 'cout' is an object that is available in the C++ standard library that too is used for input and output jobs. it's an 'ostream' object, and is far better than 'printf' cout is the better alternative unless you have to do pure C programming. Also note that all valid C program is also a valid C++ program as far as the standard goes.
20th Apr 2017, 1:18 PM
Renjith M
Renjith M - avatar