+ 1
Different working of cout and printf while both do the same work
we use format specifiers like %d, %c etc in printf but we don't use them in cout. why??
3 Antworten
+ 12
"printf" returns an integer value (equal to the number of characters printed) while "cout" does not return anything
And.
cout << "y = " << 7; is not atomic.
printf("%s = %d", "y", 7); is atomic.
cout performs typechecking, printf doesn't.
There's no iostream equivalent of "% d"
+ 10
u r welcomed @Manual
+ 7
Thanks @PR
I did not know printf() could do that.
I will give it a shot later!