My question is related to this but from slightly different site.
Say we have the same array
const char *data[] = {
"Str1",
"Str Two",
"Long string three",
};
Okay, compiler knows the length of array and we can get it in compile time: sizeof(data)/sizeof(data[0]). At the same time compiler knows the size of each string, say the result of strlen(data[1]) is actually known at compile time. But strlen is runtime call, and sizeof[i] will always return the sizeof(char *) value. Is there any way to get the length of each string of array without separate definition of each string as variable or macro?