S
selvesteen
Hello All,
I am getting following error on HP-UX for the program given below
"Pid 10150 in trap loop, signal 11
Memory fault"
int main()
{
char *txtptr="";
const char *a = "string append";
strcat(txtptr,a);
printf("%s\n",txtptr);
}
What is wrong with this program? What is a better method to initialize
a string (char *txtptr="") with NULL.
Advance thanks for the help.
Mike
I am getting following error on HP-UX for the program given below
"Pid 10150 in trap loop, signal 11
Memory fault"
int main()
{
char *txtptr="";
const char *a = "string append";
strcat(txtptr,a);
printf("%s\n",txtptr);
}
What is wrong with this program? What is a better method to initialize
a string (char *txtptr="") with NULL.
Advance thanks for the help.
Mike