xxxxxxxxxx
//The strlen() function in C is used to calculate the length of a string.
#include <stdio.h>
#include <string.h>
int main()
{
char word[20]="CS degree";
// using the %zu format specifier to print size_t
printf("Length of string word = %zu \n",strlen(word));
return 0;
}
//Output:
// Length of string word = 9