The following code reads one string, and prints the length of that without using strlen():
#include <stdio.h>
#include <string.h>
int main()
{
char s[20];
gets(s);
printf(" %d ",printf("%s",s));/*return
type of printf() is int. so it
returns the number of characters it prints.*/
}