Code Snippets C

#include
int main(void)
{
char s[256], *j;
j = s;
while((*j++ = getchar())!= '\n') ;
*j = '\0'; /* add null terminator */
printf(s);
return 0;
}