Count () and strlen ()
1. Count () function
The count () function returns the length of the array (the number of elements).
Example 1:
The running result of the program is: 3
Example 2:
The running result of the program is: 1
Second, strlen () function
The strlen () function returns the length of the string.
Return value: the length of the string is returned if successful, and 0 if the string is empty.
Example 1:
The running result of the program is: 8
Example 2:
The running result of the program is: 16