The strlen function returns the length of a string, excluding the ________.

  • null terminator
  • first character
  • whitespace characters
  • special characters
The correct answer is the null terminator. The strlen function in C/C++ returns the length of a string by counting characters until it encounters the null terminator (''). It excludes the null terminator from the count. The other options are not what strlen excludes.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *