1234567891011121314151617
#include<stdlib.h> #include<stdio.h> #include <string.h> int main() { char input[256]; char buffer[256]; int length; // gets(buffer); fgets(buffer, 256, stdin); length=strlen(buffer); printf("%s\n",buffer); printf("length=%d\n",length); return 0; }