I run into a code:
printf("\tout:\t%-14.14s\n", (sprintf(tmpbuf[0], "[%s]", mystring), tmpbuf[0]));
What does those sentence in () with sprintf mean?
It is an expression involving the comma operator, to put the following into a single line:
sprintf(tmpbuf[0], "[%s]", mystring);
printf("\tout:\t%-14.14s\n", tmpbuf[0]);
The comma operator evaluates both arguments and returns its right argument, i.e. tmpbuf[0]
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With