Find particular character position from the string in C

//c program specifying the particular char position from the string
#include<stdio.h>
#include<string.h>
void main()
{
char str[100],c;int i,lenf=0;
printf("\nenter a string:");
gets(str);
len=strlen(str);
printf("\nenter a character to find its position:");
scanf("%c",&c);
for(i=0;i<len;i++)
{
if(str[i]==c)
{
printf("character position:\n%d",i+1);
f=1;
}
}
if(f==0)
{
printf("\ncharacter not found");
}
}