Segmentation fault with NULL for strcmp and strlen
807578Jan 5 2004 — edited Feb 11 2004Hi,
I have a C program that performs a strcmp with NULL as one of it's arguments. COmpilation is fine but when I run it, I hit segmentation fault. Can anyone help me?
Source Code
#include <string.h>
int main(){
char s1[1000];
strcpy(s1,"TEST");
return strcmp(s1,NULL);
}