Why we used . while printing the string.
printf("%*.*s",10,7,str);
This is the actual program. how the printf statement preforms the operation in detailed explanation.
#include<stdio.h>
int main()
{
char *str="c-pointer";
printf("%*.*s",10,7,str);
return 0;
}