+1

why output will not be shown in c language if we use << instead of <?

why output will not be shown in c language if we use << instead of <? I was reading a book and there it was written but without any explanation..

11/13/2019 4:42:19 PM

Muhammad Osama Bin Absar

2 Answers

New Answer

+4

In c, output is given by "printf()" In c++, output is given by "cout << " As c++ is an advanced version of c (with oops) so you can use printf in c++ too by including cstdio library "<<" is also a bitwise operator. whereas "<" is a binary operator (comparison).

-1

because c is not c++. also cout and cin are included in c++ header file iostream.