Cognizant interview question

Write the code to find the length of a string without using the string functions