for (i=0; i < lim-1 && (c=getchar()) != '\n' && c != EOF; ++i)
s[i] = c;
easy: Rewrite the above without using '&&' or '||'.(less) easy: Avoid using the 'if' keyword.
for (i=0; i < lim-1 && (c=getchar()) != '\n' && c != EOF; ++i)
s[i] = c;
easy: Rewrite the above without using '&&' or '||'.for (i=0; (i < lim-1 ) * ((c=getchar()) != '\n' )*( c != EOF)!=0; ++i)
s[i] = c;
for(i=0; i<lim-1 ? (c=getchar()) != '\n' ? c != EOF : 0 : 0 ; ++i)
s[i] = c;