Consider the following code
#include
void print(char string[]){
printf(\"%s:%d\\n\",string,sizeof(string));
}
int main(){
char string[] =
A string in c is just an array of characters. It isn't necessarily NUL terminated (although in your case it is). There is no way for the function to know how long the string is that's passed to it - it's just given the address of the string as a pointer.
"String" is that pointer and on your machine (a 32 bit machine) it takes 4 bytes to store a pointer. So sizeof(string) is 4