In the Bellow C program, `gets` is not working so I have used `scanf` to get the student name from the standard input.

```
#include<stdio.h>
#include<string.h>

struct student
{
    char name[10];
    int roll, sub[6], total, age;
};

int take(int n, struct student s[])
{
    int i, j;

    for(i=0;i<n;i++)
    {
        s[i].total=0;
        printf("\n\nEnter the name of the %d student :",i+1);
        gets(s[i].name);//over here gets is not working
        //scanf("%s",s[i].name);
        printf("Roll no :");
        scanf("%d",&s[i].roll);
        printf("Enter your Age : ");
        scanf("%d",&s[i].age);
        for(j=0;j<6;j++)
        {
            printf("Enter the Marks of Subject %d : ",j+1);
            scanf("%d",&s[i].sub[j]);
            s[i].total=s[i].total+s[i].sub[j];
        }
    }
}

main()
{
    int n;
    struct student s[10];
    printf("Enter how Student Details you want to Enter : ");
    scanf("%d",&n);
    take(n, s);
}

```

How can I use `gets`?