Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do we use printf() function in C++? [closed]

Tags:

c++

Why do we use printf() & scanf() functions in c++?

like image 783
ankit Avatar asked Nov 27 '22 21:11

ankit


1 Answers

I think some programmers find them easier or more accessible than the stream-based ones that are more common in C++.

Also, when doing complicated string formatting, the C way of using a formatting string can be perceived as being more concise and readable. I'm not arguing that it is, I'm just saying that in some cases some people might think it is, and thus chose to use printf().

like image 71
unwind Avatar answered Dec 14 '22 17:12

unwind