I have a contrived example to demonstrate the request for a specific functionality - I wonder if anyone has a clever trick to do this.
The following is a problem one
For both readability and performance, I think the following code can be used:
for (ii = 0;; ii++)
{
printf("%d", ii);
(ii < 3) ? (putchar(' ')) : ({ putchar('\n'); break; });
}
Actually, the above code is similar to your last code. It is readable, and it still has one conditional evaluation in each increment.