program to find the length of the strings