I have used the following type of construct for this situation. It is not more efficient (still has a condition at each iteration), but I like it because it results in a single printf:
char *sep = " ";
for(ii=0; ii<4; ii++) {
if ( ii == 3 )
sep = "\n";
printf( "%d%s", ii, sep );
}