#include <stdlib.h>
#include <string.h>
#include <stdio.h>
typedef struct ht {
int numele;
} hashtable;
int main()
{
hashtable o = {0};
char** array
= malloc(1 * sizeof(*array
));
o.numele = sizeof(o);
printf("numele %d \n", o.
numele); if (array)
{
array[0] = "This";
printf("%s\n------\n", array
[0]);
char** tmp
= realloc(array
, 10 * sizeof(*array
)); if (tmp)
{
array = tmp;
array[1] = "That";
array[2] = "Thats";
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGxpYi5oPgojaW5jbHVkZSA8c3RyaW5nLmg+CiNpbmNsdWRlIDxzdGRpby5oPgoKdHlwZWRlZiBzdHJ1Y3QgaHQgewogICAgaW50IG51bWVsZTsKfSBoYXNodGFibGU7CgppbnQgbWFpbigpCnsKCQoJaGFzaHRhYmxlIG8gPSB7MH07CgogICAgY2hhcioqIGFycmF5ID0gbWFsbG9jKDEgKiBzaXplb2YoKmFycmF5KSk7CgkKCW8ubnVtZWxlID0gc2l6ZW9mKG8pOwoJCglwcmludGYoIm51bWVsZSAlZCBcbiIsIG8ubnVtZWxlKTsgCiAgICBpZiAoYXJyYXkpCiAgICB7CiAgICAgICAgYXJyYXlbMF0gPSAiVGhpcyI7CgogICAgICAgIHByaW50ZigiJXNcbi0tLS0tLVxuIiwgYXJyYXlbMF0pOwoKICAgICAgICBjaGFyKiogdG1wID0gcmVhbGxvYyhhcnJheSwgMTAgKiBzaXplb2YoKmFycmF5KSk7CiAgICAgICAgaWYgKHRtcCkKICAgICAgICB7CiAgICAgICAgICAgIGFycmF5ID0gdG1wOwogICAgICAgICAgICBhcnJheVsxXSA9ICJUaGF0IjsKICAgICAgICAgICAgIGFycmF5WzJdID0gIlRoYXRzIjsKCiAgICAgICAgICAgIHByaW50ZigiJXNcbiIsIGFycmF5WzBdKTsKICAgICAgICAgICAgcHJpbnRmKCIlc1xuIiwgYXJyYXlbMV0pOwogICAgICAgICAgICBwcmludGYoIiVzXG4iLCBhcnJheVsyXSk7CiAgICAgICAgfQoJCgoKICAgICAgICBmcmVlKGFycmF5KTsKICAgIH0KICAgIHJldHVybiAwOwp9Cg==