Site icon Exam4Training

What does the strlen() function return in C?

What does the strlen() function return in C?
A . The number of characters in the string
B . The index of the first occurrence of a character
C . The size of the array
D . The length of the string including null terminator

Answer: D

Explanation:

The strlen() function returns the length of the string including the null terminator.

Exit mobile version