codice:
char* input(void)
{
    char* buffer,temp;
    int count=1;
    buffer=(char*)malloc(sizeof(char));
    while((temp=getchar())!=10)
    {
        buffer[count-1]=temp;
        count++;
        buffer=(char*)realloc(buffer,count*sizeof(char));
    }
    buffer[count-1]=0;
    return buffer;
}