Use scanf to get the string in c

Use scanf to get the string in c
refer ‮‬to:lautturi.com
/*
Example:read a string using scanf function in C language
*/

#include <stdio.h>
int main()
{
    char name[20];
    printf("Enter name: ");
    scanf("%s", name);
    printf("Your name is %s.", name);
    return 0;
}
Created Time:2017-08-29 10:25:09  Author:lautturi