cout << printf("Enter what has to be done",1);
This will display how many leters with space have this:
Enter what has to be done - there is 25
if you write Hello Word in printf it will display number 10
and so on....
Excellent! On my system it displays the number of characters and ignores the 1. So you can leave it out. Then you only problem is to find a uses for it. :)
It's not surprising, printf returns the numbers chars successfully written, though lots of people seem to forget there is a return value at all. People write printf("Hello World");
/Edit:
But they could have written:
int CharsWritten = printf("Hello World");
Edit/
The return value of printf can be important, especially if one writes to a file. In my C programming days (in a previous century) I would printf to a string (%s, aka array of char), if that worked I would fprintf the string to the file. Then the return value of that is checked as well, to see that it worked.
The 1 is a minimum width specifier, as per the documentation.
Another one is scanf, this one is more important - one should check the return value of this to see if it worked, it's easy to mess up the specification of what to read in, or more likely the input may not match the specification.
As kemort says, what is a valid use for this combination of std::cout and printf ?