#include <stdio.h>
#include <stdlib.h>
int main()
{
int size;
// initializing strings
char str1[] = "tutorialsroot";
char str2[] = "kfc";
// using strcspn() to calculate initial chars
// before 1st matching chars.
// returns 3
size = strcspn(str1, str2);
printf("The unmatched characters before first matched character : %d\n", size);
}