#include
#include
#include
int main(void)
{
char *j;
j = malloc(17);
if(!j) {
printf("Allocation Error\n");
exit(1);
}
strcpy(j, "This is 16 chars");
j = realloc(j, 18);
if(!j) {
printf("Allocation Error\n");
exit(1);
}
strcat(j, ".");
printf(j);
free(j);
return 0;
}