H
herrcho
here is the code
#include <stdio.h>
int main()
{
char *str1="Borland International";
printf("%d\n", strlen(str1));
return 0;
}
i learned when i use strlen i have to include <string.h>
but the above runs o.k without <string.h>
i compiled it with gcc -Wall -ansi -pedantic -o
Could anyone explain about this ?
#include <stdio.h>
int main()
{
char *str1="Borland International";
printf("%d\n", strlen(str1));
return 0;
}
i learned when i use strlen i have to include <string.h>
but the above runs o.k without <string.h>
i compiled it with gcc -Wall -ansi -pedantic -o
Could anyone explain about this ?