0

Can we use printf,scanf functions in c++?if not why?

29th Mar 2017, 3:40 AM
Rrohit Joshi
Rrohit Joshi - avatar
4 Answers
+ 16
You can but it's not recommended if you plan on going for pure C++ style programming. As Luka has pointed out, some compilers (if not only VS) may throw errors.
29th Mar 2017, 7:35 AM
Hatsy Rei
Hatsy Rei - avatar
+ 12
You can use them but you need to include #include<cstdio> in your code.
29th Mar 2017, 4:01 AM
Mr.Robot
Mr.Robot - avatar
+ 10
Almost all C programs run in C++ too. So, you can use 'printf' and 'scanf'.
29th Mar 2017, 4:01 AM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 4
use cout and cin
29th Mar 2017, 3:43 AM
Mayur Chaudhari
Mayur Chaudhari - avatar