S
sam_cit
Hi Everyone,
I tried the following program unit in Microsoft Visual c++ 6.0 and the
program caused unexpected behavior,
#include <stdio.h>
#include <string.h>
int main()
{
char *p;
p = NULL;
printf("%d\n",strlen(p));
}
Is it that strlen function can't handle NULL pointers?
I tried the following program unit in Microsoft Visual c++ 6.0 and the
program caused unexpected behavior,
#include <stdio.h>
#include <string.h>
int main()
{
char *p;
p = NULL;
printf("%d\n",strlen(p));
}
Is it that strlen function can't handle NULL pointers?