Sunday, 15 September 2013

C recalloc() function fails

C recalloc() function fails

Why does this code not work?
char *x=malloc(100);
x++;
x=realloc(x, 200);
I mean x is a valid string pointer, just incremented by one?

No comments:

Post a Comment