In the previous example, the sizeof() operator was used to determine the memory requirements of a variable. But what if you wanted to just count the number of characters in a string? For that, you can use the appropriately named strlen() function (short for string length):
num = strlen(my_string);
Note that this function does not count the terminating