Take a variable to store the count and then run a loop till you encounter null and increment that count variable.

int findLength(string s)
{
int i=0,count=0;
while(s[i]!=NULL)
{
i++;
count++;
}
return count;
}

thumb_up 3 thumb_down 0 flag 0

These websites can help you:

http://www.langjobs.com/common-interview-questions.php
http://www.langjobs.com/telephonic-interview-questions.php