//past for (int i = 0; i < N - 1; i++) printf("%d ", a[i]); printf("%d\n", a[N - 1]); //now for (int i = 0; i < N; i++) printf("%d%c", a[i], (i < N - 1) ? ' ' : '\n');
the latter one is apparently more elegent than the former one in manifestation,which is surely slower in execution...