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...

The purpose of an initial read statement is

What will be an ideal response?What will be an ideal response?

Computer Science & Information Technology

Text can be any letters, numbers, and symbols and Excel can use them in calculations

Indicate whether the statement is true or false

Computer Science & Information Technology

HTML uses a system of tags to identify sections of a Web page.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Firefox and Internet Explorer are examples of ____________

a. Cookies b. Web browsers c. Websites d. Proxy servers

Computer Science & Information Technology