#include <stdio.h> #include <stdlib.h> void main(void) { char *s = (char *)malloc(sizeof(char) * 100); int i = 0; int c; while(c = fgetc(stdin) != '\n'&&c != EOF) { s[i++] = c; } s[i] = '\0'; printf("%s\n",s); free(s); }