Code:
char c;
do 
{
    c=getchar();
    putchar (c);
} while (c != '\n');