Reimplement the function strlen. Call your function strLen. The library function, strlen takes one char str[] argument, so you give strLen a char str[] argument as well.

What will be an ideal response?

```
int strLen(const char str[]);
// Pre: str contains a string value: that is, it is
// terminated with a ‘\0’
// Post: Return value is the number of characters in str
// not counting the terminator
int strLen(const char str[])
{
int index = 0;
while ( str[index] != ‘\0’)
index++;
return index;
```

Computer Science & Information Technology

You might also like to view...

Which of the following is a protocol prefix?

A) org B) http C) url D) ca

Computer Science & Information Technology

WINDOWSTEST1.DOCX is an example of a(n) _______

Fill in the blank(s) with correct word

Computer Science & Information Technology