I have the following program:

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

int main()

{
    static char string[12];
    int length,c,d;
    printf("Enter a string :");
    gets(string);
    length=strlen(string);
    printf("\nLength of the string is %d",length);
    for(c=0;c<=length-2;c++)
    {
        d=c+1;
        printf("\t%.*s\n",d,string);
    }
    for(c=length;c>=0;c--)
    {
        d=c+1;
        printf("\t%.*s\n",d,string);
    }
} 

```

I am very much confused about the usage of `%.*s` in the `printf` statement. I know `%s` is used for displaying strings, but I am confused the usage of `.*` before `s` in this program. Also there is only one datatype (`%s`) mentioned inside the quotation marks in the printf statement, but there are two variables mentioned in the `printf` statement.