How come '\0' doesnt show up in the debugger?

I'm tracking down a stupid computer bug. I'm just sort of curious why
'/0' string won't show up after I add it. Here is the code snippet

void *allocate_string_array(size_t len, char *line, char **strarr)
{
int count = 0;
if( (len+1) < MAXLINE) {
if((strarr=malloc(sizeof(line) + 1)) == NULL){
return NULL;
}
strarr[count] = dupstr(line);
}
else {
fprintf(stderr, "Input line is too long \n");
exit(EXIT_FAILURE);
}
*(strarr+len+1)='\0';
return *strarr;

}

When I first enter the function
(gdb) print *strarr
$4 = 0x0
(gdb) print line
$5 = 0x804a180 "this is a really long long line\n"

Right after I leave the function
(gdb) step
120 return *strarr;
(gdb) print line
$6 = 0x804a180 "this is a really long long line\n"
(gdb) print *strarr
$7 = 0x840a180 "this is a really long long line\n"
(gdb)

'\0' is the end of string character.

Looks horrible.

Your malloc will always do a malloc of 5 bytes on a 32bit computer.

What relationship is the return value supposed to have with strarr?

Count is a constant, what is it needed for?

What is "*(strarr+len+1)='\0';" trying to do?

Does it compile cleanly with "-Wall -Werror" on gcc?

Bear with this.

My brain doesn't always function correctly after I've worked 14 hours.

if((strarr=malloc(sizeof(line) + 1)) == NULL)

should have been

if((strarr=malloc(strlen(line) + 1)) == NULL)

However, my compiler didn't bitch about the typo. Here is what happens when I turn on full warnings.
[cda@localhost ~]$ gcc -g -Wall -ansi -Werror -pedantic x_tty.c -o x_tty
[cda@localhost ~]$

Now what does
What is "*(strarr+len+1)='\0';" trying to do?

It's just any ugly hack because I was getting some funky output. I figured the reason why I was getting funky stuff was because my string wasn't terminated. However, it only works half the time. I still somethines get

now
is a really long long line

What is len for if you are then doing a strlen?

I still haven't worked out why you are assigning to strarr when it was given to you as an argument?

Do you actually mean

strarr[0]=malloc(strlen(line)+1);

then you should be doing

strcpy(strarr[0],line);

Sometime this week, I'll post a URL with the ENTIRE code.

I suggest you just post a formal specification for the function "allocate_string_array".

I wasn't too sure what I was doing either. I was just trying to get it to work at the time. Anyhow, I thought about it and I think using strcpy() is the correct approach.