Well, since the size of a character is 1, you can indeed use sizeof to get the length of a FIXED string (doesn't work if the string is user-input into an array):
Code:
char string[] "some value here...";
int sizeOfString = sizeof(string)/sizeof(*string) - 1;
The -1 is because of the '\0' which usually isn't part of the string length. Note that this DOESN'T work if the user enters something:
Code:
int sizeOfString;
char someString[100];
fgets(someString, 100, stdin);
sizeOfString = sizeof(string)/sizeof(*string) - 1;
printf("Size of the string: %d\n", sizeOfString);
This code will print 99, regardless of what the user enters. There is no "other" way except for looping until you find '\0'.