[SOLVED] What's the difference? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

[SOLVED] What's the difference?

Here are two methods of printing and getting input from user I have seen till now.. 1) printf() scanf() 2) cout cin Can someone please explain the difference?

6th Jul 2022, 1:19 PM
Bhaveshsingh Pawar
Bhaveshsingh Pawar - avatar
6 Answers
+ 1
a Wolf are they interchangeable? can I use printf() and scanf() in C++?
6th Jul 2022, 1:23 PM
Bhaveshsingh Pawar
Bhaveshsingh Pawar - avatar
+ 1
Jacob Tracey What did you mean `cout` doesn't support formatted string? what kind of formatted string were you talking about?
6th Jul 2022, 1:37 PM
Ipang
+ 1
Jacob Tracey Perhaps an example? I am still not understanding your point here ...
6th Jul 2022, 2:00 PM
Ipang
+ 1
a Wolf Thank you so much
6th Jul 2022, 3:18 PM
Bhaveshsingh Pawar
Bhaveshsingh Pawar - avatar
+ 1
Jacob Tracey I thought it was about string interpolation. What a surprise if it's true, cause I never knew C language supports string interpolation
7th Jul 2022, 2:48 AM
Ipang
0
Jacob Tracey thank you
6th Jul 2022, 1:34 PM
Bhaveshsingh Pawar
Bhaveshsingh Pawar - avatar