How to get string input in C language

How to get string input in C language
refer‮ ‬to:lautturi.com
/*
Example:input string in C language
*/

#include <stdio.h>
#include <stdlib.h>

#include<conio.h>

int main()
{
    char username[10];
    printf("input the name:");
    gets(username);
	//  or 
	// scanf("%[^\n]s", &username);
    printf("STRING :%s",username);

    return 0;
}

output example:

input the name:lautturi
STRING :lautturi
Created Time:2017-08-29 11:02:15  Author:lautturi