Can you tell me what am I doing wrong here ? I don't get the text when I print printf("%s\n",text[0]);
I created char **text; and malloced all pointers.
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
char **text;
int main()
{
int i;
text = malloc(20000);
for(i=0; i < 20000; i++) {
text[i] = malloc(4);
memcpy(text[i], "test",4);
}
printf("%s\n",text[0]);
printf("%s\n",text[1]);
}