buffer[strlen(buffer)]='\0';


간단명료