my_getline
int my_getline(char* line, int max_size) { int c; int len = 0; //fflush(stdin); while( (c=getchar()) != '\n' && c != EOF); while( (c=getchar()) != EOF && len < max_size){ line[len++]=c; if ('\n' == c) break; } line[len] ='\0'; return len; }