In character array strlen() returns the number of characters, while sizeof() returns the number of occupied bytes by character array.
Example
#include <stdio.h>
#include <string.h>
int main()
{
char text[100]= "Sample test";
printf("%d,%d", strlen(text), sizeof(text));
return 0;
}
In this example strlen(text) will return 11 because total number of characters are 11 and sizeof(text) will return 100, because text variable will take 100 bytes in memory